diff options
author | Werner Zeh <werner.zeh@siemens.com> | 2016-07-06 08:47:56 +0200 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2016-07-06 21:58:09 +0200 |
commit | 9007ffd3d1b7c079c791e90ec52243eac385979f (patch) | |
tree | e22511979703c8df1bf4682ee987839eafa5a490 /src/soc/intel/fsp_broadwell_de/include | |
parent | 234d246535029e92209ed0371b6cae6506807d0a (diff) |
PCI: Use PCI_DEVFN macro instead of DEV_FUNC
There are several different macros available to convert a PCI device and
function to a single 8 bit value. One is PCI_DEVFN and is defined in
device/pci_def.h. The other is DEV_FUNC and is defined in several intel
fsp based chipset implementations. In fsp_broadwell_de DEV_FUNC is even
used without being defined at all. This patch unifies the situation so
that only PCI_DEVFN is used.
Change-Id: Ia1c6d7f3683badc66d15053846936d88aa836632
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/15546
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/soc/intel/fsp_broadwell_de/include')
-rw-r--r-- | src/soc/intel/fsp_broadwell_de/include/soc/pci_devs.h | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/src/soc/intel/fsp_broadwell_de/include/soc/pci_devs.h b/src/soc/intel/fsp_broadwell_de/include/soc/pci_devs.h index 646ed3fecb..99236018c5 100644 --- a/src/soc/intel/fsp_broadwell_de/include/soc/pci_devs.h +++ b/src/soc/intel/fsp_broadwell_de/include/soc/pci_devs.h @@ -17,38 +17,40 @@ #ifndef _SOC_PCI_DEVS_H_ #define _SOC_PCI_DEVS_H_ +#include <device/pci_def.h> + #define BUS0 0 #define SOC_DEV 0 #define SOC_FUNC 0 #define SOC_DEVID 0x2F00 #define SOC_DEVID_ES2 0x6F00 -#define SOC_DEV_FUNC DEV_FUNC(SOC_DEV, SOC_FUNC) +#define SOC_DEV_FUNC PCI_DEVFN(SOC_DEV, SOC_FUNC) #define LPC_DEV 31 #define LPC_FUNC 0 #define LPC_DEVID 0x8C42 #define LPC_DEVID_ES2 0x8C54 -#define LPC_DEV_FUNC DEV_FUNC(LPC_DEV, LPC_FUNC) +#define LPC_DEV_FUNC PCI_DEVFN(LPC_DEV, LPC_FUNC) #define SATA_DEV 31 #define SATA_FUNC 2 #define AHCI_DEVID 0x8C02 -#define SATA_DEV_FUNC DEV_FUNC(SATA_DEV, SATA_FUNC) +#define SATA_DEV_FUNC PCI_DEVFN(SATA_DEV, SATA_FUNC) #define SATA2_DEV 31 #define SATA2_FUNC 5 -#define SATA2_DEV_FUNC DEV_FUNC(SATA2_DEV, SATA2_FUNC) +#define SATA2_DEV_FUNC PCI_DEVFN(SATA2_DEV, SATA2_FUNC) #define EHCI1_DEV 29 #define EHCI1_FUNC 0 #define EHCI1_DEVID 0x8C26 -#define EHCI1_DEV_FUNC DEV_FUNC(EHCI_DEV1, EHCI_FUNC1) +#define EHCI1_DEV_FUNC PCI_DEVFN(EHCI_DEV1, EHCI_FUNC1) #define EHCI2_DEV 26 #define EHCI2_FUNC 0 #define EHCI2_DEVID 0x8C2D -#define EHCI2_DEV_FUNC DEV_FUNC(EHCI_DEV2, EHCI_FUNC2) +#define EHCI2_DEV_FUNC PCI_DEVFN(EHCI_DEV2, EHCI_FUNC2) #define XHCI_DEV 20 #define XHCI_FUNC 0 @@ -56,22 +58,22 @@ #define XHCI_FUS_REG 0xE0 #define XHCI_FUNC_DISABLE (1 << 0) #define XHCI_USB2PR_REG 0xD0 -#define XHCI_DEV_FUNC DEV_FUNC(XHCI_DEV, XHCI_FUNC) +#define XHCI_DEV_FUNC PCI_DEVFN(XHCI_DEV, XHCI_FUNC) #define GBE_DEV 25 #define GBE_FUNC 0 #define GBE_DEVID 0x8C33 -#define GBE_DEV_FUNC DEV_FUNC(GBE_DEV, GBE_FUNC) +#define GBE_DEV_FUNC PCI_DEVFN(GBE_DEV, GBE_FUNC) #define ME_DEV 22 #define ME_FUNC 0 #define ME_DEVID 0x8C3A -#define ME_DEV_FUNC DEV_FUNC(ME_DEV, ME_FUNC) +#define ME_DEV_FUNC PCI_DEVFN(ME_DEV, ME_FUNC) #define HDA_DEV 27 #define HDA_FUNC 0 #define HDA_DEVID 0x8C20 -#define HDA_DEV_FUNC DEV_FUNC(HDA_DEV, HDA_FUNC) +#define HDA_DEV_FUNC PCI_DEVFN(HDA_DEV, HDA_FUNC) #define PCIE_DEV 28 #define PCIE_PORT1_DEV PCIE_DEV @@ -98,13 +100,13 @@ #define PCIE_PORT8_DEV PCIE_DEV #define PCIE_PORT8_FUNC 7 #define PCIE_PORT8_DEVID 0x8C1E -#define PCIE_PORT1_DEV_FUNC DEV_FUNC(PCIE_DEV, PCIE_PORT1_FUNC) -#define PCIE_PORT2_DEV_FUNC DEV_FUNC(PCIE_DEV, PCIE_PORT2_FUNC) -#define PCIE_PORT3_DEV_FUNC DEV_FUNC(PCIE_DEV, PCIE_PORT3_FUNC) -#define PCIE_PORT4_DEV_FUNC DEV_FUNC(PCIE_DEV, PCIE_PORT4_FUNC) -#define PCIE_PORT5_DEV_FUNC DEV_FUNC(PCIE_DEV, PCIE_PORT5_FUNC) -#define PCIE_PORT6_DEV_FUNC DEV_FUNC(PCIE_DEV, PCIE_PORT6_FUNC) -#define PCIE_PORT7_DEV_FUNC DEV_FUNC(PCIE_DEV, PCIE_PORT7_FUNC) -#define PCIE_PORT8_DEV_FUNC DEV_FUNC(PCIE_DEV, PCIE_PORT8_FUNC) +#define PCIE_PORT1_DEV_FUNC PCI_DEVFN(PCIE_DEV, PCIE_PORT1_FUNC) +#define PCIE_PORT2_DEV_FUNC PCI_DEVFN(PCIE_DEV, PCIE_PORT2_FUNC) +#define PCIE_PORT3_DEV_FUNC PCI_DEVFN(PCIE_DEV, PCIE_PORT3_FUNC) +#define PCIE_PORT4_DEV_FUNC PCI_DEVFN(PCIE_DEV, PCIE_PORT4_FUNC) +#define PCIE_PORT5_DEV_FUNC PCI_DEVFN(PCIE_DEV, PCIE_PORT5_FUNC) +#define PCIE_PORT6_DEV_FUNC PCI_DEVFN(PCIE_DEV, PCIE_PORT6_FUNC) +#define PCIE_PORT7_DEV_FUNC PCI_DEVFN(PCIE_DEV, PCIE_PORT7_FUNC) +#define PCIE_PORT8_DEV_FUNC PCI_DEVFN(PCIE_DEV, PCIE_PORT8_FUNC) #endif /* _SOC_PCI_DEVS_H_ */ |