summaryrefslogtreecommitdiff
path: root/src/northbridge/amd
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2015-02-22 09:22:55 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2015-06-05 10:15:05 +0200
commit6326255caa2488d90762470bd0c83b8015c198a9 (patch)
tree4648e8b491307c10dd5779936875f553dbc000a1 /src/northbridge/amd
parent20968c9220b6de6a403c807edb19babc8c3a2eac (diff)
downloadcoreboot-6326255caa2488d90762470bd0c83b8015c198a9.tar.xz
AMD K8 fam10: Eliminate local variables busn and max_bus
Change-Id: I297de09dcf93511acece4441593ef958a390fddb Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/8362 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <edward.ocallaghan@koparo.com> Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Diffstat (limited to 'src/northbridge/amd')
-rw-r--r--src/northbridge/amd/amdfam10/northbridge.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/northbridge/amd/amdfam10/northbridge.c b/src/northbridge/amd/amdfam10/northbridge.c
index ff5dc31a03..fd134a2a80 100644
--- a/src/northbridge/amd/amdfam10/northbridge.c
+++ b/src/northbridge/amd/amdfam10/northbridge.c
@@ -199,11 +199,7 @@ static u32 amdfam10_scan_chain(device_t dev, u32 nodeid, struct bus *link, bool
unsigned int next_unitid;
u32 ht_c_index;
u32 ht_unitid_base[4]; // here assume only 4 HT device on chain
- u32 max_bus;
u32 min_bus;
-#if CONFIG_SB_HT_CHAIN_ON_BUS0 > 1
- u32 busn = max&0xff;
-#endif
u32 max_devfn;
/* Check for connected link. */
@@ -232,7 +228,8 @@ static u32 amdfam10_scan_chain(device_t dev, u32 nodeid, struct bus *link, bool
// i would refined that to 2, 3, 4 ==> 0, 0x, 40, 0x80, 0xc0
// >4 will use more segments, We can have 16 segmment and every segment have 256 bus, For that case need the kernel support mmio pci config.
else {
- min_bus = ((busn>>3) + 1) << 3; // one node can have 8 link and segn is the same
+ /* One node can have 8 link and segn is the same. */
+ min_bus = (((max & 0xff) >> 3) + 1) << 3;
}
max = min_bus;
#else
@@ -244,7 +241,6 @@ static u32 amdfam10_scan_chain(device_t dev, u32 nodeid, struct bus *link, bool
#else
min_bus = ++max;
#endif
- max_bus = 0xfc;
link->secondary = min_bus;
link->subordinate = link->secondary;