diff options
author | Myles Watson <mylesgw@gmail.com> | 2010-07-06 20:36:36 +0000 |
---|---|---|
committer | Myles Watson <mylesgw@gmail.com> | 2010-07-06 20:36:36 +0000 |
commit | 8376831eafc1be1175529fd21e0d2fe40339d4eb (patch) | |
tree | 6d1339712204c3376364fd69ed80116675dd53d6 /src/northbridge/amd | |
parent | 106f7ffadf0a5a95b7f465607e9b9cac0a24647e (diff) | |
download | coreboot-8376831eafc1be1175529fd21e0d2fe40339d4eb.tar.xz |
A bug fix:
Fix the ctrl_devport_conf_clear to clear the enable bit.
A simplification:
Dynamically enable ck804s that are found instead of relying on #defines.
Removing an Opteron changes the number of ck804s that are present.
Simple changes to make it easier to compare the factory BIOS with Coreboot when
using SerialICE for boards with the Nvidia ck804 chipset:
If the mask is zero, don't read the value, just write the new value over it.
Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Myles Watson <mylesgw@gmail.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5652 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/northbridge/amd')
-rw-r--r-- | src/northbridge/amd/amdk8/setup_resource_map.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/northbridge/amd/amdk8/setup_resource_map.c b/src/northbridge/amd/amdk8/setup_resource_map.c index 82622cdc4c..e5fda596e7 100644 --- a/src/northbridge/amd/amdk8/setup_resource_map.c +++ b/src/northbridge/amd/amdk8/setup_resource_map.c @@ -15,7 +15,8 @@ static void setup_resource_map_offset(const unsigned int *register_values, int m #endif dev = (register_values[i] & ~0xfff) + offset_pci_dev; where = register_values[i] & 0xfff; - reg = pci_read_config32(dev, where); + if (register_values[i+1]) + reg = pci_read_config32(dev, where); reg &= register_values[i+1]; reg |= register_values[i+2] + offset_io_base; pci_write_config32(dev, where, reg); @@ -60,7 +61,8 @@ static void setup_resource_map_x_offset(const unsigned int *register_values, int unsigned long reg; dev = (register_values[i+1] & ~0xfff) + offset_pci_dev; where = register_values[i+1] & 0xfff; - reg = pci_read_config32(dev, where); + if (register_values[i+2]) + reg = pci_read_config32(dev, where); reg &= register_values[i+2]; reg |= register_values[i+3]; pci_write_config32(dev, where, reg); @@ -71,7 +73,8 @@ static void setup_resource_map_x_offset(const unsigned int *register_values, int unsigned where; unsigned reg; where = register_values[i+1] + offset_io_base; - reg = inb(where); + if (register_values[i+2]) + reg = inb(where); reg &= register_values[i+2]; reg |= register_values[i+3]; outb(reg, where); @@ -82,7 +85,8 @@ static void setup_resource_map_x_offset(const unsigned int *register_values, int unsigned where; unsigned long reg; where = register_values[i+1] + offset_io_base; - reg = inl(where); + if (register_values[i+2]) + reg = inl(where); reg &= register_values[i+2]; reg |= register_values[i+3]; outl(reg, where); |