diff options
author | Stefan Reinauer <stepan@openbios.org> | 2005-12-04 21:52:58 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2005-12-04 21:52:58 +0000 |
commit | bbdd8f4a9f206ca40dea2b15d9458ac048de6c64 (patch) | |
tree | b384ee864e61387679ce31c484090d641d225e30 /src/northbridge/amd/amdk8/northbridge.c | |
parent | e38a19372009f39a8814cdee05faf0251640489c (diff) |
1203_hcdn.diff:
store every HT device unit id base and pass those info to acpi
https://openbios.org/roundup/linuxbios/issue46
Note: This version drops the two scripts a and c and creates the dsdt on
the fly from Config.lb using makerule
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2134 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/northbridge/amd/amdk8/northbridge.c')
-rw-r--r-- | src/northbridge/amd/amdk8/northbridge.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/northbridge/amd/amdk8/northbridge.c b/src/northbridge/amd/amdk8/northbridge.c index d2db902beb..d7d2f2daf1 100644 --- a/src/northbridge/amd/amdk8/northbridge.c +++ b/src/northbridge/amd/amdk8/northbridge.c @@ -97,6 +97,8 @@ static unsigned int amdk8_nodeid(device_t dev) return (dev->path.u.pci.devfn >> 3) - 0x18; } +unsigned hcdn_reg[4]; // it will be used by get_sblk_pci1234 + static unsigned int amdk8_scan_chain(device_t dev, unsigned nodeid, unsigned link, unsigned sblink, unsigned int max, unsigned offset_unitid) { #if 0 @@ -107,8 +109,11 @@ static unsigned int amdk8_scan_chain(device_t dev, unsigned nodeid, unsigned lin uint32_t link_type; + int i; uint32_t busses, config_busses; unsigned free_reg, config_reg; + unsigned ht_unitid_base[4]; // here assume only 4 HT device on chain + dev->link[link].cap = 0x80 + (link *0x20); do { link_type = pci_read_config32(dev, dev->link[link].cap + 0x18); @@ -195,7 +200,10 @@ static unsigned int amdk8_scan_chain(device_t dev, unsigned nodeid, unsigned lin /* Now we can scan all of the subordinate busses i.e. the * chain on the hypertranport link */ - max = hypertransport_scan_chain(&dev->link[link], 0, 0xbf, max, offset_unitid); + for(i=0;i<4;i++) { + ht_unitid_base[i] = 0x20; + } + max = hypertransport_scan_chain(&dev->link[link], 0, 0xbf, max, ht_unitid_base, offset_unitid); #if 0 printk_debug("%s Hyper transport scan link: %d new max: %d\n", @@ -214,6 +222,19 @@ static unsigned int amdk8_scan_chain(device_t dev, unsigned nodeid, unsigned lin (dev->link[link].subordinate << 24); f1_write_config32(config_reg, config_busses); + { + // config config_reg, and ht_unitid_base to update hcdn_reg; + int index; + unsigned temp = 0; + index = (config_reg-0xe0) >> 2; + for(i=0;i<4;i++) { + temp |= (ht_unitid_base[i] & 0xff) << (i*8); + } + + hcdn_reg[index] = temp; + + } + #if 0 printk_debug("%s Hypertransport scan link: %d done\n", dev_path(dev), link); |