[coreboot-gerrit] New patch to review for coreboot: 6aae997 AMD K8 fam10: Refactor logic around SB_HT_CHAIN_ON_BUS0
Kyösti Mälkki (kyosti.malkki@gmail.com)
gerrit at coreboot.org
Thu Feb 5 16:21:45 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/8365
-gerrit
commit 6aae99711d062192e726d62fa2f29f15c87aff57
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date: Thu Feb 5 13:36:54 2015 +0200
AMD K8 fam10: Refactor logic around SB_HT_CHAIN_ON_BUS0
Change-Id: I452a93af452073eeac4e6cb9bbc232dc59e911c1
Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
src/northbridge/amd/amdfam10/northbridge.c | 13 ++-----------
src/northbridge/amd/amdk8/northbridge.c | 11 +++--------
2 files changed, 5 insertions(+), 19 deletions(-)
diff --git a/src/northbridge/amd/amdfam10/northbridge.c b/src/northbridge/amd/amdfam10/northbridge.c
index a81dd82..f400558 100644
--- a/src/northbridge/amd/amdfam10/northbridge.c
+++ b/src/northbridge/amd/amdfam10/northbridge.c
@@ -196,20 +196,11 @@ static u32 amdfam10_scan_chain(device_t dev, u32 nodeid, struct bus *link, bool
* so we set the subordinate bus number to 0xff for the moment.
*/
- if (CONFIG_SB_HT_CHAIN_ON_BUS0 == 0) {
+ if ((CONFIG_SB_HT_CHAIN_ON_BUS0 == 0) || !is_sblink)
max++;
- } else if (is_sblink) {
- } else if (CONFIG_SB_HT_CHAIN_ON_BUS0 == 1) {
- max++;
- } else if (CONFIG_SB_HT_CHAIN_ON_BUS0 > 1) {
- // We can have 16 segmment and every segment have 256 bus,
- // For that case need the kernel support mmio pci config.
-
- // one node can have 8 link and segn is the same
- max++;
+ if ((CONFIG_SB_HT_CHAIN_ON_BUS0 > 1) && !is_sblink)
max = ALIGN_UP(max, 8);
- }
link->secondary = max;
link->subordinate = (max & ~0xff) | 0xfc;
diff --git a/src/northbridge/amd/amdk8/northbridge.c b/src/northbridge/amd/amdk8/northbridge.c
index 8fe38ff..312830a 100644
--- a/src/northbridge/amd/amdk8/northbridge.c
+++ b/src/northbridge/amd/amdk8/northbridge.c
@@ -139,17 +139,12 @@ static u32 amdk8_scan_chain(device_t dev, u32 nodeid, struct bus *link, bool is_
* We have no idea how many busses are behind this bridge yet,
* so we set the subordinate bus number to 0xff for the moment.
*/
- if (CONFIG_SB_HT_CHAIN_ON_BUS0 == 0) {
- max++;
- } else if (is_sblink) {
- } else if (CONFIG_SB_HT_CHAIN_ON_BUS0 == 1) {
- max++;
- } else if (CONFIG_SB_HT_CHAIN_ON_BUS0 > 1) {
- // second chain will be on 0x40, third 0x80, forth 0xc0
+ if ((CONFIG_SB_HT_CHAIN_ON_BUS0 == 0) || !is_sblink)
max++;
+
+ if ((CONFIG_SB_HT_CHAIN_ON_BUS0 > 1) && !is_sblink)
max = ALIGN_UP(max, 0x40);
- }
link->secondary = max;
link->subordinate = 0xff;
More information about the coreboot-gerrit
mailing list