1 #include <console/console.h>
2 #include <device/device.h>
3 #include <device/chip.h>
4 #include <device/pci.h>
5 #include <device/pci_ids.h>
6 #include <device/pci_ops.h>
8 //#include <part/mainboard.h>
9 //#include "lsi_scsi.c"
10 unsigned long initial_apicid[MAX_CPUS] =
15 static void fixup_lsi_53c1030(struct device *pdev)
21 pci_write_config8(pdev, 0xff, byte);
23 // pci_write_config_word(pdev, PCI_DEVICE_ID, PCI_DEVICE_ID_LSILOGIC_53C1030);
24 // Set the subsytem vendor id
25 // pci_write_config16(pdev, PCI_SUBSYSTEM_VENDOR_ID, PCI_VENDOR_ID_TYAN);
27 pci_write_config16(pdev, PCI_SUBSYSTEM_VENDOR_ID, word);
28 // Set the subsytem id
30 pci_write_config16(pdev, PCI_SUBSYSTEM_ID, word);
31 // Disable writes to the device id
33 pci_write_config8(pdev, 0xff, byte);
35 // lsi_scsi_init(pdev);
39 //extern static void lsi_scsi_init(struct device *dev);
40 /*static void print_pci_regs(struct device *dev)
46 byte = pci_read_config8(dev, i);
48 if((i%16)==0) printk_info("\n %02x:",i);
49 printk_debug(" %02x ",byte);
53 // pci_write_config8(dev, 0x4, byte);
57 static void onboard_scsi_fixup(void)
59 // struct device *dev;
61 /* // Set the scsi device id's
62 printk_debug("%2d:%2d:%2d\n",0,1,0);
63 dev = dev_find_slot(0, PCI_DEVFN(0x1, 0));
67 // Set the scsi device id's
68 printk_debug("%2d:%2d:%2d\n",0,2,0);
69 dev = dev_find_slot(0, PCI_DEVFN(0x2, 0));
74 // Set the scsi device id's
75 printk_debug("%2d:%2d:%2d\n",0,3,0);
76 dev = dev_find_slot(0, PCI_DEVFN(0x3, 0));
81 // Set the scsi device id's
82 printk_debug("%2d:%2d:%2d\n",1,0x7,0);
83 dev = dev_find_slot(1, PCI_DEVFN(0x7, 0));
87 // Set the scsi device id's
88 printk_debug("%2d:%2d:%2d\n",1,0x8,0);
89 dev = dev_find_slot(1, PCI_DEVFN(0x8, 0));
93 printk_debug("%2d:%2d:%2d\n",2,3,0);
94 dev = dev_find_slot(2, PCI_DEVFN(0x3, 0));
98 // Set the scsi device id's
99 printk_debug("%2d:%2d:%2d\n",2,6,0);
100 dev = dev_find_slot(2, PCI_DEVFN(0x6, 0));
104 // Set the scsi device id's
105 printk_debug("%2d:%2d:%2d\n",3,4,0);
106 dev = dev_find_slot(3, PCI_DEVFN(0x4, 0));
114 dev = dev_find_device(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_53C1030,0);
116 printk_info("LSI_SCSI_FW_FIXUP: No Device Found!");
126 enable(struct chip *chip, enum chip_pass pass)
129 struct mainboard_tyan_s2880_config *conf =
130 (struct mainboard_tyan_s2880_config *)chip->chip_info;
134 case CONF_PASS_PRE_BOOT:
135 if (conf->fixup_scsi)
136 onboard_scsi_fixup();
137 printk_debug("mainboard fixup pass %d done\r\n",
143 void final_mainboard_fixup(void)
146 enable_ide_devices();
150 struct chip_control mainboard_tyan_s2880_control = {
152 .name= "Tyan s2880 mainboard "