sb/intel/lynxpoint: Replace hard-coded IDs with defines

Replace hard-coded IDs with defines introduced in CB:47807.

Used documents:
- 328904-003
- 329003-003

Built lenovo/t440p with BUILD_TIMELESS=1, coreboot.rom remains
identical.

Change-Id: I910ab356dd8728c316018989bfb2689d4c67c2dc
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47808
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Felix Singer
2020-11-20 12:56:44 +00:00
committed by Michael Niewöhner
parent d5f1c08816
commit 4ea08f9f56
9 changed files with 79 additions and 43 deletions

View File

@@ -132,7 +132,11 @@ static struct device_operations azalia_ops = {
.ops_pci = &pci_dev_ops_pci, .ops_pci = &pci_dev_ops_pci,
}; };
static const unsigned short pci_device_ids[] = { 0x8c20, 0x9c20, 0 }; static const unsigned short pci_device_ids[] = {
PCI_DEVICE_ID_INTEL_LPT_H_AUDIO,
PCI_DEVICE_ID_INTEL_LPT_LP_AUDIO,
0
};
static const struct pci_driver pch_azalia __pci_driver = { static const struct pci_driver pch_azalia __pci_driver = {
.ops = &azalia_ops, .ops = &azalia_ops,

View File

@@ -787,26 +787,27 @@ static struct device_operations device_ops = {
/* IDs for LPC device of Intel 8 Series Chipset (Lynx Point) */ /* IDs for LPC device of Intel 8 Series Chipset (Lynx Point) */
static const unsigned short pci_device_ids[] = { static const unsigned short pci_device_ids[] = {
0x8c41, /* Mobile Full Featured Engineering Sample. */ PCI_DEVICE_ID_INTEL_LPT_MOBILE_SAMPLE,
0x8c42, /* Desktop Full Featured Engineering Sample. */ PCI_DEVICE_ID_INTEL_LPT_DESKTOP_SAMPLE,
0x8c44, /* Z87 SKU */ PCI_DEVICE_ID_INTEL_LPT_Z87,
0x8c46, /* Z85 SKU */ PCI_DEVICE_ID_INTEL_LPT_Z85,
0x8c49, /* HM86 SKU */ PCI_DEVICE_ID_INTEL_LPT_HM86,
0x8c4a, /* H87 SKU */ PCI_DEVICE_ID_INTEL_LPT_H87,
0x8c4b, /* HM87 SKU */ PCI_DEVICE_ID_INTEL_LPT_HM87,
0x8c4c, /* Q85 SKU */ PCI_DEVICE_ID_INTEL_LPT_Q85,
0x8c4e, /* Q87 SKU */ PCI_DEVICE_ID_INTEL_LPT_Q87,
0x8c4f, /* QM87 SKU */ PCI_DEVICE_ID_INTEL_LPT_QM87,
0x8c50, /* B85 SKU */ PCI_DEVICE_ID_INTEL_LPT_B85,
0x8c52, /* C222 SKU */ PCI_DEVICE_ID_INTEL_LPT_C222,
0x8c54, /* C224 SKU */ PCI_DEVICE_ID_INTEL_LPT_C224,
0x8c56, /* C226 SKU */ PCI_DEVICE_ID_INTEL_LPT_C226,
0x8c5c, /* H81 SKU */ PCI_DEVICE_ID_INTEL_LPT_H81,
0x9c41, /* LP Full Featured Engineering Sample */ PCI_DEVICE_ID_INTEL_LPT_LP_SAMPLE,
0x9c43, /* LP Premium SKU */ PCI_DEVICE_ID_INTEL_LPT_LP_PREMIUM,
0x9c45, /* LP Mainstream SKU */ PCI_DEVICE_ID_INTEL_LPT_LP_MAINSTREAM,
0x9c47, /* LP Value SKU */ PCI_DEVICE_ID_INTEL_LPT_LP_VALUE,
0 }; 0
};
static const struct pci_driver pch_lpc __pci_driver = { static const struct pci_driver pch_lpc __pci_driver = {
.ops = &device_ops, .ops = &device_ops,

View File

@@ -836,8 +836,8 @@ static struct device_operations device_ops = {
}; };
static const unsigned short pci_device_ids[] = { static const unsigned short pci_device_ids[] = {
0x8c3a, /* Mobile */ PCI_DEVICE_ID_INTEL_LPT_H_MEI,
0x9c3a, /* Low Power */ PCI_DEVICE_ID_INTEL_LPT_LP_MEI,
0 0
}; };

View File

@@ -749,10 +749,20 @@ static struct device_operations device_ops = {
}; };
static const unsigned short pci_device_ids[] = { static const unsigned short pci_device_ids[] = {
/* Lynxpoint Mobile */ PCI_DEVICE_ID_INTEL_LPT_H_PCIE_RP1,
0x8c10, 0x8c12, 0x8c14, 0x8c16, 0x8c18, 0x8c1a, 0x8c1c, 0x8c1e, PCI_DEVICE_ID_INTEL_LPT_H_PCIE_RP2,
/* Lynxpoint Low Power */ PCI_DEVICE_ID_INTEL_LPT_H_PCIE_RP3,
0x9c10, 0x9c12, 0x9c14, 0x9c16, 0x9c18, 0x9c1a, PCI_DEVICE_ID_INTEL_LPT_H_PCIE_RP4,
PCI_DEVICE_ID_INTEL_LPT_H_PCIE_RP5,
PCI_DEVICE_ID_INTEL_LPT_H_PCIE_RP6,
PCI_DEVICE_ID_INTEL_LPT_H_PCIE_RP7,
PCI_DEVICE_ID_INTEL_LPT_H_PCIE_RP8,
PCI_DEVICE_ID_INTEL_LPT_LP_PCIE_RP1,
PCI_DEVICE_ID_INTEL_LPT_LP_PCIE_RP2,
PCI_DEVICE_ID_INTEL_LPT_LP_PCIE_RP3,
PCI_DEVICE_ID_INTEL_LPT_LP_PCIE_RP4,
PCI_DEVICE_ID_INTEL_LPT_LP_PCIE_RP5,
PCI_DEVICE_ID_INTEL_LPT_LP_PCIE_RP6,
0 0
}; };

View File

@@ -214,9 +214,22 @@ static struct device_operations sata_ops = {
}; };
static const unsigned short pci_device_ids[] = { static const unsigned short pci_device_ids[] = {
0x8c00, 0x8c02, 0x8c04, 0x8c06, 0x8c08, 0x8c0e, /* Desktop */ PCI_DEVICE_ID_INTEL_LPT_H_DESKTOP_SATA_IDE,
0x8c01, 0x8c03, 0x8c05, 0x8c07, 0x8c09, 0x8c0f, /* Mobile */ PCI_DEVICE_ID_INTEL_LPT_H_DESKTOP_SATA_AHCI,
0x9c03, 0x9c05, 0x9c07, 0x9c0f, /* Low Power */ PCI_DEVICE_ID_INTEL_LPT_H_DESKTOP_SATA_RAID_1,
PCI_DEVICE_ID_INTEL_LPT_H_DESKTOP_SATA_RAID_PREM,
PCI_DEVICE_ID_INTEL_LPT_H_DESKTOP_SATA_IDE_P45,
PCI_DEVICE_ID_INTEL_LPT_H_DESKTOP_SATA_RAID_2,
PCI_DEVICE_ID_INTEL_LPT_H_MOBILE_SATA_IDE,
PCI_DEVICE_ID_INTEL_LPT_H_MOBILE_SATA_AHCI,
PCI_DEVICE_ID_INTEL_LPT_H_MOBILE_SATA_RAID_1,
PCI_DEVICE_ID_INTEL_LPT_H_MOBILE_SATA_RAID_PREM,
PCI_DEVICE_ID_INTEL_LPT_H_MOBILE_SATA_IDE_P45,
PCI_DEVICE_ID_INTEL_LPT_H_MOBILE_SATA_RAID_2,
PCI_DEVICE_ID_INTEL_LPT_LP_SATA_AHCI,
PCI_DEVICE_ID_INTEL_LPT_LP_SATA_RAID_1,
PCI_DEVICE_ID_INTEL_LPT_LP_SATA_RAID_PREM,
PCI_DEVICE_ID_INTEL_LPT_LP_SATA_RAID_2,
0 0
}; };

View File

@@ -228,14 +228,14 @@ static struct device_operations device_ops = {
}; };
static const unsigned short pci_device_ids[] = { static const unsigned short pci_device_ids[] = {
0x9c60, /* 0:15.0 - SDMA */ PCI_DEVICE_ID_INTEL_LPT_LP_SDMA,
0x9c61, /* 0:15.1 - I2C0 */ PCI_DEVICE_ID_INTEL_LPT_LP_I2C0,
0x9c62, /* 0:15.2 - I2C1 */ PCI_DEVICE_ID_INTEL_LPT_LP_I2C1,
0x9c65, /* 0:15.3 - SPI0 */ PCI_DEVICE_ID_INTEL_LPT_LP_GSPI0,
0x9c66, /* 0:15.4 - SPI1 */ PCI_DEVICE_ID_INTEL_LPT_LP_GSPI1,
0x9c63, /* 0:15.5 - UART0 */ PCI_DEVICE_ID_INTEL_LPT_LP_UART0,
0x9c64, /* 0:15.6 - UART1 */ PCI_DEVICE_ID_INTEL_LPT_LP_UART1,
0x9c35, /* 0:17.0 - SDIO */ PCI_DEVICE_ID_INTEL_LPT_LP_SD,
0 0
}; };

View File

@@ -80,7 +80,8 @@ static struct device_operations smbus_ops = {
}; };
static const unsigned short pci_device_ids[] = { static const unsigned short pci_device_ids[] = {
0x8c22, 0x9c22, PCI_DEVICE_ID_INTEL_LPT_H_SMBUS,
PCI_DEVICE_ID_INTEL_LPT_LP_SMBUS,
0 0
}; };

