Felix Singer has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37116 )
Change subject: sb/ibexpeak: Use macros instead of hard-coded IDs ......................................................................
sb/ibexpeak: Use macros instead of hard-coded IDs
This patch replaces hard-coded PCI IDs with macros from pci_ids.h and adds the related IDs to it.
The resulting binary doesn't differ from the one without this patch.
Used documents: - Intel 322170
Change-Id: I3326f142d483f5008fb2ac878f30c1a3a72f500f Signed-off-by: Felix Singer felix.singer@9elements.com --- M src/include/device/pci_ids.h M src/southbridge/intel/ibexpeak/azalia.c M src/southbridge/intel/ibexpeak/lpc.c M src/southbridge/intel/ibexpeak/me.c M src/southbridge/intel/ibexpeak/sata.c M src/southbridge/intel/ibexpeak/smbus.c M src/southbridge/intel/ibexpeak/thermal.c M src/southbridge/intel/ibexpeak/usb_ehci.c 8 files changed, 50 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/37116/1
diff --git a/src/include/device/pci_ids.h b/src/include/device/pci_ids.h index 18d6f60..d1d26fe 100644 --- a/src/include/device/pci_ids.h +++ b/src/include/device/pci_ids.h @@ -2675,6 +2675,19 @@ #define PCI_DEVICE_ID_INTEL_PCIE_PB 0x3597 #define PCI_DEVICE_ID_INTEL_PCIE_PC 0x3599
+/* Intel Ibex Peak (5 Series Chipset and 3400 Series Chipset) */ +#define PCI_DEVICE_ID_INTEL_IBEXPEAK_LPC_QM57 0x3b07 +#define PCI_DEVICE_ID_INTEL_IBEXPEAK_LPC_HM55 0x3b09 +#define PCI_DEVICE_ID_INTEL_IBEXPEAK_MOBILE_SATA_IDE_1 0x3b28 +#define PCI_DEVICE_ID_INTEL_IBEXPEAK_MOBILE_SATA_AHCI 0x3b29 +#define PCI_DEVICE_ID_INTEL_IBEXPEAK_MOBILE_SATA_IDE_2 0x3b2e +#define PCI_DEVICE_ID_INTEL_IBEXPEAK_EHCI_1 0x3b34 +#define PCI_DEVICE_ID_INTEL_IBEXPEAK_EHCI_2 0x3b3c +#define PCI_DEVICE_ID_INTEL_IBEXPEAK_SMBUS 0x3b30 +#define PCI_DEVICE_ID_INTEL_IBEXPEAK_AUDIO 0x3b56 +#define PCI_DEVICE_ID_INTEL_IBEXPEAK_HECI1 0x3b64 +#define PCI_DEVICE_ID_INTEL_IBEXPEAK_THERMAL 0x3b32 + /* Intel LPC device ids */ #define PCI_DEVICE_ID_INTEL_LPT_MOBILE_SAMPLE 0x8c41 #define PCI_DEVICE_ID_INTEL_LPT_DESKTOP_SAMPLE 0x8c42 diff --git a/src/southbridge/intel/ibexpeak/azalia.c b/src/southbridge/intel/ibexpeak/azalia.c index 5b38ea7..c36ef5e 100644 --- a/src/southbridge/intel/ibexpeak/azalia.c +++ b/src/southbridge/intel/ibexpeak/azalia.c @@ -326,7 +326,12 @@ .ops_pci = &azalia_pci_ops, };
-static const unsigned short pci_device_ids[] = { 0x1c20, 0x1e20, 0x3b56, 0 }; +static const unsigned short pci_device_ids[] = { + 0x1c20, + 0x1e20, + PCI_DEVICE_ID_INTEL_IBEXPEAK_AUDIO, + 0 +};
static const struct pci_driver pch_azalia __pci_driver = { .ops = &azalia_ops, diff --git a/src/southbridge/intel/ibexpeak/lpc.c b/src/southbridge/intel/ibexpeak/lpc.c index 2b48eab..c6a73b2 100644 --- a/src/southbridge/intel/ibexpeak/lpc.c +++ b/src/southbridge/intel/ibexpeak/lpc.c @@ -779,7 +779,11 @@ };
-static const unsigned short pci_device_ids[] = { 0x3b07, 0x3b09, 0 }; +static const unsigned short pci_device_ids[] = { + PCI_DEVICE_ID_INTEL_IBEXPEAK_LPC_QM57, + PCI_DEVICE_ID_INTEL_IBEXPEAK_LPC_HM55, + 0 +};
static const struct pci_driver pch_lpc __pci_driver = { .ops = &device_ops, diff --git a/src/southbridge/intel/ibexpeak/me.c b/src/southbridge/intel/ibexpeak/me.c index 63dff6a..e9dc908 100644 --- a/src/southbridge/intel/ibexpeak/me.c +++ b/src/southbridge/intel/ibexpeak/me.c @@ -615,8 +615,11 @@ .ops_pci = &pci_ops, };
-static const unsigned short pci_device_ids[] = { 0x1c3a, 0x3b64, - 0 }; +static const unsigned short pci_device_ids[] = { + 0x1c3a, + PCI_DEVICE_ID_INTEL_IBEXPEAK_HECI1, + 0 +};
static const struct pci_driver intel_me __pci_driver = { diff --git a/src/southbridge/intel/ibexpeak/sata.c b/src/southbridge/intel/ibexpeak/sata.c index 2d9412a..4c00e8e 100644 --- a/src/southbridge/intel/ibexpeak/sata.c +++ b/src/southbridge/intel/ibexpeak/sata.c @@ -247,7 +247,12 @@ .ops_pci = &sata_pci_ops, };
-static const unsigned short pci_device_ids[] = { 0x3b28, 0x3b29, 0x3b2e, 0 }; +static const unsigned short pci_device_ids[] = { + PCI_DEVICE_ID_INTEL_IBEXPEAK_MOBILE_SATA_IDE_1, + PCI_DEVICE_ID_INTEL_IBEXPEAK_MOBILE_SATA_AHCI, + PCI_DEVICE_ID_INTEL_IBEXPEAK_MOBILE_SATA_IDE_2, + 0 +};
static const struct pci_driver pch_sata __pci_driver = { .ops = &sata_ops, diff --git a/src/southbridge/intel/ibexpeak/smbus.c b/src/southbridge/intel/ibexpeak/smbus.c index dd3abfe..589b349 100644 --- a/src/southbridge/intel/ibexpeak/smbus.c +++ b/src/southbridge/intel/ibexpeak/smbus.c @@ -98,7 +98,12 @@ .ops_pci = &smbus_pci_ops, };
-static const unsigned short pci_device_ids[] = { 0x1c22, 0x1e22, 0x3b30, 0 }; +static const unsigned short pci_device_ids[] = { + 0x1c22, + 0x1e22, + PCI_DEVICE_ID_INTEL_IBEXPEAK_SMBUS, + 0 +};
static const struct pci_driver pch_smbus __pci_driver = { .ops = &smbus_ops, diff --git a/src/southbridge/intel/ibexpeak/thermal.c b/src/southbridge/intel/ibexpeak/thermal.c index 597d388..540eb6f 100644 --- a/src/southbridge/intel/ibexpeak/thermal.c +++ b/src/southbridge/intel/ibexpeak/thermal.c @@ -57,7 +57,10 @@ .ops_pci = &pci_ops, };
-static const unsigned short pci_device_ids[] = { 0x3b32, 0 }; +static const unsigned short pci_device_ids[] = { + PCI_DEVICE_ID_INTEL_IBEXPEAK_THERMAL, + 0 +};
static const struct pci_driver pch_thermal __pci_driver = { .ops = &thermal_ops, diff --git a/src/southbridge/intel/ibexpeak/usb_ehci.c b/src/southbridge/intel/ibexpeak/usb_ehci.c index d31fd70..9e8d19c 100644 --- a/src/southbridge/intel/ibexpeak/usb_ehci.c +++ b/src/southbridge/intel/ibexpeak/usb_ehci.c @@ -98,7 +98,11 @@ .ops_pci = &lops_pci, };
-static const unsigned short pci_device_ids[] = { 0x3b34, 0x3b3c, 0 }; +static const unsigned short pci_device_ids[] = { + PCI_DEVICE_ID_INTEL_IBEXPEAK_EHCI_1, + PCI_DEVICE_ID_INTEL_IBEXPEAK_EHCI_2, + 0 +};
static const struct pci_driver pch_usb_ehci __pci_driver = { .ops = &usb_ehci_ops,