[coreboot-gerrit] New patch to review for coreboot: d5cd74f AMD K8 fam10: Drop local is_sblink in scan_chains
Kyösti Mälkki (kyosti.malkki@gmail.com)
gerrit at coreboot.org
Sat Feb 28 16:16:32 CET 2015
Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8564
-gerrit
commit d5cd74f22c1ece903bab7daf3f44d91f6d05680e
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date: Sun Feb 22 08:54:45 2015 +0200
AMD K8 fam10: Drop local is_sblink in scan_chains
We can define is_sblink = (max == 0) as sblink is always the
very first chain we scan.
Change-Id: Ibd6b3ea23954ca919ae148604bca2495e9f8753b
Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
src/northbridge/amd/amdfam10/northbridge.c | 7 +++----
src/northbridge/amd/amdk8/northbridge.c | 6 +++---
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/northbridge/amd/amdfam10/northbridge.c b/src/northbridge/amd/amdfam10/northbridge.c
index e64193d..612c9a6 100644
--- a/src/northbridge/amd/amdfam10/northbridge.c
+++ b/src/northbridge/amd/amdfam10/northbridge.c
@@ -159,7 +159,6 @@ static u32 amdfam10_scan_chain(struct bus *link, u32 max)
u32 max_devfn;
u32 nodeid = amdfam10_nodeid(link->dev);
- bool is_sblink = (nodeid == 0) && (link->link_num == sysconf.sblk);
/* See if there is an available configuration space mapping
* register in function 1.
@@ -172,11 +171,11 @@ static u32 amdfam10_scan_chain(struct bus *link, u32 max)
* so we set the subordinate bus number to 0xff for the moment.
*/
- if (!is_sblink)
+ if (max != 0)
max++;
/* One node can have 8 link and segn is the same. */
- if (CONFIG_HT_CHAIN_DISTRIBUTE && !is_sblink)
+ if (CONFIG_HT_CHAIN_DISTRIBUTE)
max = ALIGN_UP(max, 8);
link->secondary = max;
@@ -200,7 +199,7 @@ static u32 amdfam10_scan_chain(struct bus *link, u32 max)
else
max_devfn = (0x1f<<3) | 7;
- max = hypertransport_scan_chain(link, 0, max_devfn, max, ht_unitid_base, offset_unit_id(is_sblink));
+ max = hypertransport_scan_chain(link, 0, max_devfn, max, ht_unitid_base, offset_unit_id(link->secondary == 0));
/* We know the number of busses behind this bridge. Set the
* subordinate bus number to it's real value
diff --git a/src/northbridge/amd/amdk8/northbridge.c b/src/northbridge/amd/amdk8/northbridge.c
index 44b8e48..4b47eba 100644
--- a/src/northbridge/amd/amdk8/northbridge.c
+++ b/src/northbridge/amd/amdk8/northbridge.c
@@ -142,11 +142,11 @@ static u32 amdk8_scan_chain(struct bus *link, u32 max)
* so we set the subordinate bus number to 0xff for the moment.
*/
- if (!is_sblink)
+ if (max != 0)
max++;
/* Second chain will be on 0x40, third 0x80, forth 0xc0. */
- if (CONFIG_HT_CHAIN_DISTRIBUTE && !is_sblink)
+ if (CONFIG_HT_CHAIN_DISTRIBUTE)
max = ALIGN_UP(max, 0x40);
link->secondary = max;
@@ -176,7 +176,7 @@ static u32 amdk8_scan_chain(struct bus *link, u32 max)
else
max_devfn = (0x1f<<3) | 7;
- max = hypertransport_scan_chain(link, 0, max_devfn, max, ht_unitid_base, offset_unit_id(is_sblink));
+ max = hypertransport_scan_chain(link, 0, max_devfn, max, ht_unitid_base, offset_unit_id(link->secondary == 0));
/* We know the number of busses behind this bridge. Set the
* subordinate bus number to it's real value
More information about the coreboot-gerrit
mailing list