1 #include <console/console.h>
2 #include <device/device.h>
3 #include <device/pci.h>
4 #include <device/pci_ids.h>
5 #include <device/pci_ops.h>
7 //#include <part/mainboard.h>
8 //#include "lsi_scsi.c"
11 static void fixup_lsi_53c1030(struct device *pdev)
17 pci_write_config8(pdev, 0xff, byte);
19 // pci_write_config_word(pdev, PCI_DEVICE_ID, PCI_DEVICE_ID_LSILOGIC_53C1030);
20 // Set the subsytem vendor id
21 // pci_write_config16(pdev, PCI_SUBSYSTEM_VENDOR_ID, PCI_VENDOR_ID_TYAN);
23 pci_write_config16(pdev, PCI_SUBSYSTEM_VENDOR_ID, word);
24 // Set the subsytem id
26 pci_write_config16(pdev, PCI_SUBSYSTEM_ID, word);
27 // Disable writes to the device id
29 pci_write_config8(pdev, 0xff, byte);
31 // lsi_scsi_init(pdev);
35 //extern static void lsi_scsi_init(struct device *dev);
37 static void print_pci_regs(struct device *dev)
43 byte = pci_read_config8(dev, i);
45 if((i%16)==0) printk_info("\n%02x:",i);
46 printk_debug(" %02x",byte);
50 // pci_write_config8(dev, 0x4, byte);
55 static void print_mem(void)
59 for(i=low_1MB;i<low_1MB+1024*4;i++) {
60 if((i%16)==0) printk_debug("\n %08x:",i);
61 printk_debug(" %02x ",(unsigned char)*((unsigned char *)i));
64 for(i=low_1MB;i<low_1MB+1024*4;i++) {
65 if((i%16)==0) printk_debug("\n %08x:",i);
66 printk_debug(" %c ",(unsigned char)*((unsigned char *)i));
71 static void onboard_scsi_fixup(void)
77 for(j=0;j<=0x1f;j++) {
79 dev = dev_find_slot(i, PCI_DEVFN(j, k));
81 printk_debug("%02x:%02x:%02x",i,j,k);
91 dev = dev_find_device(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_53C1030,0);
93 printk_info("LSI_SCSI_FW_FIXUP: No Device Found!");
100 // amd8111_enable_rom();
104 static void vga_fixup(void) {
105 // we do this right here because:
106 // - all the hardware is working, and some VGA bioses seem to need
108 // - we need page 0 below for linuxbios tables.
109 #if CONFIG_REALMODE_IDT == 1
110 printk_debug("INSTALL REAL-MODE IDT\n");
111 setup_realmode_idt();
113 #if CONFIG_VGABIOS == 1
114 printk_debug("DO THE VGA BIOS\n");
122 struct chip_operations mainboard_tyan_s2735_ops = {
123 CHIP_NAME("Tyan s2735 mainboard")