summaryrefslogtreecommitdiff
path: root/src/mainboard/via
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2010-11-21 22:47:22 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2010-11-21 22:47:22 +0000
commit7b997053eb2fcde464f5f6a1e5c85d1ffb6b4e32 (patch)
tree5339d014fbd29d3eb27cc82987eb7d655d9d8d1a /src/mainboard/via
parent57b2ff886e0ce2c92820f5722c8031def3ac94cf (diff)
downloadcoreboot-7b997053eb2fcde464f5f6a1e5c85d1ffb6b4e32.tar.xz
Simplify a few code chunks, fix whitespace and indentation.
Also, remove some less useful comments, some dead code / unused functions. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6108 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/via')
-rw-r--r--src/mainboard/via/epia-cn/romstage.c14
-rw-r--r--src/mainboard/via/epia-m/romstage.c15
-rw-r--r--src/mainboard/via/epia-m700/romstage.c11
-rw-r--r--src/mainboard/via/epia-n/romstage.c14
-rw-r--r--src/mainboard/via/epia/romstage.c7
-rw-r--r--src/mainboard/via/pc2500e/romstage.c5
6 files changed, 12 insertions, 54 deletions
diff --git a/src/mainboard/via/epia-cn/romstage.c b/src/mainboard/via/epia-cn/romstage.c
index 2292b0a5ae..1d37ced6d9 100644
--- a/src/mainboard/via/epia-cn/romstage.c
+++ b/src/mainboard/via/epia-cn/romstage.c
@@ -47,7 +47,8 @@ static void enable_mainboard_devices(void)
{
device_t dev;
- dev = pci_locate_device(PCI_ID(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT8237R_LPC), 0);
+ dev = pci_locate_device(PCI_ID(PCI_VENDOR_ID_VIA,
+ PCI_DEVICE_ID_VIA_VT8237R_LPC), 0);
if (dev == PCI_DEV_INVALID)
die("Southbridge not found!!!\n");
@@ -87,21 +88,10 @@ void main(unsigned long bist)
enable_vt8235_serial();
uart_init();
console_init();
-
- print_spew("In romstage.c:main()\n");
-
enable_smbus();
smbus_fixup(&ctrl);
-
- /* Halt if there was a built-in self test failure. */
report_bist_failure(bist);
-
- print_debug("Enabling mainboard devices\n");
enable_mainboard_devices();
-
ddr_ram_setup(&ctrl);
-
/* ram_check(0, 640 * 1024); */
-
- print_spew("Leaving romstage.c:main()\n");
}
diff --git a/src/mainboard/via/epia-m/romstage.c b/src/mainboard/via/epia-m/romstage.c
index 7dba82c852..508d298604 100644
--- a/src/mainboard/via/epia-m/romstage.c
+++ b/src/mainboard/via/epia-m/romstage.c
@@ -30,7 +30,7 @@ static void enable_mainboard_devices(void)
device_t dev;
dev = pci_locate_device_on_bus(PCI_ID(PCI_VENDOR_ID_VIA,
- PCI_DEVICE_ID_VIA_8235), 0);
+ PCI_DEVICE_ID_VIA_8235), 0);
if (dev == PCI_DEV_INVALID) {
die("Southbridge not found!!!\n");
@@ -72,9 +72,7 @@ static void main(unsigned long bist)
{
device_t dev;
- /*
- * Enable VGA; 32MB buffer.
- */
+ /* Enable VGA; 32MB buffer. */
pci_write_config8(0, 0xe1, 0xdd);
/*
@@ -83,9 +81,8 @@ static void main(unsigned long bist)
*/
dev = pci_locate_device_on_bus(PCI_ID(PCI_VENDOR_ID_VIA,
PCI_DEVICE_ID_VIA_6305), 0);
- if (dev != PCI_DEV_INVALID) {
+ if (dev != PCI_DEV_INVALID)
pci_write_config8(dev, 0x15, 0x1c);
- }
enable_vt8235_serial();
uart_init();
@@ -122,12 +119,8 @@ static void main(unsigned long bist)
}
#endif
- if (bist == 0) {
- print_debug(" Doing MTRR init.\n");
+ if (bist == 0)
early_mtrr_init();
- }
//dump_pci_devices();
-
- print_spew("Leaving romstage.c:main()\n");
}
diff --git a/src/mainboard/via/epia-m700/romstage.c b/src/mainboard/via/epia-m700/romstage.c
index 62ea809b47..6d0957049b 100644
--- a/src/mainboard/via/epia-m700/romstage.c
+++ b/src/mainboard/via/epia-m700/romstage.c
@@ -448,17 +448,6 @@ void main(unsigned long bist)
/* This fix does help vx800!, but vx855 doesn't need this. */
/* smbus_fixup(&ctrl); */
- if (bist == 0) {
- /*
- * CAR needs MTRR until memory is ok, so disable this
- * early_mtrr_init() call.
- */
-#if 0
- print_debug("doing early_mtrr\n");
- early_mtrr_init();
-#endif
- }
-
/* Halt if there was a built-in self test failure. */
report_bist_failure(bist);
diff --git a/src/mainboard/via/epia-n/romstage.c b/src/mainboard/via/epia-n/romstage.c
index 449fe95ff1..90d92383ad 100644
--- a/src/mainboard/via/epia-n/romstage.c
+++ b/src/mainboard/via/epia-n/romstage.c
@@ -62,7 +62,8 @@ static void enable_mainboard_devices(void)
device_t dev;
u8 reg;
- dev = pci_locate_device(PCI_ID(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT8237R_LPC), 0);
+ dev = pci_locate_device(PCI_ID(PCI_VENDOR_ID_VIA,
+ PCI_DEVICE_ID_VIA_VT8237R_LPC), 0);
if (dev == PCI_DEV_INVALID)
die("Southbridge not found!!!\n");
@@ -110,14 +111,10 @@ static void main(unsigned long bist)
pci_write_config8(ctrl.d0f0, 0x4f, 0x01);
w83697hf_set_clksel_48(SERIAL_DEV);
-
w83697hf_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
-
uart_init();
console_init();
- print_spew("In romstage.c:main()\n");
-
enable_smbus();
smbus_fixup(&ctrl);
@@ -130,18 +127,13 @@ static void main(unsigned long bist)
print_debug("Enable F-ROM Shadow RAM\n");
enable_shadow_ram();
- /* setup cpu */
print_debug("Setup CPU Interface\n");
c3_cpu_setup(ctrl.d0f2);
ddr_ram_setup();
- if (bist == 0) {
- print_debug("doing early_mtrr\n");
+ if (bist == 0)
early_mtrr_init();
- }
//ram_check(0, 640 * 1024);
-
- print_spew("Leaving romstage.c:main()\n");
}
diff --git a/src/mainboard/via/epia/romstage.c b/src/mainboard/via/epia/romstage.c
index 24167baebe..2bae6c4c81 100644
--- a/src/mainboard/via/epia/romstage.c
+++ b/src/mainboard/via/epia/romstage.c
@@ -31,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);
@@ -74,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();
diff --git a/src/mainboard/via/pc2500e/romstage.c b/src/mainboard/via/pc2500e/romstage.c
index 3aa599bb49..657b3cde6b 100644
--- a/src/mainboard/via/pc2500e/romstage.c
+++ b/src/mainboard/via/pc2500e/romstage.c
@@ -63,14 +63,9 @@ void main(unsigned long bist)
it8716f_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
uart_init();
console_init();
-
enable_smbus();
smbus_fixup(&ctrl);
-
- /* Halt if there was a built-in self test failure. */
report_bist_failure(bist);
-
ddr_ram_setup(&ctrl);
-
/* ram_check(0, 640 * 1024); */
}