Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8352
-gerrit
commit 3f27d042e0a94be59b8a3d4724ef1d685accaaa6
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Thu Feb 5 08:22:26 2015 +0200
AMD K8 fam10: Fix preprocessor use with SB_HT_CHAIN_ON_BUS0
Change-Id: I6bbd1b5eaa66a640e0a2e132c8d67f38f103caf5
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/northbridge/amd/amdfam10/northbridge.c | 36 +++++++++++++-----------------
src/northbridge/amd/amdk8/northbridge.c | 28 +++++++++--------------
2 files changed, 26 insertions(+), 38 deletions(-)
diff --git a/src/northbridge/amd/amdfam10/northbridge.c b/src/northbridge/amd/amdfam10/northbridge.c
index f339558..0a69d4d 100644
--- a/src/northbridge/amd/amdfam10/northbridge.c
+++ b/src/northbridge/amd/amdfam10/northbridge.c
@@ -197,29 +197,25 @@ static u32 amdfam10_scan_chain(device_t dev, u32 nodeid, struct bus *link, bool
* 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
- // first chain will on bus 0
- if (is_sblink) { // actually max is 0 here
- min_bus = max;
- }
- #if CONFIG_SB_HT_CHAIN_ON_BUS0 > 1
- // second chain will be on 0x40, third 0x80, forth 0xc0
- // 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 {
+
+ if (CONFIG_SB_HT_CHAIN_ON_BUS0 == 0) {
+ min_bus = ++max;
+ } else if (is_sblink) {
+ // first chain will on bus 0
+ min_bus = max; /* actually max is 0 here */
+ } else if (CONFIG_SB_HT_CHAIN_ON_BUS0 == 1) {
+ min_bus = ++max;
+ } else if (CONFIG_SB_HT_CHAIN_ON_BUS0 > 1) {
+ // second chain will be on 0x40, third 0x80, forth 0xc0
+ // 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.
+
// one node can have 8 link and segn is the same
min_bus = (((max & 0xff)>>3) + 1) << 3;
+ max = min_bus | (segn<<8);
}
- max = min_bus | (segn<<8);
- #else
- //other ...
- else {
- min_bus = ++max;
- }
- #endif
-#else
- min_bus = ++max;
-#endif
link->secondary = min_bus;
link->subordinate = (segn<<8) | 0xfc;
diff --git a/src/northbridge/amd/amdk8/northbridge.c b/src/northbridge/amd/amdk8/northbridge.c
index 31149cf..d96e113 100644
--- a/src/northbridge/amd/amdk8/northbridge.c
+++ b/src/northbridge/amd/amdk8/northbridge.c
@@ -140,26 +140,18 @@ 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
- // first chain will on bus 0
- if(is_sblink) { // actually max is 0 here
- min_bus = max;
- }
- #if CONFIG_SB_HT_CHAIN_ON_BUS0 > 1
- // second chain will be on 0x40, third 0x80, forth 0xc0
- else {
- min_bus = ((max>>6) + 1) * 0x40;
- }
- max = min_bus;
- #else
- //other ...
- else {
+ if (CONFIG_SB_HT_CHAIN_ON_BUS0 == 0) {
+ min_bus = ++max;
+ } else if (is_sblink) {
+ // first chain will on bus 0
+ min_bus = max; /* actually max is 0 here */
+ } else if (CONFIG_SB_HT_CHAIN_ON_BUS0 == 1) {
min_bus = ++max;
+ } else if (CONFIG_SB_HT_CHAIN_ON_BUS0 > 1) {
+ // second chain will be on 0x40, third 0x80, forth 0xc0
+ min_bus = (max & ~0x3f) + 0x40;
+ max = min_bus;
}
- #endif
-#else
- min_bus = ++max;
-#endif
link->secondary = min_bus;
link->subordinate = 0xff;
the following patch was just integrated into master:
commit c3f6bb086beeaca831877813589dc298faaa5dbe
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Tue Feb 3 12:18:02 2015 +0200
AMD HyperTransport: Drop unused link optimisation
Change-Id: Ia4398f6eb013c69838487bdd02d094f97d7224b6
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-on: http://review.coreboot.org/8342
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
See http://review.coreboot.org/8342 for details.
-gerrit
the following patch was just integrated into master:
commit 08e39c572f36f503e782cb810e9d34c008ddd990
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Tue Feb 3 09:17:44 2015 +0200
AMD K8: Remove some excessive preprocessor use
Tests on CPUID are valid regardless of revision.
Change-Id: I5a3a01baca2c0ecfb018ca7965994ba74889a2e2
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-on: http://review.coreboot.org/8337
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
See http://review.coreboot.org/8337 for details.
-gerrit
the following patch was just integrated into master:
commit 9bc83888ad7bd26d78ae54358b093b0e96bfb8a6
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Wed Feb 4 08:56:09 2015 +0200
newisys/khepri broadcom/blast: Drop duplicate entry in Kconfig
Keep the value that is listed first, it also the one with a more
recent change.
Change-Id: I0336c962544d75f94512563c08f280aa43c7a175
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-on: http://review.coreboot.org/8336
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
See http://review.coreboot.org/8336 for details.
-gerrit
the following patch was just integrated into master:
commit 09b5e4d005a29dc244ae9e86a76a7616795722a5
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Mon Feb 2 16:39:59 2015 +0200
AMD8131: Remove obsolete directory
Change-Id: I875384e55a4a71d1a5c962d128d13356f3befa56
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-on: http://review.coreboot.org/8335
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
See http://review.coreboot.org/8335 for details.
-gerrit