From 2346f26a988cff82abe13ff5330c2377b2167914 Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Fri, 20 Oct 2000 16:54:05 +0000 Subject: [PATCH] Added: open FINAL_MAINBOARD_FIXUP. If this is set, then the function final_mainboard_fixup will be called as the last step in intel_main before calling linuxbiosmain. Added a final_mainboard_fixup function to the winfast mainboard.c added a final_southbridge_fixup to southbridge.c for the sis630. In all cases, this is to get ethernet working until we resolve some problems with the ethernet interface. Problem is is bar0 does not reliably take the address I put into it. If I set 0x2401, sometimes it reads back as 0x2001. This makes linux unhappy, since 0x2001 is already in use. Second, the COMMAND bit probing in linuxpci.c does not realize that the enet device can be a busmaster. So we jam register 0x4 to 0x7. Finally, the interrupt line is getting zero in zero_irq_settings, but the irq table has no info on this device, with the result that the interface comes up with no IRQ. So we set reg 0x3c to 0xb, a known-good value. Ethernet now works fine on my winfast 6300. ron --- romimages/RON_WINFAST6300/Makefile | 1 + src/mainboard/leadtek/winfast6300/mainboard.c | 11 ++++++++--- src/northsouthbridge/sis/630/southbridge.c | 5 +++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/romimages/RON_WINFAST6300/Makefile b/romimages/RON_WINFAST6300/Makefile index 0c0bae7b34..7f95aca669 100644 --- a/romimages/RON_WINFAST6300/Makefile +++ b/romimages/RON_WINFAST6300/Makefile @@ -9,6 +9,7 @@ CPUFLAGS += -DENABLE_FIXED_AND_VARIABLE_MTRRS CPUFLAGS += -DINBUF_COPY CPUFLAGS += -DUSE_DOC_MIL CPUFLAGS += -DCMD_LINE='"root=/dev/hda1 single"' +CPUFLAGS += -DFINAL_MAINBOARD_FIXUP LINUX=$(TOP)/../linux-2.4.0-test6.sis diff --git a/src/mainboard/leadtek/winfast6300/mainboard.c b/src/mainboard/leadtek/winfast6300/mainboard.c index 79334bc574..322593e3dc 100644 --- a/src/mainboard/leadtek/winfast6300/mainboard.c +++ b/src/mainboard/leadtek/winfast6300/mainboard.c @@ -3,7 +3,12 @@ void mainboard_fixup(void) { - void southbridge_fixup(void); - southbridge_fixup(); - printk(KERN_INFO "Mainboard fixup done for Winfast 6300 (and similar)\n"); +} + +void +final_mainboard_fixup(void) +{ + void final_southbridge_fixup(void); + final_southbridge_fixup(); + printk(KERN_INFO "Final mainboard fixup done for Winfast 6300 (and similar)\n"); } diff --git a/src/northsouthbridge/sis/630/southbridge.c b/src/northsouthbridge/sis/630/southbridge.c index c0b129166e..5ca5e71cb0 100644 --- a/src/northsouthbridge/sis/630/southbridge.c +++ b/src/northsouthbridge/sis/630/southbridge.c @@ -82,13 +82,14 @@ void enable_floppy() // simple fixup (which we hope can leave soon) for the sis southbridge part void -southbridge_fixup() +final_southbridge_fixup() { struct pci_dev *pcidev; // ethernet fixup. This should all work, and doesn't, yet. // so we hack it for now. - pcidev = pci_find_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, + // need a manifest constant for the enet device. + pcidev = pci_find_device(PCI_VENDOR_ID_SI, 0x0900, (void *)NULL); if (pcidev != NULL) { u32 bar0 = 0xb001;