summaryrefslogtreecommitdiff
path: root/src/mainboard/via
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2003-10-02 22:48:28 +0000
committerRonald G. Minnich <rminnich@gmail.com>2003-10-02 22:48:28 +0000
commita70483b83bdc733e187ca6955b4edfa02a4d80e0 (patch)
treed07fe2c2d5f1e7369ac541671d1ab9a28b0890ef /src/mainboard/via
parentcb3f498296bad22b360796139bc454d141d7ccc9 (diff)
First SPD code in and working!
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1177 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/via')
-rw-r--r--src/mainboard/via/epia/auto.c79
1 files changed, 36 insertions, 43 deletions
diff --git a/src/mainboard/via/epia/auto.c b/src/mainboard/via/epia/auto.c
index 5e00564756..3affa50145 100644
--- a/src/mainboard/via/epia/auto.c
+++ b/src/mainboard/via/epia/auto.c
@@ -34,23 +34,23 @@ static void memreset_setup(void)
}
/*
-static void memreset(int controllers, const struct mem_controller *ctrl)
-{
-}
+ static void memreset(int controllers, const struct mem_controller *ctrl)
+ {
+ }
*/
static inline int spd_read_byte(unsigned device, unsigned address)
{
- unsigned char c;
- c = smbus_read_byte(device, address);
- return c;
+ unsigned char c;
+ c = smbus_read_byte(device, address);
+ return c;
}
#include "northbridge/via/vt8601/raminit.c"
/*
-#include "sdram/generic_sdram.c"
- */
+ #include "sdram/generic_sdram.c"
+*/
static void
enable_mainboard_devices(void) {
@@ -96,47 +96,40 @@ static void main(void)
/* init_timer();*/
outb(5, 0x80);
- enable_vt8231_serial();
- enable_mainboard_devices();
- uart_init();
- console_init();
+ enable_vt8231_serial();
+ enable_mainboard_devices();
+ uart_init();
+ console_init();
- enable_smbus();
- enable_shadow_ram();
- /*
- memreset_setup();
- this is way more generic than we need.
- sdram_initialize(sizeof(cpu)/sizeof(cpu[0]), cpu);
- */
- sdram_set_registers((const struct mem_controller *) 0);
+ enable_smbus();
+ enable_shadow_ram();
+ /*
+ memreset_setup();
+ this is way more generic than we need.
+ sdram_initialize(sizeof(cpu)/sizeof(cpu[0]), cpu);
+ */
+ 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
- msr_t msr;
- msr = rdmsr(TOP_MEM);
- print_debug("TOP_MEM: ");
- print_debug_hex32(msr.hi);
- print_debug_hex32(msr.lo);
- print_debug("\r\n");
-#endif
+ /* Check all of memory */
#if 0
- ram_check(0x00000000, msr.lo);
+ ram_check(0x00000000, msr.lo);
#endif
#if 0
- static const struct {
- unsigned long lo, hi;
- } check_addrs[] = {
- /* Check 16MB of memory @ 0*/
- { 0x00000000, 0x01000000 },
+ 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 },
+ /* Check 16MB of memory @ 2GB */
+ { 0x80000000, 0x81000000 },
#endif
- };
- int i;
- for(i = 0; i < sizeof(check_addrs)/sizeof(check_addrs[0]); i++) {
- ram_check(check_addrs[i].lo, check_addrs[i].hi);
- }
+ };
+ int i;
+ for(i = 0; i < sizeof(check_addrs)/sizeof(check_addrs[0]); i++) {
+ ram_check(check_addrs[i].lo, check_addrs[i].hi);
+ }
#endif
}