i855: Remove useless memctrl indirection.
[coreboot.git] / src / mainboard / digitallogic / adl855pc / romstage.c
index 40a06264013e66ca55299d25174c64e8d2b440a5..a75d60f07a2d74c591d1daf2c57126baf40fa543 100644 (file)
@@ -5,6 +5,7 @@
 #include <arch/romcc_io.h>
 #include <arch/hlt.h>
 #include <stdlib.h>
+#include <lib.h>
 #include "pc80/udelay_io.c"
 #include <pc80/mc146818rtc.h>
 #include <console/console.h>
@@ -15,6 +16,7 @@
 #include "superio/winbond/w83627hf/w83627hf_early_serial.c"
 #include "cpu/x86/mtrr/earlymtrr.c"
 #include "cpu/x86/bist.h"
+#include <spd.h>
 
 #define SERIAL_DEV PNP_DEV(0x2e, W83627HF_SP1)
 
@@ -25,17 +27,9 @@ static inline int spd_read_byte(unsigned device, unsigned address)
 
 #include "northbridge/intel/i855/raminit.c"
 #include "northbridge/intel/i855/reset_test.c"
-#include "lib/generic_sdram.c"
 
 void main(unsigned long bist)
 {
-       static const struct mem_controller memctrl[] = {
-               {
-                       .d0 = PCI_DEV(0, 0, 1),
-                       .channel0 = { (0xa<<3)|0, 0 },
-               },
-       };
-
        if (bist == 0) {
 #if 0
                enable_lapic();
@@ -54,15 +48,15 @@ void main(unsigned long bist)
        print_pci_devices();
 #endif
 
-       if(!bios_reset_detected()) {
+       if (!bios_reset_detected()) {
                enable_smbus();
 #if 0
-               dump_spd_registers(&memctrl[0]);
+               dump_spd_registers();
                dump_smbus_registers();
 #endif
-
-               sdram_initialize(ARRAY_SIZE(memctrl), memctrl);
-
+               sdram_set_registers();
+               sdram_set_spd_registers();
+               sdram_enable();
        }
 
 #if 0
@@ -77,4 +71,3 @@ void main(unsigned long bist)
        ram_check(0x80000000, 0x81000000);
 #endif
 }
-