[PATCH] pci: Add standard PCIe ECAM macros

Tom Rini trini at konsulko.com
Thu Nov 18 20:15:48 CET 2021

On Wed, Nov 03, 2021 at 01:01:05AM +0100, Pali Rohár wrote:

> Lot of PCIe controllers are using ECAM addressing. So add common ECAM
> macros into U-Boot's pci.h header file which can be suitable for most
> PCI controller drivers.
> Replace custom ECAM address macros in every PCI controller driver by new
> ECAM macros from U-Boot's pci.h header file.
> Similar macros are defined also in Linux kernel. There is a small
> difference between Linux and these new U-Boot macros.
> U-Boot's PCIE_ECAM_OFFSET() takes device and function numbers in separate
> arguments. Linux's PCIE_ECAM_OFFSET() takes device and function numbers
> encoded in one argument. The reason is that U-Boot's PCI_DEVFN() macro is
> different than Linux's PCI_SLOT() macro. So having device and function
> numbers in separate arguments makes code more straightforward.
> Signed-off-by: Pali Rohár <pali at kernel.org>
> Reviewed-by: Stefan Roese <sr at denx.de>

Applied to u-boot/next, thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20211118/e8317992/attachment.sig>

More information about the U-Boot mailing list