View File

@@ -169,7 +169,12 @@ static struct device_operations usb_ehci_ops = {
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
}; };
static const unsigned short pci_device_ids[] = { 0x9c26, 0x8c26, 0x8c2d, 0 }; static const unsigned short pci_device_ids[] = {
PCI_DEVICE_ID_INTEL_LPT_LP_EHCI,
PCI_DEVICE_ID_INTEL_LPT_H_EHCI_1,
PCI_DEVICE_ID_INTEL_LPT_H_EHCI_2,
0
};
static const struct pci_driver pch_usb_ehci __pci_driver = { static const struct pci_driver pch_usb_ehci __pci_driver = {
.ops = &usb_ehci_ops, .ops = &usb_ehci_ops,

View File

@@ -342,9 +342,11 @@ static struct device_operations usb_xhci_ops = {
.ops_pci = &pci_dev_ops_pci, .ops_pci = &pci_dev_ops_pci,
}; };
static const unsigned short pci_device_ids[] = { 0x8c31, /* LynxPoint-H */ static const unsigned short pci_device_ids[] = {
0x9c31, /* LynxPoint-LP */ PCI_DEVICE_ID_INTEL_LPT_H_XHCI,
0 }; PCI_DEVICE_ID_INTEL_LPT_LP_XHCI,
0
};
static const struct pci_driver pch_usb_xhci __pci_driver = { static const struct pci_driver pch_usb_xhci __pci_driver = {
.ops = &usb_xhci_ops, .ops = &usb_xhci_ops,