diff options
author | Eric Biederman <ebiederm@xmission.com> | 2003-12-08 21:48:01 +0000 |
---|---|---|
committer | Eric Biederman <ebiederm@xmission.com> | 2003-12-08 21:48:01 +0000 |
commit | 17729a2ebdcd9c014b6fbc6ac7fee948fd24b1d0 (patch) | |
tree | ab557201edac7a22347cb2a9dd4ce15c2d22335f /src/northbridge/amd | |
parent | 0cb44b5cdf6ca00e885ecd70aafac255425cda2b (diff) | |
download | coreboot-17729a2ebdcd9c014b6fbc6ac7fee948fd24b1d0.tar.xz |
- Set all of the fields in config_busses before we use it not afterwards.
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1311 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/northbridge/amd')
-rw-r--r-- | src/northbridge/amd/amdk8/northbridge.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/northbridge/amd/amdk8/northbridge.c b/src/northbridge/amd/amdk8/northbridge.c index c5af05c634..249e497958 100644 --- a/src/northbridge/amd/amdk8/northbridge.c +++ b/src/northbridge/amd/amdk8/northbridge.c @@ -5,6 +5,7 @@ #include <part/sizeram.h> #include <device/device.h> #include <device/pci.h> +#include <device/pci_ids.h> #include <device/hypertransport.h> #include <device/chip.h> #include <stdlib.h> @@ -233,8 +234,12 @@ static unsigned int amdk8_scan_chains(device_t dev, unsigned int max) ((unsigned int)(dev->link[link].subordinate) << 16)); pci_write_config32(dev, dev->link[link].cap + 0x14, busses); - config_busses &= 0x0000ffff; - config_busses |= ((dev->link[link].secondary) << 16) | + config_busses &= 0x000fc88; + config_busses |= + (3 << 0) | /* rw enable, no device compare */ + (( nodeid & 7) << 4) | + (( link & 3 ) << 8) | + ((dev->link[link].secondary) << 16) | ((dev->link[link].subordinate) << 24); f1_write_config32(config_reg, config_busses); @@ -256,13 +261,7 @@ static unsigned int amdk8_scan_chains(device_t dev, unsigned int max) ((unsigned int) (dev->link[link].subordinate) << 16); pci_write_config32(dev, dev->link[link].cap + 0x14, busses); - config_busses &= 0x000fc88; - config_busses |= - (3 << 0) | /* rw enable, no device compare */ - (( nodeid & 7) << 4) | - (( link & 3 ) << 8) | - ((dev->link[link].secondary) << 16) | - ((dev->link[link].subordinate) << 24); + config_busses = (config_busses & 0x00ffffff) | (dev->link[link].subordinate << 24); f1_write_config32(config_reg, config_busses); #if 1 printk_debug("Hypertransport scan link done\n"); @@ -469,7 +468,7 @@ static void amdk8_set_resources(device_t dev) unsigned int amdk8_scan_root_bus(device_t root, unsigned int max) { unsigned reg; - /* Unmap all of HT chains */ + /* Unmap all of the HT chains */ for(reg = 0xe0; reg <= 0xec; reg += 4) { f1_write_config32(reg, 0); } |