X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Fpci.h;h=19c9244b9459bad06d9ce61d4bccb33487c28a69;hb=406df85345f942d9348443983d81a01e013e920b;hp=50ca249f2d600806718e86ea5cf7378c8966b96c;hpb=194fca91306f1a35da404a9c56d767be257c8b0f;p=oweals%2Fu-boot.git diff --git a/include/pci.h b/include/pci.h index 50ca249f2d..19c9244b94 100644 --- a/include/pci.h +++ b/include/pci.h @@ -488,8 +488,8 @@ typedef u64 pci_addr_t; typedef u64 pci_size_t; #else -typedef u32 pci_addr_t; -typedef u32 pci_size_t; +typedef unsigned long pci_addr_t; +typedef unsigned long pci_size_t; #endif struct pci_region { @@ -531,7 +531,7 @@ typedef int pci_dev_t; * This is relevant for the following macros: * PCI_DEV, PCI_FUNC, PCI_DEVFN * The U-Boot macro PCI_DEV is equivalent to the Linux PCI_SLOT version with - * the remark from above (input d in bits 15-8 instead of 7-0. + * the remark from above (input is in bits 15-8 instead of 7-0. */ #define PCI_DEV(d) (((d) >> 11) & 0x1f) #define PCI_FUNC(d) (((d) >> 8) & 0x7) @@ -543,6 +543,9 @@ typedef int pci_dev_t; #define PCI_VENDEV(v, d) (((v) << 16) | (d)) #define PCI_ANY_ID (~0) +/* Convert from Linux format to U-Boot format */ +#define PCI_TO_BDF(val) ((val) << 8) + struct pci_device_id { unsigned int vendor, device; /* Vendor and device ID or PCI_ANY_ID */ unsigned int subvendor, subdevice; /* Subsystem ID's or PCI_ANY_ID */