summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYinghai Lu <yinghailu@gmail.com>2005-12-08 18:47:33 +0000
committerYinghai Lu <yinghailu@gmail.com>2005-12-08 18:47:33 +0000
commit653ee54a88b4cb45ec22cb3e986043d900b8564a (patch)
tree837e3e4e99e89fc989b410a015cd3e8a7edd2a76 /src
parentc3b360022258c4cfb7413cb88457f0c10ab396fa (diff)
fix bus problem with s2885 with issue 47
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2140 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src')
-rw-r--r--src/northbridge/amd/amdk8/northbridge.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/src/northbridge/amd/amdk8/northbridge.c b/src/northbridge/amd/amdk8/northbridge.c
index 097554f65e..835c83e27b 100644
--- a/src/northbridge/amd/amdk8/northbridge.c
+++ b/src/northbridge/amd/amdk8/northbridge.c
@@ -161,36 +161,30 @@ static unsigned int amdk8_scan_chain(device_t dev, unsigned nodeid, unsigned lin
* so we set the subordinate bus number to 0xff for the moment.
*/
#if K8_SB_HT_CHAIN_ON_BUS0 > 0
- # if K8_SB_HT_CHAIN_ON_BUS0 > 1
- // first chain will on bus 0, second chain will be on 0x40, third 0x80, forth 0xc0
- if(max == 0) {
- min_bus = 0;
- max_bus = 0x3f;
- } else if (max<0x40) {
+ // first chain will on bus 0
+ if((nodeid == 0) && (sblink==link)) { // actually max is 0 here
+ min_bus = max;
+ }
+ #if K8_SB_HT_CHAIN_ON_BUS0 > 1
+ // second chain will be on 0x40, third 0x80, forth 0xc0
+ else if (max<0x40) {
min_bus = 0x40;
- max_bus = 0x7f;
} else if (max<0x80) {
min_bus = 0x80;
- max_bus = 0xbf;
} else {
min_bus = 0xc0;
- max_bus = 0xff;
}
max = min_bus;
#else
- // only sb ht chain will on bus 0, other ...
- if((nodeid == 0) && (sblink==link)) { // actually max is 0 here
- min_bus = max;
- }
+ //other ...
else {
min_bus = ++max;
}
- max_bus = 0xff;
#endif
#else
min_bus = ++max;
- max_bus = 0xff;
#endif
+ max_bus = 0xff;
dev->link[link].secondary = min_bus;
dev->link[link].subordinate = max_bus;
@@ -287,7 +281,7 @@ static unsigned int amdk8_scan_chains(device_t dev, unsigned int max)
if(nodeid==0) {
sblink = (pci_read_config32(dev, 0x64)>>8) & 3;
-#if K8_SB_HT_CHAIN_ON_BUS0 == 1
+#if K8_SB_HT_CHAIN_ON_BUS0 > 0
#if HT_CHAIN_UNITID_BASE != 1
offset_unitid = 1;
#endif
@@ -296,7 +290,7 @@ static unsigned int amdk8_scan_chains(device_t dev, unsigned int max)
}
for(link = 0; link < dev->links; link++) {
-#if K8_SB_HT_CHAIN_ON_BUS0 == 1
+#if K8_SB_HT_CHAIN_ON_BUS0 > 0
if( (nodeid == 0) && (sblink == link) ) continue; //already done
#endif
offset_unitid = 0;