Use DIMM0 et al in lots more places instead of hardocding values.
[coreboot.git] / src / mainboard / lippert / hurricane-lx / romstage.c
index 92f0f0f6f1d6ddf8da0b1185126235c0178b6ceb..35674fbfcc0717239ebe7daed2a583675d484df6 100644 (file)
 #include <device/pnp_def.h>
 #include <arch/hlt.h>
 #include <console/console.h>
-#include "lib/ramtest.c"
 #include "cpu/x86/bist.h"
 #include "cpu/x86/msr.h"
 #include <cpu/amd/lxdef.h>
 #include <cpu/amd/geode_post_code.h>
 #include "southbridge/amd/cs5536/cs5536.h"
+#include <spd.h>
 
 #include "southbridge/amd/cs5536/cs5536_early_smbus.c"
 #include "southbridge/amd/cs5536/cs5536_early_setup.c"
@@ -45,8 +45,6 @@
 #define ManualConf 1           /* No automatic strapped PLL config */
 #define PLLMSRhi 0x0000049C    /* Manual settings for the PLL */
 #define PLLMSRlo 0x00DE6001
-#define DIMM0 0xA0
-#define DIMM1 0xA2
 
 static inline int spd_read_byte(unsigned int device, unsigned int address)
 {
@@ -124,7 +122,7 @@ void main(unsigned long bist)
        post_code(0x01);
 
        static const struct mem_controller memctrl[] = {
-               {.channel0 = {(0xa << 3) | 0, (0xa << 3) | 1}}
+               {.channel0 = {DIMM0, DIMM1}}
        };
 
        SystemPreInit();
@@ -148,14 +146,7 @@ void main(unsigned long bist)
 
        cpuRegInit(0, DIMM0, DIMM1, DRAM_TERMINATED);
 
-#if CONFIG_BOARD_OLD_REVISION
-       /*
-        * Old revision boards need a jumper shorting the power button to power
-        * on automatically. So we must disable the button's fail-safe function,
-        * or the board will shut down after 4 s.
-        */
-       outl(0, PMS_IO_BASE + PM_FSD); // Fail-Save Delay register
-#else
+#if !CONFIG_BOARD_OLD_REVISION
        int err;
        /* bit0 = Spread Spectrum */
        if ((err = smc_send_config(SMC_CONFIG))) {