From 371f04811e075d79741d130e2043ec8e19044dde Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Wed, 23 Jan 2019 16:02:28 +0200 Subject: device/pci: Always define PCI_DEV() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This has uses outside ARCH_x86 and/or __PRE_RAM__. Change-Id: I2eec674ec5ba4ffe03a20db0f73cf87e5e4b4d0d Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/31302 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held --- src/include/device/pci_type.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/include') diff --git a/src/include/device/pci_type.h b/src/include/device/pci_type.h index 2849ececa7..0b08e8d0aa 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 */ -- cgit v1.2.3