aboutsummaryrefslogtreecommitdiff
path: root/src/northbridge/amd/agesa/family16kb/northbridge.c
diff options
context:
space:
mode:
authorBruce Griffith <Bruce.Griffith@se-eng.com>2013-07-07 02:06:53 -0600
committerBruce Griffith <Bruce.Griffith@se-eng.com>2013-08-05 22:13:20 +0200
commit76db07e8c20b1e419ceeaf14eb23c7675839067a (patch)
treed606a85ffdc63d576924b28f3641783b84b12516 /src/northbridge/amd/agesa/family16kb/northbridge.c
parent17933e8bc17f04a876a51198dabcc2363f4ee334 (diff)
AMD Kabini: Add map_oprom() function for Vendor/Device IDs
Change-Id: I14285f0677003fbf8b9b112207af202658807894 Reviewed-by: Marc Jones <marc.jones@se-eng.com> Signed-off-by: Bruce Griffith <Bruce.Griffith@se-eng.com> Reviewed-by: Bruce Griffith <bruce.griffith@se-eng.com> Tested-by: Bruce Griffith <bruce.griffith@se-eng.com> Reviewed-on: http://review.coreboot.org/3806 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martin.roth@se-eng.com>
Diffstat (limited to 'src/northbridge/amd/agesa/family16kb/northbridge.c')
-rw-r--r--src/northbridge/amd/agesa/family16kb/northbridge.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/northbridge/amd/agesa/family16kb/northbridge.c b/src/northbridge/amd/agesa/family16kb/northbridge.c
index bed7febc3e..c27a1b2814 100644
--- a/src/northbridge/amd/agesa/family16kb/northbridge.c
+++ b/src/northbridge/amd/agesa/family16kb/northbridge.c
@@ -1144,3 +1144,35 @@ struct chip_operations northbridge_amd_agesa_family16kb_root_complex_ops = {
CHIP_NAME("AMD FAM16 Root Complex")
.enable_dev = root_complex_enable_dev,
};
+
+/*********************************************************************
+ * Change the vendor / device IDs to match the generic VBIOS header. *
+ *********************************************************************/
+u32 map_oprom_vendev(u32 vendev)
+{
+ u32 new_vendev = vendev;
+
+ switch(vendev) {
+ case 0x10029830:
+ case 0x10029831:
+ case 0x10029832:
+ case 0x10029833:
+ case 0x10029834:
+ case 0x10029835:
+ case 0x10029836:
+ case 0x10029837:
+ case 0x10029838:
+ case 0x10029839:
+ case 0x1002983A:
+ case 0x1002983D:
+ new_vendev = 0x10029830; // This is the default value in AMD-generated VBIOS
+ break;
+ default:
+ break;
+ }
+
+ if (vendev != new_vendev)
+ printk(BIOS_NOTICE, "Mapping PCI device %8x to %8x\n", vendev, new_vendev);
+
+ return new_vendev;
+}