summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chipset_enable.c1
-rw-r--r--sb600spi.c28
2 files changed, 24 insertions, 5 deletions
diff --git a/chipset_enable.c b/chipset_enable.c
index a3b7f8dd..34377928 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -1608,6 +1608,7 @@ const struct penable chipset_enables[] = {
{0x1022, 0x7440, OK, "AMD", "AMD-768", enable_flash_amd_768_8111},
{0x1022, 0x7468, OK, "AMD", "AMD-8111", enable_flash_amd_768_8111},
{0x1022, 0x780e, OK, "AMD", "FCH", enable_flash_sb600},
+ {0x1022, 0x790e, OK, "AMD", "FP4", enable_flash_sb600},
{0x1039, 0x0406, NT, "SiS", "501/5101/5501", enable_flash_sis501},
{0x1039, 0x0496, NT, "SiS", "85C496+497", enable_flash_sis85c496},
{0x1039, 0x0530, OK, "SiS", "530", enable_flash_sis530},
diff --git a/sb600spi.c b/sb600spi.c
index 6bd56798..68f8d8ac 100644
--- a/sb600spi.c
+++ b/sb600spi.c
@@ -149,6 +149,23 @@ static void determine_generation(struct pci_dev *dev)
"Please report this to flashrom@flashrom.org and include this log and\n"
"the output of lspci -nnvx, thanks!.\n", rev);
}
+ } else if (dev->device_id == 0x790e) {
+ struct pci_dev *smbus_dev = pci_dev_find(0x1022, 0x790B);
+ if (smbus_dev == NULL) {
+ msg_pdbg("No SMBus device with ID 1022:790B found.\n");
+ return;
+ }
+ uint8_t rev = pci_read_byte(smbus_dev, PCI_REVISION_ID);
+ if (rev == 0x4a) {
+ amd_gen = CHIPSET_YANGTZE;
+ msg_pdbg("Yangtze detected.\n");
+ } else {
+ msg_pwarn("FCH device found but SMBus revision 0x%02x does not match known values.\n"
+ "Please report this to flashrom@flashrom.org and include this log and\n"
+ "the output of lspci -nnvx, thanks!.\n", rev);
+ }
+
+
#endif
} else
msg_pwarn("%s: Unknown LPC device %" PRIx16 ":%" PRIx16 ".\n"
@@ -646,12 +663,13 @@ int sb600_probe_spi(struct pci_dev *dev)
/* Look for the SMBus device. */
smbus_dev = pci_dev_find(0x1002, 0x4385);
- if (!smbus_dev) {
+ if (!smbus_dev)
smbus_dev = pci_dev_find(0x1022, 0x780b); /* AMD FCH */
- if (!smbus_dev) {
- msg_perr("ERROR: SMBus device not found. Not enabling SPI.\n");
- return ERROR_NONFATAL;
- }
+ if (!smbus_dev)
+ smbus_dev = pci_dev_find(0x1022, 0x790b); /* AMD FP4 */
+ if (!smbus_dev) {
+ msg_perr("ERROR: SMBus device not found. Not enabling SPI.\n");
+ return ERROR_NONFATAL;
}
/* Note about the bit tests below: If a bit is zero, the GPIO is SPI. */