summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-01-23 16:02:28 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-02-11 11:31:50 +0000
commit371f04811e075d79741d130e2043ec8e19044dde (patch)
treef2f5f4e843c8f611aa9da2900459acb45372eab5 /src/include
parent06ea8f9b9ac66860b35c9885cf37692edf447693 (diff)
downloadcoreboot-371f04811e075d79741d130e2043ec8e19044dde.tar.gz
coreboot-371f04811e075d79741d130e2043ec8e19044dde.tar.bz2
coreboot-371f04811e075d79741d130e2043ec8e19044dde.zip
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>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/device/pci_type.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/include/device/pci_type.h b/src/include/device/pci_type.h
index 2849ececa743..0b08e8d0aa93 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 */