diff options
Diffstat (limited to 'src/northbridge/amd/amdfam10')
-rw-r--r-- | src/northbridge/amd/amdfam10/northbridge.c | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/src/northbridge/amd/amdfam10/northbridge.c b/src/northbridge/amd/amdfam10/northbridge.c index 84f255378e..ce97f62cc5 100644 --- a/src/northbridge/amd/amdfam10/northbridge.c +++ b/src/northbridge/amd/amdfam10/northbridge.c @@ -288,37 +288,27 @@ static unsigned amdfam10_scan_chains(device_t dev, unsigned max) unsigned nodeid; struct bus *link; unsigned sblink = sysconf.sblk; - unsigned offset_unitid = 0; nodeid = amdfam10_nodeid(dev); -// Put sb chain in bus 0 -#if CONFIG_SB_HT_CHAIN_ON_BUS0 > 0 - if(nodeid==0) { - #if ((CONFIG_HT_CHAIN_UNITID_BASE != 1) || (CONFIG_HT_CHAIN_END_UNITID_BASE != 0x20)) - offset_unitid = 1; - #endif - for (link = dev->link_list; link; link = link->next) - if (link->link_num == sblink) - max = amdfam10_scan_chain(dev, nodeid, link, sblink, sblink, max, offset_unitid ); // do sb ht chain at first, in case s2885 put sb chain (8131/8111) on link2, but put 8151 on link0 + /* Do sb ht chain at first, in case s2885 put sb chain (8131/8111) on link2, but put 8151 on link0 */ + for (link = dev->link_list; link; link = link->next) { + unsigned offset_unitid = (CONFIG_HT_CHAIN_UNITID_BASE != 1) || (CONFIG_HT_CHAIN_END_UNITID_BASE != 0x20); + if ((CONFIG_SB_HT_CHAIN_ON_BUS0 > 0) && (nodeid == 0) && (link->link_num == sblink)) + max = amdfam10_scan_chain(dev, nodeid, link, link->link_num, sblink, max, offset_unitid); } -#endif #if CONFIG_PCI_BUS_SEGN_BITS max = check_segn(dev, max, sysconf.nodes, &sysconf); #endif - for(link = dev->link_list; link; link = link->next) { -#if CONFIG_SB_HT_CHAIN_ON_BUS0 > 0 - if( (nodeid == 0) && (sblink == link->link_num) ) continue; //already done -#endif - offset_unitid = 0; - #if ((CONFIG_HT_CHAIN_UNITID_BASE != 1) || (CONFIG_HT_CHAIN_END_UNITID_BASE != 0x20)) - #if CONFIG_SB_HT_CHAIN_UNITID_OFFSET_ONLY - if((nodeid == 0) && (sblink == link->link_num)) - #endif - offset_unitid = 1; - #endif + for (link = dev->link_list; link; link = link->next) { + if ((CONFIG_SB_HT_CHAIN_ON_BUS0 > 0) && (nodeid == 0) && (link->link_num == sblink)) + continue; + + unsigned offset_unitid = (CONFIG_HT_CHAIN_UNITID_BASE != 1) || (CONFIG_HT_CHAIN_END_UNITID_BASE != 0x20); + offset_unitid = offset_unitid && + (((nodeid == 0) && (sblink == link->link_num)) || !CONFIG_SB_HT_CHAIN_UNITID_OFFSET_ONLY); max = amdfam10_scan_chain(dev, nodeid, link, link->link_num, sblink, max, offset_unitid); } |