soc/amd/stoneyridge: Change code to accommodate Merlin Falcon SOC
Stoney Ridge is family 15h models 70h-7Fh, Merlin Falcon is family 15h models
60h-6Fh. Add changes based on config parameter SOC_AMD_MERLINFALCON to make
the code backward compatible with Merlin Falcon.
BUG=none.
TEST=Tested later with padmelon board.
Change-Id: I00fe832324500bcb07fca292a0a55f7258a2d82f
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33624
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/soc/amd/stoneyridge/northbridge.c b/src/soc/amd/stoneyridge/northbridge.c
index 5985832..044a1b0 100644
--- a/src/soc/amd/stoneyridge/northbridge.c
+++ b/src/soc/amd/stoneyridge/northbridge.c
@@ -347,10 +347,15 @@
.ops_pci = 0,
};
+static const unsigned short pci_device_ids[] = {
+ PCI_DEVICE_ID_AMD_15H_MODEL_606F_NB_HT,
+ PCI_DEVICE_ID_AMD_15H_MODEL_707F_NB_HT,
+ 0 };
+
static const struct pci_driver family15_northbridge __pci_driver = {
.ops = &northbridge_operations,
.vendor = PCI_VENDOR_ID_AMD,
- .device = PCI_DEVICE_ID_AMD_15H_MODEL_707F_NB_HT,
+ .devices = pci_device_ids,
};
/*
@@ -464,9 +469,13 @@
u32 map_oprom_vendev(u32 vendev)
{
u32 new_vendev;
- new_vendev =
- ((vendev >= 0x100298e0) && (vendev <= 0x100298ef)) ?
- 0x100298e0 : vendev;
+
+ if ((vendev >= 0x100298e0) && (vendev <= 0x100298ef))
+ new_vendev = 0x100298e0;
+ else if ((vendev >= 0x10029870) && (vendev <= 0x1002987f))
+ new_vendev = 0x10029870;
+ else
+ new_vendev = vendev;
if (vendev != new_vendev)
printk(BIOS_NOTICE, "Mapping PCI device %8x to %8x\n",