Kyösti Mälkki (kyosti.malkki@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8559
-gerrit
commit 2e6358f8883f1ef4f62026bb4e6665090cbf4990 Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Sat Feb 21 11:19:01 2015 +0200
AMD K8: Refactor calls for HT configuration
Change-Id: I24ca1dce025e00064f9209affa27586292c7650e Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- src/northbridge/amd/amdk8/northbridge.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/src/northbridge/amd/amdk8/northbridge.c b/src/northbridge/amd/amdk8/northbridge.c index 3696f5d..208a725 100644 --- a/src/northbridge/amd/amdk8/northbridge.c +++ b/src/northbridge/amd/amdk8/northbridge.c @@ -213,19 +213,16 @@ static u32 amdk8_scan_chain(device_t dev, u32 nodeid, struct bus *link, bool is_ (link->subordinate << 24); f1_write_config32(config_reg, config_busses);
- { - // use config_reg and ht_unitid_base to update hcdn_reg - int index; - u32 temp = 0; - index = (config_reg-0xe0) >> 2; - for(i=0;i<4;i++) { - temp |= (ht_unitid_base[i] & 0xff) << (i*8); - }
- sysconf.hcdn_reg[index] = temp; + // use config_reg and ht_unitid_base to update hcdn_reg + link->hcdn_reg = 0; + for (i = 0; i < 4; i++) + link->hcdn_reg |= (ht_unitid_base[i] & 0xff) << (i*8);
- } - return max; + int index = (config_reg-0xe0) >> 2; + sysconf.hcdn_reg[index] = link->hcdn_reg; + + return max; }
static unsigned amdk8_scan_chains(device_t dev, unsigned max)