Simplify a few code chunks, fix whitespace and indentation.
[coreboot.git] / src / mainboard / via / epia / romstage.c
index caab9a2464b6d58d6b4d931cc2def9a85d9db8a7..2bae6c4c81fe707a220063fc90c188bf6e9505fe 100644 (file)
@@ -15,6 +15,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)
 {
@@ -22,9 +23,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)
 {
@@ -33,9 +31,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);
@@ -76,9 +73,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();
@@ -86,6 +83,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();
@@ -119,4 +117,3 @@ static void main(unsigned long bist)
        }
 #endif
 }
-