summaryrefslogtreecommitdiff
path: root/src/devices/hypertransport.c
diff options
context:
space:
mode:
authorarch import user (historical) <svn@openbios.org>2005-07-06 17:13:46 +0000
committerarch import user (historical) <svn@openbios.org>2005-07-06 17:13:46 +0000
commit98d0d30f6b8237f888cd44b33292319e3c167a47 (patch)
tree0571a9e863b7a7749c2e4fd5bda7ec080831a73c /src/devices/hypertransport.c
parent577f185d382c8130f20f0ee7e8466ed8bbebbacc (diff)
Revision: linuxbios@linuxbios.org--devel/freebios--devel--2.0--patch-30
Creator: Yinghai Lu <yhlu@tyan.com> Nvidia Ck804 support git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1946 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/devices/hypertransport.c')
-rw-r--r--src/devices/hypertransport.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/devices/hypertransport.c b/src/devices/hypertransport.c
index de5d132263..7bc1c215b8 100644
--- a/src/devices/hypertransport.c
+++ b/src/devices/hypertransport.c
@@ -200,6 +200,16 @@ static void ht_collapse_early_enumeration(struct bus *bus)
continue;
}
+#if 0
+#if CK804_DEVN_BASE==0
+ //CK804 workaround:
+ // CK804 UnitID changes not use
+ if(id == 0x005e10de) {
+ break;
+ }
+#endif
+#endif
+
dummy.vendor = id & 0xffff;
dummy.device = (id >> 16) & 0xffff;
dummy.hdr_type = pci_read_config8(&dummy, PCI_HEADER_TYPE);
@@ -312,8 +322,17 @@ unsigned int hypertransport_scan_chain(struct bus *bus, unsigned int max)
/* Update the Unitid of the current device */
flags = pci_read_config16(dev, pos + PCI_CAP_FLAGS);
flags &= ~0x1f; /* mask out base Unit ID */
- flags |= next_unitid & 0x1f;
- pci_write_config16(dev, pos + PCI_CAP_FLAGS, flags);
+#if CK804_DEVN_BASE==0
+ if(id == 0x005e10de) {
+ next_unitid = 0;
+ }
+ else {
+#endif
+ flags |= next_unitid & 0x1f;
+ pci_write_config16(dev, pos + PCI_CAP_FLAGS, flags);
+#if CK804_DEVN_BASE==0
+ }
+#endif
/* Update the Unitd id in the device structure */
static_count = 1;
@@ -354,6 +373,11 @@ unsigned int hypertransport_scan_chain(struct bus *bus, unsigned int max)
dev_path(dev),
dev->vendor, dev->device,
(dev->enabled? "enabled": "disabled"), next_unitid);
+#if CK804_DEVN_BASE==0
+ if(id == 0x005e10de) {
+ break; // CK804 can not change unitid, so it only can be alone in the link
+ }
+#endif
} while((last_unitid != next_unitid) && (next_unitid <= 0x1f));