summaryrefslogtreecommitdiff
path: root/src/northbridge/amd/amdk8
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2015-02-04 11:09:52 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2015-02-20 07:03:25 +0100
commit260a6db7ec93c44d266c522f099e35e0116dddd5 (patch)
treee3def9d303aa29aa88331982f497b0230965590d /src/northbridge/amd/amdk8
parentfe57eeb5bfe5413ae704f4ca9ab1ec1286c84a9c (diff)
downloadcoreboot-260a6db7ec93c44d266c522f099e35e0116dddd5.tar.xz
AMD K8 fam10: Drop link_num from scan_chain parameters
Change-Id: Id8fc1d7d8a23238e6848cd2cf4270d782e90a7d3 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/8347 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'src/northbridge/amd/amdk8')
-rw-r--r--src/northbridge/amd/amdk8/northbridge.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/northbridge/amd/amdk8/northbridge.c b/src/northbridge/amd/amdk8/northbridge.c
index ea7bdc05ed..67856590e7 100644
--- a/src/northbridge/amd/amdk8/northbridge.c
+++ b/src/northbridge/amd/amdk8/northbridge.c
@@ -84,7 +84,7 @@ static u32 amdk8_nodeid(device_t dev)
return (dev->path.pci.devfn >> 3) - 0x18;
}
-static u32 amdk8_scan_chain(device_t dev, u32 nodeid, struct bus *link, u32 link_num, u32 sblink,
+static u32 amdk8_scan_chain(device_t dev, u32 nodeid, struct bus *link, u32 sblink,
u32 max, u32 offset_unitid)
{
@@ -97,7 +97,7 @@ static u32 amdk8_scan_chain(device_t dev, u32 nodeid, struct bus *link, u32 link
u32 min_bus;
u32 max_devfn;
- link->cap = 0x80 + (link_num *0x20);
+ link->cap = 0x80 + (link->link_num * 0x20);
do {
link_type = pci_read_config32(dev, link->cap + 0x18);
} while(link_type & ConnectionPending);
@@ -123,7 +123,7 @@ static u32 amdk8_scan_chain(device_t dev, u32 nodeid, struct bus *link, u32 link
}
if (((config & 3) == 3) &&
(((config >> 4) & 7) == nodeid) &&
- (((config >> 8) & 3) == link_num)) {
+ (((config >> 8) & 3) == link->link_num)) {
break;
}
}
@@ -143,7 +143,7 @@ static u32 amdk8_scan_chain(device_t dev, u32 nodeid, struct bus *link, u32 link
*/
#if CONFIG_SB_HT_CHAIN_ON_BUS0 > 0
// first chain will on bus 0
- if((nodeid == 0) && (sblink==link_num)) { // actually max is 0 here
+ if((nodeid == 0) && (sblink==link->link_num)) { // actually max is 0 here
min_bus = max;
}
#if CONFIG_SB_HT_CHAIN_ON_BUS0 > 1
@@ -186,7 +186,7 @@ static u32 amdk8_scan_chain(device_t dev, u32 nodeid, struct bus *link, u32 link
config_busses |=
(3 << 0) | /* rw enable, no device compare */
(( nodeid & 7) << 4) |
- (( link_num & 3 ) << 8) |
+ ((link->link_num & 3) << 8) |
((link->secondary) << 16) |
((link->subordinate) << 24);
f1_write_config32(config_reg, config_busses);
@@ -247,7 +247,7 @@ static unsigned amdk8_scan_chains(device_t dev, unsigned max)
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 = amdk8_scan_chain(dev, nodeid, link, link->link_num, sblink, max, offset_unitid);
+ max = amdk8_scan_chain(dev, nodeid, link, sblink, max, offset_unitid);
}
for (link = dev->link_list; link; link = link->next) {
@@ -258,7 +258,7 @@ static unsigned amdk8_scan_chains(device_t dev, unsigned max)
offset_unitid = offset_unitid &&
(((nodeid == 0) && (sblink == link->link_num)) || !CONFIG_SB_HT_CHAIN_UNITID_OFFSET_ONLY);
- max = amdk8_scan_chain(dev, nodeid, link, link->link_num, sblink, max, offset_unitid);
+ max = amdk8_scan_chain(dev, nodeid, link, sblink, max, offset_unitid);
}
return max;
}