Felix Held has submitted this change. ( 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 felixsinger@posteo.net Reviewed-on: https://review.coreboot.org/c/coreboot/+/37116 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Paul Menzel paulepanter@users.sourceforge.net Reviewed-by: Michael Niewöhner --- 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(-)
Approvals: build bot (Jenkins): Verified Paul Menzel: Looks good to me, but someone else must approve Michael Niewöhner: Looks good to me, approved
diff --git a/src/include/device/pci_ids.h b/src/include/device/pci_ids.h index 8d634f8..8b2a273 100644 --- a/src/include/device/pci_ids.h +++ b/src/include/device/pci_ids.h @@ -2715,6 +2715,19 @@ #define PCI_DEVICE_ID_INTEL_DENVERTON_SPI 0x19e0 #define PCI_DEVICE_ID_INTEL_DENVERTON_TRACEHUB 0x19e1
+/* Intel Ibex Peak (5 Series Chipset and 3400 Series Chipset) */ +#define PCI_DID_INTEL_IBEXPEAK_LPC_QM57 0x3b07 +#define PCI_DID_INTEL_IBEXPEAK_LPC_HM55 0x3b09 +#define PCI_DID_INTEL_IBEXPEAK_MOBILE_SATA_IDE_1 0x3b28 +#define PCI_DID_INTEL_IBEXPEAK_MOBILE_SATA_AHCI 0x3b29 +#define PCI_DID_INTEL_IBEXPEAK_MOBILE_SATA_IDE_2 0x3b2e +#define PCI_DID_INTEL_IBEXPEAK_EHCI_1 0x3b34 +#define PCI_DID_INTEL_IBEXPEAK_EHCI_2 0x3b3c +#define PCI_DID_INTEL_IBEXPEAK_SMBUS 0x3b30 +#define PCI_DID_INTEL_IBEXPEAK_AUDIO 0x3b56 +#define PCI_DID_INTEL_IBEXPEAK_HECI1 0x3b64 +#define PCI_DID_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 2fceced..fe5cc2e 100644 --- a/src/southbridge/intel/ibexpeak/azalia.c +++ b/src/southbridge/intel/ibexpeak/azalia.c @@ -323,7 +323,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_DID_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 5c1b77f..0062e09 100644 --- a/src/southbridge/intel/ibexpeak/lpc.c +++ b/src/southbridge/intel/ibexpeak/lpc.c @@ -777,7 +777,11 @@ };
-static const unsigned short pci_device_ids[] = { 0x3b07, 0x3b09, 0 }; +static const unsigned short pci_device_ids[] = { + PCI_DID_INTEL_IBEXPEAK_LPC_QM57, + PCI_DID_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 31a0261..e8974d8 100644 --- a/src/southbridge/intel/ibexpeak/me.c +++ b/src/southbridge/intel/ibexpeak/me.c @@ -614,8 +614,11 @@ .ops_pci = &pci_ops, };
-static const unsigned short pci_device_ids[] = { 0x1c3a, 0x3b64, - 0 }; +static const unsigned short pci_device_ids[] = { + 0x1c3a, + PCI_DID_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 e4eebcb..33437ef 100644 --- a/src/southbridge/intel/ibexpeak/sata.c +++ b/src/southbridge/intel/ibexpeak/sata.c @@ -245,7 +245,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_DID_INTEL_IBEXPEAK_MOBILE_SATA_IDE_1, + PCI_DID_INTEL_IBEXPEAK_MOBILE_SATA_AHCI, + PCI_DID_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 eafb1ee..b06b1cd 100644 --- a/src/southbridge/intel/ibexpeak/smbus.c +++ b/src/southbridge/intel/ibexpeak/smbus.c @@ -96,7 +96,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_DID_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 e9a542e..2664c65 100644 --- a/src/southbridge/intel/ibexpeak/thermal.c +++ b/src/southbridge/intel/ibexpeak/thermal.c @@ -56,7 +56,10 @@ .ops_pci = &pci_ops, };
-static const unsigned short pci_device_ids[] = { 0x3b32, 0 }; +static const unsigned short pci_device_ids[] = { + PCI_DID_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 ce16994..f4b975a 100644 --- a/src/southbridge/intel/ibexpeak/usb_ehci.c +++ b/src/southbridge/intel/ibexpeak/usb_ehci.c @@ -96,7 +96,11 @@ .ops_pci = &lops_pci, };
-static const unsigned short pci_device_ids[] = { 0x3b34, 0x3b3c, 0 }; +static const unsigned short pci_device_ids[] = { + PCI_DID_INTEL_IBEXPEAK_EHCI_1, + PCI_DID_INTEL_IBEXPEAK_EHCI_2, + 0 +};
static const struct pci_driver pch_usb_ehci __pci_driver = { .ops = &usb_ehci_ops,