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 v2 03/14] Marvell/Library: ArmadaBoardDescLib: Add PCIE information
Date: Mon, 20 May 2019 17:27:16 +0200	[thread overview]
Message-ID: <1558366047-15994-4-git-send-email-mw@semihalf.com> (raw)
In-Reply-To: <1558366047-15994-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-20 15:27 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-20 15:27 [edk2-platforms: PATCH v2 00/14] Armada7k8k PCIE support Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 01/14] Marvell/Library: MvGpioLib: Extend GPIO pin description Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 02/14] Marvell/Library: ArmadaSoCDescLib: Add PCIE information Marcin Wojtas
2019-05-20 15:27 ` Marcin Wojtas [this message]
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 04/14] Marvell/Armada7k8k: Extend board description libraries with PCIE Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 05/14] Marvell/Armada7k8k: MvBoardDesc: Extend protocol with PCIE support Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 06/14] Marvell/Armada7k8k: Add PciExpressLib implementation Marcin Wojtas
2019-05-24 12:50   ` Ard Biesheuvel
2019-05-24 13:03     ` Marcin Wojtas
2019-05-24 13:08       ` Ard Biesheuvel
2019-05-24 14:28         ` Marcin Wojtas
2019-05-24 15:25           ` Ard Biesheuvel
2019-05-24 15:32             ` Leif Lindholm
2019-05-24 15:43               ` Marcin Wojtas
2019-05-24 15:46                 ` Ard Biesheuvel
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 07/14] Marvell/Armada7k8k: Implement PciHostBridgeLib Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 08/14] Marvell/Armada7k8k: Enable PCIE support Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 09/14] Marvell/Armada80x0McBin: Enable ACPI " Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 10/14] Marvell/Armada80x0Db: " Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 11/14] Marvell/Armada70x0Db: " Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 12/14] Marvell/Armada80x0McBin: DeviceTree: Use pci-host-generic driver Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 13/14] Marvell/Armada7k8k: Remove duplication in .dsc files Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 14/14] Marvell/Armada7k8: Add 'acpiview' shell command to build Marcin Wojtas
2019-05-23 13:27 ` [edk2-platforms: PATCH v2 00/14] Armada7k8k PCIE support Mark Kettenis
2019-05-23 14:14   ` Leif Lindholm
2019-05-23 18:01     ` kettenis
2019-05-23 18:13       ` Ard Biesheuvel
2019-05-23 20:11         ` Leif Lindholm
2019-05-23 20:24           ` Ard Biesheuvel
2019-05-24 13:08             ` Marcin Wojtas
2019-05-24 13:12               ` Ard Biesheuvel
2019-05-24 13:13                 ` Marcin Wojtas
2019-05-24 22:16         ` mark.kettenis
2019-05-25  9:47           ` Ard Biesheuvel

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=1558366047-15994-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