[edk2-devel] [edk2-platforms: PATCH v2 03/14] Marvell/Library: ArmadaBoardDescLib: Add PCIE information
Marcin Wojtas
mw at semihalf.com
Mon May 20 15:27:16 UTC 2019
Introduce new callback that can provide information
about PCIE controller per-board description.
A new structure is defined containing base addresses,
windows/bus configuration and reset GPIO usage indication.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marcin Wojtas <mw at semihalf.com>
---
Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h | 46 ++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h b/Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h
index a6d39c4..2ad19aa 100644
--- a/Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h
+++ b/Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h
@@ -9,6 +9,7 @@
#define __ARMADA_BOARD_DESC_LIB_H__
#include <Library/ArmadaSoCDescLib.h>
+#include <Library/MvGpioLib.h>
//
// COMPHY controllers per-board description
@@ -105,6 +106,51 @@ typedef struct {
} MV_BOARD_XHCI_DESC;
//
+// PCIE controllers description
+//
+typedef struct {
+ EFI_PHYSICAL_ADDRESS PcieDbiAddress;
+ EFI_PHYSICAL_ADDRESS ConfigSpaceAddress;
+ BOOLEAN HaveResetGpio;
+ MV_GPIO_PIN PcieResetGpio;
+ UINT64 PcieBusMin;
+ UINT64 PcieBusMax;
+ UINT64 PcieIoTranslation;
+ UINT64 PcieIoWinBase;
+ UINT64 PcieIoWinSize;
+ UINT64 PcieMmio32Translation;
+ UINT64 PcieMmio32WinBase;
+ UINT64 PcieMmio32WinSize;
+ UINT64 PcieMmio64Translation;
+ UINT64 PcieMmio64WinBase;
+ UINT64 PcieMmio64WinSize;
+} MV_PCIE_CONTROLLER;
+
+typedef struct {
+ MV_PCIE_CONTROLLER CONST *PcieControllers;
+ UINTN PcieControllerCount;
+} MV_BOARD_PCIE_DESCRIPTION;
+
+/**
+ Return the number and description of PCIE controllers used on the platform.
+
+ @param[in out] **PcieControllers Array containing PCIE controllers'
+ description.
+ @param[in out] *PcieControllerCount Amount of used PCIE controllers.
+
+ @retval EFI_SUCCESS The data were obtained successfully.
+ @retval EFI_NOT_FOUND None of the controllers is used.
+ @retval other Return error status.
+
+**/
+EFI_STATUS
+EFIAPI
+ArmadaBoardPcieControllerGet (
+ IN OUT MV_PCIE_CONTROLLER CONST **PcieControllers,
+ IN OUT UINTN *PcieControllerCount
+ );
+
+//
// PP2 NIC devices per-board description
//
typedef struct {
--
2.7.4
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#41070): https://edk2.groups.io/g/devel/message/41070
Mute This Topic: https://groups.io/mt/31686569/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list