- Update abuild.sh so it will rebuild successfull builds
[coreboot.git] / src / mainboard / tyan / s4880 / mainboard.c
index 2431595f19cf28f205633892428e88030b40db1e..cec60e7af3df00ecec187c5f11da07265abdc9c7 100644 (file)
@@ -1,17 +1,11 @@
 #include <console/console.h>
 #include <device/device.h>
-#include <device/chip.h>
 #include <device/pci.h>
 #include <device/pci_ids.h>
 #include <device/pci_ops.h>
 #include "../../../northbridge/amd/amdk8/northbridge.h"
 #include "chip.h"
-//#include <part/mainboard.h>
-//#include "lsi_scsi.c"
-unsigned long initial_apicid[CONFIG_MAX_CPUS] =
-{
-       0,1,2,3
-};
+
 #if 0
 static void fixup_lsi_53c1030(struct device *pdev)
 {
@@ -27,7 +21,7 @@ static void fixup_lsi_53c1030(struct device *pdev)
         word = 0x10f1;
        pci_write_config16(pdev, PCI_SUBSYSTEM_VENDOR_ID, word);
             // Set the subsytem id 
-       word = 0x4880;
+       word = 0x2880;
         pci_write_config16(pdev, PCI_SUBSYSTEM_ID, word);
             // Disable writes to the device id 
        byte = 0;
@@ -37,7 +31,7 @@ static void fixup_lsi_53c1030(struct device *pdev)
        
 }
 #endif
-//extern static void lsi_scsi_init(struct device *dev);
+
 #if 0
 static void print_pci_regs(struct device *dev)
 {
@@ -59,17 +53,18 @@ static void print_pci_regs(struct device *dev)
 #if 0
 static void print_mem(void)
 {
-        int i;
-       int low_1MB = 0;
-       for(i=low_1MB;i<low_1MB+1024*4;i++) {
+        unsigned int i;
+       unsigned int low_1MB = 0xf4107000;
+       for(i=low_1MB;i<low_1MB+1024;i++) {
              if((i%16)==0) printk_debug("\n %08x:",i);
              printk_debug(" %02x ",(unsigned char)*((unsigned char *)i));
              }
-
+#if 0
         for(i=low_1MB;i<low_1MB+1024*4;i++) {
              if((i%16)==0) printk_debug("\n %08x:",i);
              printk_debug(" %c ",(unsigned char)*((unsigned char *)i));
              }
+#endif
  }
 #endif
 #if 0
@@ -92,10 +87,10 @@ static void amd8111_enable_rom(void)
 static void onboard_scsi_fixup(void)
 {
         struct device *dev;
-#if 0
+#if 1
        unsigned char i,j,k;
 
-       for(i=0;i<=6;i++) {
+       for(i=0;i<=15;i++) {
                for(j=0;j<=0x1f;j++) {
                        for (k=0;k<=6;k++){
                                dev = dev_find_slot(i, PCI_DEVFN(j, k));
@@ -134,19 +129,21 @@ static void vga_fixup(void) {
 #endif
 #if CONFIG_VGABIOS == 1
         printk_debug("DO THE VGA BIOS\n");
-        do_vgabios();
+        do_vgabios(0x0600);
         post_code(0x93);
 #endif
 
 }
-#endif 
 
+#endif
+#if 0
 static void
 enable(struct chip *chip, enum chip_pass pass)
 {
 
-        struct mainboard_tyan_s4880_config *conf = 
-               (struct mainboard_tyan_s4880_config *)chip->chip_info;
+        struct mainboard_tyan_s2895_config *conf = 
+               (struct mainboard_tyan_s2895_config *)chip->chip_info;
 
         switch (pass) {
                default: break;
@@ -164,29 +161,8 @@ enable(struct chip *chip, enum chip_pass pass)
        }
 
 }
-static struct device_operations mainboard_operations = {
-        .read_resources   = root_dev_read_resources,
-        .set_resources    = root_dev_set_resources,
-        .enable_resources = enable_childrens_resources,
-        .init             = 0,
-        .scan_bus         = amdk8_scan_root_bus,
-        .enable           = 0,
-};
+#endif
 
-static void enumerate(struct chip *chip)
-{
-        struct chip *child;
-        dev_root.ops = &mainboard_operations;
-        chip->dev = &dev_root;
-        chip->bus = 0;
-        for(child = chip->children; child; child = child->next) {
-                child->bus = &dev_root.link[0];
-        }
-}
-struct chip_control mainboard_tyan_s4880_control = {
-        .enable = enable,
-        .enumerate = enumerate,
-        .name      = "Tyan s4880 mainboard ",
+struct chip_operations mainboard_tyan_s4880_ops = {
+       CHIP_NAME("Tyan s4880 mainboard")
 };
-
-