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/8561
-gerrit
commit bc3286ff599c335d99b4717a74846ce1e35a4ace
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Thu Feb 5 15:43:23 2015 +0200
AMD K8 fam10: Always have SB_HT_CHAIN_ON_BUS0
Change-Id: I65fad1cfba95f0ee1ed3f7f7a57d874144da1e40
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/northbridge/amd/amdfam10/Kconfig | 3 ---
src/northbridge/amd/amdfam10/northbridge.c | 5 +----
src/northbridge/amd/amdk8/Kconfig | 3 ---
src/northbridge/amd/amdk8/northbridge.c | 5 +----
4 files changed, 2 insertions(+), 14 deletions(-)
diff --git a/src/northbridge/amd/amdfam10/Kconfig b/src/northbridge/amd/amdfam10/Kconfig
index fa8a26a..0987a1f 100644
--- a/src/northbridge/amd/amdfam10/Kconfig
+++ b/src/northbridge/amd/amdfam10/Kconfig
@@ -64,9 +64,6 @@ config SB_HT_CHAIN_UNITID_OFFSET_ONLY
bool
default n
-config SB_HT_CHAIN_ON_BUS0
- def_bool y
-
config HT_CHAIN_DISTRIBUTE
def_bool n
diff --git a/src/northbridge/amd/amdfam10/northbridge.c b/src/northbridge/amd/amdfam10/northbridge.c
index 8586b60..cc8e0c5 100644
--- a/src/northbridge/amd/amdfam10/northbridge.c
+++ b/src/northbridge/amd/amdfam10/northbridge.c
@@ -216,7 +216,7 @@ 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 || !is_sblink)
+ if (!is_sblink)
max++;
/* One node can have 8 link and segn is the same. */
@@ -280,9 +280,6 @@ static void relocate_sb_ht_chain(void)
struct bus *link, *prev = NULL;
u8 sblink;
- if (!CONFIG_SB_HT_CHAIN_ON_BUS0)
- return;
-
dev = dev_find_slot(CONFIG_CBB, PCI_DEVFN(CONFIG_CDB, 0));
sblink = (pci_read_config32(dev, 0x64)>>8) & 7;
link = dev->link_list;
diff --git a/src/northbridge/amd/amdk8/Kconfig b/src/northbridge/amd/amdk8/Kconfig
index b293ce3..21d3c29 100644
--- a/src/northbridge/amd/amdk8/Kconfig
+++ b/src/northbridge/amd/amdk8/Kconfig
@@ -64,9 +64,6 @@ config SB_HT_CHAIN_UNITID_OFFSET_ONLY
bool
default n
-config SB_HT_CHAIN_ON_BUS0
- def_bool y
-
config HT_CHAIN_DISTRIBUTE
def_bool n
diff --git a/src/northbridge/amd/amdk8/northbridge.c b/src/northbridge/amd/amdk8/northbridge.c
index b46e104..8533d0e 100644
--- a/src/northbridge/amd/amdk8/northbridge.c
+++ b/src/northbridge/amd/amdk8/northbridge.c
@@ -179,7 +179,7 @@ static u32 amdk8_scan_chain(device_t dev, u32 nodeid, struct bus *link, bool is_
* so we set the subordinate bus number to 0xff for the moment.
*/
- if (!CONFIG_SB_HT_CHAIN_ON_BUS0 || !is_sblink)
+ if (!is_sblink)
max++;
/* Second chain will be on 0x40, third 0x80, forth 0xc0. */
@@ -249,9 +249,6 @@ static void relocate_sb_ht_chain(void)
struct bus *link, *prev = NULL;
u8 sblink;
- if (!CONFIG_SB_HT_CHAIN_ON_BUS0)
- return;
-
dev = dev_find_slot(CONFIG_CBB, PCI_DEVFN(CONFIG_CDB, 0));
sblink = (pci_read_config32(dev, 0x64)>>8) & 3;
link = dev->link_list;
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/8364
-gerrit
commit cbf518b2acc4b4991914aa7a9f507c1f3cd89605
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Thu Feb 5 08:12:20 2015 +0200
AMD K8 fam10: Eliminate local variable min_bus
Some cases of max==0xff wrapping around the 8-bit link->secondary
register remain to be solved.
Change-Id: I01e2ab6b2f23a03dbac49207ab584eccd1ca9b1f
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/northbridge/amd/amdfam10/northbridge.c | 17 ++++++-----------
src/northbridge/amd/amdk8/northbridge.c | 14 ++++++--------
2 files changed, 12 insertions(+), 19 deletions(-)
diff --git a/src/northbridge/amd/amdfam10/northbridge.c b/src/northbridge/amd/amdfam10/northbridge.c
index 68bf336..fb7020a 100644
--- a/src/northbridge/amd/amdfam10/northbridge.c
+++ b/src/northbridge/amd/amdfam10/northbridge.c
@@ -199,7 +199,6 @@ 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 min_bus;
u32 max_devfn;
/* Check for connected link. */
@@ -220,22 +219,18 @@ static u32 amdfam10_scan_chain(device_t dev, u32 nodeid, struct bus *link, bool
*/
if (CONFIG_SB_HT_CHAIN_ON_BUS0 == 0) {
- min_bus = ++max;
+ 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;
+ 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;
+ max++;
+ max = ALIGN_UP(max, 8);
}
link->secondary = min_bus;
@@ -255,7 +250,7 @@ static u32 amdfam10_scan_chain(device_t dev, u32 nodeid, struct bus *link, bool
}
//if ext conf is enabled, only need use 0x1f
- if (min_bus == 0)
+ if (link->secondary == 0)
max_devfn = (0x17<<3) | 7;
else
max_devfn = (0x1f<<3) | 7;
diff --git a/src/northbridge/amd/amdk8/northbridge.c b/src/northbridge/amd/amdk8/northbridge.c
index b27404e..9907a6b 100644
--- a/src/northbridge/amd/amdk8/northbridge.c
+++ b/src/northbridge/amd/amdk8/northbridge.c
@@ -141,7 +141,6 @@ static u32 amdk8_scan_chain(device_t dev, u32 nodeid, struct bus *link, bool is_
u32 config_busses;
u32 free_reg, config_reg;
u32 ht_unitid_base[4]; // here assume only 4 HT device on chain
- u32 min_bus;
u32 max_devfn;
link->cap = 0x80 + (link->link_num * 0x20);
@@ -180,16 +179,15 @@ static u32 amdk8_scan_chain(device_t dev, u32 nodeid, struct bus *link, bool is_
* so we set the subordinate bus number to 0xff for the moment.
*/
if (CONFIG_SB_HT_CHAIN_ON_BUS0 == 0) {
- min_bus = ++max;
+ 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;
+ 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;
+ max++;
+ max = ALIGN_UP(max, 0x40);
}
link->secondary = min_bus;
@@ -214,7 +212,7 @@ static u32 amdk8_scan_chain(device_t dev, u32 nodeid, struct bus *link, bool is_
ht_unitid_base[i] = 0x20;
}
- if (min_bus == 0)
+ if (link->secondary == 0)
max_devfn = (0x17<<3) | 7;
else
max_devfn = (0x1f<<3) | 7;
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/8365
-gerrit
commit 66ece61a05888aac5f62f3867414fdc46017a5d4
Author: Kyösti Mälkki <kyosti.malkki(a)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(a)gmail.com>
---
src/northbridge/amd/amdfam10/northbridge.c | 14 +++-----------
src/northbridge/amd/amdk8/northbridge.c | 12 ++++--------
2 files changed, 7 insertions(+), 19 deletions(-)
diff --git a/src/northbridge/amd/amdfam10/northbridge.c b/src/northbridge/amd/amdfam10/northbridge.c
index d4c5c1f..8503afd 100644
--- a/src/northbridge/amd/amdfam10/northbridge.c
+++ b/src/northbridge/amd/amdfam10/northbridge.c
@@ -216,20 +216,12 @@ 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++;
+ /* One node can have 8 link and segn is the same. */
+ if ((CONFIG_SB_HT_CHAIN_ON_BUS0 > 1) && !is_sblink)
max = ALIGN_UP(max, 8);
- }
link->secondary = min_bus;
link->subordinate = link->secondary;
diff --git a/src/northbridge/amd/amdk8/northbridge.c b/src/northbridge/amd/amdk8/northbridge.c
index 00503ce..edd1e1f 100644
--- a/src/northbridge/amd/amdk8/northbridge.c
+++ b/src/northbridge/amd/amdk8/northbridge.c
@@ -178,17 +178,13 @@ 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++;
+
+ /* Second chain will be on 0x40, third 0x80, forth 0xc0. */
+ if ((CONFIG_SB_HT_CHAIN_ON_BUS0 > 1) && !is_sblink)
max = ALIGN_UP(max, 0x40);
- }
link->secondary = min_bus;
link->subordinate = link->secondary;
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/8362
-gerrit
commit d42ca21fca602f1e3b4b6751131ae46414b9ae15
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Sun Feb 22 09:22:55 2015 +0200
AMD K8 fam10: Eliminate local variables busn and max_bus
Change-Id: I297de09dcf93511acece4441593ef958a390fddb
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/northbridge/amd/amdfam10/northbridge.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/northbridge/amd/amdfam10/northbridge.c b/src/northbridge/amd/amdfam10/northbridge.c
index 2bca59c..29ac5fe 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;
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/8564
-gerrit
commit 5c7a7f79db2651d67db5011c32c557409c20446e
Author: Kyösti Mälkki <kyosti.malkki(a)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(a)gmail.com>
---
src/northbridge/amd/amdfam10/northbridge.c | 9 +++------
src/northbridge/amd/amdk8/northbridge.c | 9 +++------
2 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/src/northbridge/amd/amdfam10/northbridge.c b/src/northbridge/amd/amdfam10/northbridge.c
index 7f1bdec..2dfb8d7 100644
--- a/src/northbridge/amd/amdfam10/northbridge.c
+++ b/src/northbridge/amd/amdfam10/northbridge.c
@@ -179,9 +179,6 @@ static u32 amdfam10_scan_chain(struct bus *link, u32 max)
u32 ht_unitid_base[4]; // here assume only 4 HT device on chain
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.
*/
@@ -193,11 +190,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 = min_bus;
@@ -221,7 +218,7 @@ static u32 amdfam10_scan_chain(struct bus *link, u32 max)
else
max_devfn = (0x1f<<3) | 7;
- next_unitid = hypertransport_scan_chain(link, 0, max_devfn, ht_unitid_base, offset_unit_id(is_sblink));
+ next_unitid = hypertransport_scan_chain(link, 0, max_devfn, ht_unitid_base, offset_unit_id(link->secondary == 0));
/* Now that nothing is overlapping it is safe to scan the children. */
pci_scan_bus(link, 0x00, ((next_unitid - 1) << 3) | 7);
diff --git a/src/northbridge/amd/amdk8/northbridge.c b/src/northbridge/amd/amdk8/northbridge.c
index 8f5b7f9..8db4668 100644
--- a/src/northbridge/amd/amdk8/northbridge.c
+++ b/src/northbridge/amd/amdk8/northbridge.c
@@ -124,10 +124,7 @@ static u32 amdk8_scan_chain(struct bus *link, u32 max)
u32 free_reg, config_reg;
u32 ht_unitid_base[4]; // here assume only 4 HT device on chain
u32 max_devfn;
-
u32 nodeid = amdk8_nodeid(link->dev);
- unsigned int sblink = (pci_read_config32(link->dev, 0x64)>>8) & 3;
- bool is_sblink = (nodeid == 0) && (link->link_num == sblink);
/* See if there is an available configuration space mapping
* register in function 1.
@@ -161,11 +158,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 = min_bus;
@@ -195,7 +192,7 @@ static u32 amdk8_scan_chain(struct bus *link, u32 max)
else
max_devfn = (0x1f<<3) | 7;
- next_unitid = hypertransport_scan_chain(link, 0, max_devfn, ht_unitid_base, offset_unit_id(is_sblink));
+ next_unitid = hypertransport_scan_chain(link, 0, max_devfn, ht_unitid_base, offset_unit_id(link->secondary == 0));
/* Now that nothing is overlapping it is safe to scan the children. */
pci_scan_bus(link, 0x00, ((next_unitid - 1) << 3) | 7);
Felix Held (felix-coreboot(a)felixheld.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10386
-gerrit
commit 2d876b68b82134a8a9b6acfe4bf464c4a4eda3dd
Author: Felix Held <felix-coreboot(a)felixheld.de>
Date: Sun May 31 20:37:04 2015 +0200
superiotool: detect the NCT5572D
Change-Id: I99717072679a51deecd6934ce7fb4aeb45135cd6
Signed-off-by: Felix Held <felix-coreboot(a)felixheld.de>
---
util/superiotool/nuvoton.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/superiotool/nuvoton.c b/util/superiotool/nuvoton.c
index bc95869..4376494 100644
--- a/util/superiotool/nuvoton.c
+++ b/util/superiotool/nuvoton.c
@@ -148,7 +148,7 @@ static const struct superio_registers reg_table[] = {
{0xff,0xff,0xf7,0xff,0xfb,0xcb,0xff,0xff,0xff,
0xff,0x00,0x00,0x00,0x00,0x70,0xff,EOT}},
{EOT}}},
- {0xb473, "NCT6775F (B)", {
+ {0xb473, "NCT6775F (B) / NCT5572D (B) (not all LDNs supported)", {
{NOLDN, NULL,
{0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},