Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31302
Change subject: device/pci: Always define PCI_DEV() ......................................................................
device/pci: Always define PCI_DEV()
This has uses outside ARCH_x86 and/or __PRE_RAM__.
Change-Id: I2eec674ec5ba4ffe03a20db0f73cf87e5e4b4d0d Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/arch/x86/include/arch/io.h M src/include/device/pci_type.h 2 files changed, 7 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/02/31302/1
diff --git a/src/arch/x86/include/arch/io.h b/src/arch/x86/include/arch/io.h index 1a27994..71e3ba0 100644 --- a/src/arch/x86/include/arch/io.h +++ b/src/arch/x86/include/arch/io.h @@ -205,11 +205,6 @@
#ifdef __SIMPLE_DEVICE__
-#define PCI_DEV(SEGBUS, DEV, FN) ( \ - (((SEGBUS) & 0xFFF) << 20) | \ - (((DEV) & 0x1F) << 15) | \ - (((FN) & 0x07) << 12)) - #define PCI_ID(VENDOR_ID, DEVICE_ID) \ ((((DEVICE_ID) & 0xFFFF) << 16) | ((VENDOR_ID) & 0xFFFF))
@@ -273,7 +268,6 @@ pci_io_write_config32(dev, where, value); }
-#define PCI_DEV_INVALID (0xffffffffU) static inline pci_devfn_t pci_io_locate_device(unsigned int pci_id, pci_devfn_t dev) { diff --git a/src/include/device/pci_type.h b/src/include/device/pci_type.h index 2849ece..0b08e8d 100644 --- a/src/include/device/pci_type.h +++ b/src/include/device/pci_type.h @@ -19,4 +19,11 @@ typedef u32 pci_devfn_t; typedef u32 pnp_devfn_t;
+#define PCI_DEV(SEGBUS, DEV, FN) ( \ + (((SEGBUS) & 0xFFF) << 20) | \ + (((DEV) & 0x1F) << 15) | \ + (((FN) & 0x07) << 12)) + +#define PCI_DEV_INVALID (0xffffffffU) + #endif /* DEVICE_PCI_TYPE_H */
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31302 )
Change subject: device/pci: Always define PCI_DEV() ......................................................................
Patch Set 1: Code-Review+2
Kyösti Mälkki has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/31302 )
Change subject: device/pci: Always define PCI_DEV() ......................................................................
device/pci: Always define PCI_DEV()
This has uses outside ARCH_x86 and/or __PRE_RAM__.
Change-Id: I2eec674ec5ba4ffe03a20db0f73cf87e5e4b4d0d Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com Reviewed-on: https://review.coreboot.org/c/31302 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Felix Held felix-coreboot@felixheld.de --- M src/arch/x86/include/arch/io.h M src/include/device/pci_type.h 2 files changed, 7 insertions(+), 6 deletions(-)
Approvals: build bot (Jenkins): Verified Felix Held: Looks good to me, approved
diff --git a/src/arch/x86/include/arch/io.h b/src/arch/x86/include/arch/io.h index 1a27994..71e3ba0 100644 --- a/src/arch/x86/include/arch/io.h +++ b/src/arch/x86/include/arch/io.h @@ -205,11 +205,6 @@
#ifdef __SIMPLE_DEVICE__
-#define PCI_DEV(SEGBUS, DEV, FN) ( \ - (((SEGBUS) & 0xFFF) << 20) | \ - (((DEV) & 0x1F) << 15) | \ - (((FN) & 0x07) << 12)) - #define PCI_ID(VENDOR_ID, DEVICE_ID) \ ((((DEVICE_ID) & 0xFFFF) << 16) | ((VENDOR_ID) & 0xFFFF))
@@ -273,7 +268,6 @@ pci_io_write_config32(dev, where, value); }
-#define PCI_DEV_INVALID (0xffffffffU) static inline pci_devfn_t pci_io_locate_device(unsigned int pci_id, pci_devfn_t dev) { diff --git a/src/include/device/pci_type.h b/src/include/device/pci_type.h index 2849ece..0b08e8d 100644 --- a/src/include/device/pci_type.h +++ b/src/include/device/pci_type.h @@ -19,4 +19,11 @@ typedef u32 pci_devfn_t; typedef u32 pnp_devfn_t;
+#define PCI_DEV(SEGBUS, DEV, FN) ( \ + (((SEGBUS) & 0xFFF) << 20) | \ + (((DEV) & 0x1F) << 15) | \ + (((FN) & 0x07) << 12)) + +#define PCI_DEV_INVALID (0xffffffffU) + #endif /* DEVICE_PCI_TYPE_H */