summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2003-10-02 18:16:07 +0000
committerRonald G. Minnich <rminnich@gmail.com>2003-10-02 18:16:07 +0000
commitcb3f498296bad22b360796139bc454d141d7ccc9 (patch)
tree34b62e7987a0d39a85da4afc325994fd65c83d89 /src/northbridge
parent53311091a63f3fd63f24e296246e040730dfabbe (diff)
success. It boots as a bproc slave now.
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1176 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/via/vt8601/northbridge.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/northbridge/via/vt8601/northbridge.c b/src/northbridge/via/vt8601/northbridge.c
index 8f5d1730a6..8ad94f01a5 100644
--- a/src/northbridge/via/vt8601/northbridge.c
+++ b/src/northbridge/via/vt8601/northbridge.c
@@ -50,7 +50,54 @@ static void enumerate(struct chip *chip)
chip->dev->ops = &default_pci_ops_bus;
}
+/*
+ * This fixup is based on capturing values from an Award bios. Without
+ * this fixup the DMA write performance is awful (i.e. hdparm -t /dev/hda is 20x
+ * slower than normal, ethernet drops packets).
+ * Apparently these registers govern some sort of bus master behavior.
+ */
+static void
+random_fixup() {
+ device_t *pcidev = dev_find_slot(0, 0);
+
+ printk_spew("VT8601 random fixup ...\n");
+ if (pcidev) {
+ pci_write_config8(pcidev, 0x70, 0xc0);
+ pci_write_config8(pcidev, 0x71, 0x88);
+ pci_write_config8(pcidev, 0x72, 0xec);
+ pci_write_config8(pcidev, 0x73, 0x0c);
+ pci_write_config8(pcidev, 0x74, 0x0e);
+ pci_write_config8(pcidev, 0x75, 0x81);
+ pci_write_config8(pcidev, 0x76, 0x52);
+ }
+}
+
+static void
+northbridge_init(struct chip *chip, enum chip_pass pass)
+{
+
+ struct northbridge_via_vt8601_config *conf =
+ (struct northbridge_via_vt8601_config *)chip->chip_info;
+
+ switch (pass) {
+ case CONF_PASS_PRE_PCI:
+ break;
+
+ case CONF_PASS_POST_PCI:
+ break;
+
+ case CONF_PASS_PRE_BOOT:
+ random_fixup();
+ break;
+
+ default:
+ /* nothing yet */
+ break;
+ }
+}
+
struct chip_control northbridge_via_vt8601_control = {
.enumerate = enumerate,
+ enable: northbridge_init,
.name = "VIA vt8601 Northbridge",
};