From: "Ard Biesheuvel" <ard.biesheuvel@linaro.org>
To: Marcin Wojtas <mw@semihalf.com>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>,
"Leif Lindholm" <leif.lindholm@linaro.org>,
"Jan Dąbroś" <jsd@semihalf.com>,
"Grzegorz Jaszczyk" <jaz@semihalf.com>,
"Kostya Porotchkin" <kostap@marvell.com>,
"Jici Gao" <Jici.Gao@arm.com>,
"Rebecca Cran" <rebecca@bluestop.org>,
kettenis@jive.eu
Subject: Re: [edk2-platforms: PATCH 03/14] Marvell/Library: ArmadaBoardDescLib: Add PCIE information
Date: Thu, 16 May 2019 15:57:36 +0200 [thread overview]
Message-ID: <CAKv+Gu9M4wuoAky6e1ar-oR9fnek7czvENxVr3+wiEX8N10TjQ@mail.gmail.com> (raw)
In-Reply-To: <1557395622-32425-4-git-send-email-mw@semihalf.com>
On Thu, 9 May 2019 at 11:53, Marcin Wojtas <mw@semihalf.com> wrote:
>
> 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 6ec5ace..530a2ba 100644
> --- a/Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h
> +++ b/Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h
> @@ -15,6 +15,7 @@
> #define __ARMADA_BOARD_DESC_LIB_H__
>
> #include <Library/ArmadaSoCDescLib.h>
> +#include <Library/MvGpioLib.h>
>
> //
> // COMPHY controllers per-board description
> @@ -111,6 +112,51 @@ typedef struct {
> } MV_BOARD_XHCI_DESC;
>
> //
> +// PCIE controllers description
> +//
> +typedef struct {
> + EFI_PHYSICAL_ADDRESS PcieBaseAddress;
> + EFI_PHYSICAL_ADDRESS ConfigSpaceAddress;
In EDK2, the PCIe base address is usually the ECAM base address, not
the address of the DBI interface (which is not standardized by PCIe).
So you can either avoid 'base' entirely, and use Dbi and Ecam/Config,
or you can use 'base' for the latter, but not for the former.
> + 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 *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 **PcieControllers,
Make this MV_PCIE_CONTROLLER CONST** if you can.
> + IN OUT UINTN *PcieControllerCount
> + );
> +
> +//
> // PP2 NIC devices per-board description
> //
> typedef struct {
> --
> 2.7.4
>
next prev parent reply other threads:[~2019-05-16 13:57 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-09 9:53 [edk2-platforms: PATCH 00/14] Armada7k8k PCIE support Marcin Wojtas
2019-05-09 9:53 ` [edk2-platforms: PATCH 01/14] Marvell/Library: MvGpioLib: Extend GPIO pin description Marcin Wojtas
2019-05-09 9:53 ` [edk2-platforms: PATCH 02/14] Marvell/Library: ArmadaSoCDescLib: Add PCIE information Marcin Wojtas
2019-05-10 14:59 ` Leif Lindholm
2019-05-10 15:03 ` Marcin Wojtas
2019-05-09 9:53 ` [edk2-platforms: PATCH 03/14] Marvell/Library: ArmadaBoardDescLib: " Marcin Wojtas
2019-05-16 13:57 ` Ard Biesheuvel [this message]
2019-05-09 9:53 ` [edk2-platforms: PATCH 04/14] Marvell/Armada7k8k: Extend board description libraries with PCIE Marcin Wojtas
2019-05-09 10:16 ` Marcin Wojtas
2019-05-09 9:53 ` [edk2-platforms: PATCH 05/14] Marvell/Armada7k8k: MvBoardDesc: Extend protocol with PCIE support Marcin Wojtas
2019-05-16 13:53 ` Ard Biesheuvel
2019-05-09 9:53 ` [edk2-platforms: PATCH 06/14] Marvell/Armada7k8k: Add PciExpressLib implementation Marcin Wojtas
2019-05-10 15:25 ` Leif Lindholm
2019-05-10 15:29 ` Marcin Wojtas
2019-05-16 14:02 ` Ard Biesheuvel
2019-05-16 14:26 ` Marcin Wojtas
2019-05-09 9:53 ` [edk2-platforms: PATCH 07/14] Marvell/Armada7k8k: Implement PciHostBridgeLib Marcin Wojtas
2019-05-10 15:50 ` Leif Lindholm
2019-05-12 11:41 ` Marcin Wojtas
2019-05-16 14:14 ` Ard Biesheuvel
2019-05-09 9:53 ` [edk2-platforms: PATCH 08/14] Marvell/Armada7k8k: Enable PCIE support Marcin Wojtas
2019-05-16 14:16 ` Ard Biesheuvel
2019-05-16 14:22 ` Marcin Wojtas
2019-05-16 14:25 ` Ard Biesheuvel
2019-05-16 14:32 ` Leif Lindholm
2019-05-09 9:53 ` [edk2-platforms: PATCH 09/14] Marvell/Armada80x0McBin: Enable ACPI " Marcin Wojtas
2019-05-10 15:54 ` Leif Lindholm
2019-05-16 14:23 ` Ard Biesheuvel
2019-05-09 9:53 ` [edk2-platforms: PATCH 10/14] Marvell/Armada80x0Db: " Marcin Wojtas
2019-05-16 14:25 ` [edk2-devel] " Ard Biesheuvel
2019-05-09 9:53 ` [edk2-platforms: PATCH 11/14] Marvell/Armada70x0Db: " Marcin Wojtas
2019-05-16 14:26 ` [edk2-devel] " Ard Biesheuvel
2019-05-09 9:53 ` [edk2-platforms: PATCH 12/14] Marvell/Armada80x0McBin: DeviceTree: Use pci-host-generic driver Marcin Wojtas
2019-05-09 9:53 ` [edk2-platforms: PATCH 13/14] Marvell/Armada7k8k: Remove duplication in .dsc files Marcin Wojtas
2019-05-09 9:53 ` [edk2-platforms: PATCH 14/14] Marvell/Armada7k8: Add 'acpiview' shell command to build Marcin Wojtas
2019-05-10 15:58 ` [edk2-platforms: PATCH 00/14] Armada7k8k PCIE support Leif Lindholm
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=CAKv+Gu9M4wuoAky6e1ar-oR9fnek7czvENxVr3+wiEX8N10TjQ@mail.gmail.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