public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Marcin Wojtas" <mw@semihalf.com>
To: devel@edk2.groups.io
Cc: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org,
	mw@semihalf.com, jsd@semihalf.com, jaz@semihalf.com,
	kostap@marvell.com, Jici.Gao@arm.com, rebecca@bluestop.org,
	kettenis@jive.eu
Subject: [edk2-platforms: PATCH v3 03/14] Marvell/Library: ArmadaBoardDescLib: Add PCIE information
Date: Fri, 24 May 2019 17:59:00 +0200	[thread overview]
Message-ID: <1558713551-25363-4-git-send-email-mw@semihalf.com> (raw)
In-Reply-To: <1558713551-25363-1-git-send-email-mw@semihalf.com>

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@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


  parent reply	other threads:[~2019-05-24 15:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-24 15:58 [edk2-platforms: PATCH v3 00/14] Armada7k8k PCIE support Marcin Wojtas
2019-05-24 15:58 ` [edk2-platforms: PATCH v3 01/14] Marvell/Library: MvGpioLib: Extend GPIO pin description Marcin Wojtas
2019-05-24 15:58 ` [edk2-platforms: PATCH v3 02/14] Marvell/Library: ArmadaSoCDescLib: Add PCIE information Marcin Wojtas
2019-05-24 15:59 ` Marcin Wojtas [this message]
2019-05-24 15:59 ` [edk2-platforms: PATCH v3 04/14] Marvell/Armada7k8k: Extend board description libraries with PCIE Marcin Wojtas
2019-05-24 15:59 ` [edk2-platforms: PATCH v3 05/14] Marvell/Armada7k8k: MvBoardDesc: Extend protocol with PCIE support Marcin Wojtas
2019-05-24 15:59 ` [edk2-platforms: PATCH v3 06/14] Marvell/Armada7k8k: Add PciSegmentLib implementation Marcin Wojtas
2019-05-24 15:59 ` [edk2-platforms: PATCH v3 07/14] Marvell/Armada7k8k: Implement PciHostBridgeLib Marcin Wojtas
2019-05-24 15:59 ` [edk2-platforms: PATCH v3 08/14] Marvell/Armada7k8k: Enable PCIE support Marcin Wojtas
2019-05-24 15:59 ` [edk2-platforms: PATCH v3 09/14] Marvell/Armada80x0McBin: Enable ACPI " Marcin Wojtas
2019-05-24 15:59 ` [edk2-platforms: PATCH v3 10/14] Marvell/Armada80x0Db: " Marcin Wojtas
2019-05-24 15:59 ` [edk2-platforms: PATCH v3 11/14] Marvell/Armada70x0Db: " Marcin Wojtas
2019-05-24 15:59 ` [edk2-platforms: PATCH v3 12/14] Marvell/Armada80x0McBin: DeviceTree: Use pci-host-generic driver Marcin Wojtas
2019-05-24 15:59 ` [edk2-platforms: PATCH v3 13/14] Marvell/Armada7k8k: Remove duplication in .dsc files Marcin Wojtas
2019-05-24 15:59 ` [edk2-platforms: PATCH v3 14/14] Marvell/Armada7k8: Add 'acpiview' shell command to build Marcin Wojtas
2019-05-24 16:57 ` [edk2-platforms: PATCH v3 00/14] Armada7k8k PCIE support Ard Biesheuvel
2019-05-24 21:22   ` Marcin Wojtas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1558713551-25363-4-git-send-email-mw@semihalf.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox