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 <[email protected]> > Reviewed-by: Stefan Roese <[email protected]>
Applied to u-boot/next, thanks! -- Tom
signature.asc
Description: PGP signature

