Drop per-board ram_check() calls for now.
[coreboot.git] / src / mainboard / via / epia / romstage.c
index 66a8d203ed30803c602d9b85cd2ba4484e539609..870c4e763033e118c837a71e91ae359e21e52371 100644 (file)
@@ -5,9 +5,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include <stdlib.h>
-#include "pc80/serial.c"
-#include "console/console.c"
-#include "lib/ramtest.c"
+#include <console/console.h>
 #include "northbridge/via/vt8601/raminit.h"
 #include "cpu/x86/mtrr/earlymtrr.c"
 #include "cpu/x86/bist.h"
@@ -16,6 +14,7 @@
 #include "lib/debug.c"
 #include "southbridge/via/vt8231/vt8231_early_smbus.c"
 #include "southbridge/via/vt8231/vt8231_early_serial.c"
+#include "southbridge/via/vt8231/vt8231_enable_rom.c"
 
 static inline int spd_read_byte(unsigned device, unsigned address)
 {
@@ -23,9 +22,6 @@ static inline int spd_read_byte(unsigned device, unsigned address)
 }
 
 #include "northbridge/via/vt8601/raminit.c"
-/*
-  #include "lib/generic_sdram.c"
-*/
 
 static void enable_mainboard_devices(void)
 {
@@ -34,9 +30,8 @@ static void enable_mainboard_devices(void)
 
        dev = pci_locate_device(PCI_ID(0x1106,0x8231), 0);
 
-       if (dev == PCI_DEV_INVALID) {
+       if (dev == PCI_DEV_INVALID)
                die("Southbridge not found!!!\n");
-       }
 
        pci_write_config8(dev, 0x50, 7);
        pci_write_config8(dev, 0x51, 0xff);
@@ -77,9 +72,9 @@ static void enable_shadow_ram(void)
 
 static void main(unsigned long bist)
 {
-       if (bist == 0) {
+       if (bist == 0)
                early_mtrr_init();
-       }
+
        enable_vt8231_serial();
        uart_init();
        console_init();
@@ -87,6 +82,7 @@ static void main(unsigned long bist)
        /* Halt if there was a built in self test failure */
        report_bist_failure(bist);
 
+       vt8231_enable_rom();
        enable_mainboard_devices();
        enable_smbus();
        enable_shadow_ram();
@@ -98,26 +94,4 @@ static void main(unsigned long bist)
        sdram_set_registers((const struct mem_controller *) 0);
        sdram_set_spd_registers((const struct mem_controller *) 0);
        sdram_enable(0, (const struct mem_controller *) 0);
-
-       /* Check all of memory */
-#if 0
-       ram_check(0x00000000, msr.lo);
-#endif
-#if 0
-       static const struct {
-               unsigned long lo, hi;
-       } check_addrs[] = {
-               /* Check 16MB of memory @ 0*/
-               { 0x00000000, 0x01000000 },
-#if TOTAL_CPUS > 1
-               /* Check 16MB of memory @ 2GB */
-               { 0x80000000, 0x81000000 },
-#endif
-       };
-       int i;
-       for(i = 0; i < ARRAY_SIZE(check_addrs); i++) {
-               ram_check(check_addrs[i].lo, check_addrs[i].hi);
-       }
-#endif
 }
-