aboutsummaryrefslogtreecommitdiff
path: root/src/soc/amd/stoneyridge/northbridge.c
diff options
context:
space:
mode:
authorRichard Spiegel <richard.spiegel@amd.corp-partner.google.com>2019-06-28 09:18:47 -0700
committerPatrick Georgi <pgeorgi@google.com>2019-07-31 09:11:05 +0000
commit9247e86f288fadf2fcff4b61a64f05cbf6e60b1e (patch)
treecb433b52ead9ca8c50a6d62f3c796702ccb62be3 /src/soc/amd/stoneyridge/northbridge.c
parentcac5e9472622f43c0b33d70f20adef801b345773 (diff)
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>
Diffstat (limited to 'src/soc/amd/stoneyridge/northbridge.c')
-rw-r--r--src/soc/amd/stoneyridge/northbridge.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/soc/amd/stoneyridge/northbridge.c b/src/soc/amd/stoneyridge/northbridge.c
index 5985832c81..044a1b05ca 100644
--- a/src/soc/amd/stoneyridge/northbridge.c
+++ b/src/soc/amd/stoneyridge/northbridge.c
@@ -347,10 +347,15 @@ static struct device_operations northbridge_operations = {
.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 @@ void domain_set_resources(struct device *dev)
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",