- Update abuild.sh so it will rebuild successfull builds
[coreboot.git] / src / mainboard / tyan / s2735 / mainboard.c
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>
6 #include "chip.h"
7 //#include <part/mainboard.h>
8 //#include "lsi_scsi.c"
9
10 #if 0
11 static void fixup_lsi_53c1030(struct device *pdev)
12 {
13 //      uint8_t byte;
14         uint16_t word;
15
16         byte = 1;
17         pci_write_config8(pdev, 0xff, byte);
18            // Set the device id 
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);  
22         word = 0x10f1;
23         pci_write_config16(pdev, PCI_SUBSYSTEM_VENDOR_ID, word);
24             // Set the subsytem id 
25         word = 0x2880;
26         pci_write_config16(pdev, PCI_SUBSYSTEM_ID, word);
27             // Disable writes to the device id 
28         byte = 0;
29         pci_write_config8(pdev, 0xff, byte);
30
31 //      lsi_scsi_init(pdev);
32         
33 }
34 #endif
35 //extern static void lsi_scsi_init(struct device *dev);
36 #if 0
37 static void print_pci_regs(struct device *dev)
38 {
39       uint8_t byte;
40       int i;
41
42       for(i=0;i<256;i++) {
43              byte = pci_read_config8(dev, i);
44    
45              if((i%16)==0) printk_info("\n%02x:",i);
46              printk_debug(" %02x",byte);
47       }
48       printk_debug("\n");
49         
50 //        pci_write_config8(dev, 0x4, byte);
51
52 }
53 #endif
54 #if 0
55 static void print_mem(void)
56 {
57         int i;
58         int low_1MB = 0;
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));
62              }
63
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));
67              }
68  }
69 #endif
70 #if 0
71 static void onboard_scsi_fixup(void)
72 {
73        struct device *dev;
74         unsigned char i,j,k;
75 #if 1
76         for(i=0;i<=5;i++) {
77                 for(j=0;j<=0x1f;j++) {
78                         for (k=0;k<=6;k++){
79                                 dev = dev_find_slot(i, PCI_DEVFN(j, k));
80                                 if (dev) {
81                                         printk_debug("%02x:%02x:%02x",i,j,k);
82                                         print_pci_regs(dev);
83                                 }
84                         }
85                 }
86         }
87 #endif
88
89
90 #if 0
91         dev = dev_find_device(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_53C1030,0);
92         if(!dev) {
93                 printk_info("LSI_SCSI_FW_FIXUP: No Device Found!");
94                 return;
95         }
96
97         lsi_scsi_init(dev); 
98 #endif
99 //      print_mem();
100 //      amd8111_enable_rom();
101 }
102 #endif
103 /*
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
107         //   that
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();
112 #endif
113 #if CONFIG_VGABIOS == 1
114         printk_debug("DO THE VGA BIOS\n");
115         do_vgabios();
116         post_code(0x93);
117 #endif
118
119 }
120  */
121
122 struct chip_operations mainboard_tyan_s2735_ops = {
123         CHIP_NAME("Tyan s2735 mainboard")
124 };