Merge commit 'wd/master'
[oweals/u-boot.git] / board / freescale / mpc8641hpcn / mpc8641hpcn.c
index 0e451dc35a99bc7e4706b4b17ec3217370636604..b30c6b1e9205ed2ea562354058830d34b49f7be3 100644 (file)
@@ -25,7 +25,7 @@
 #include <asm/processor.h>
 #include <asm/immap_86xx.h>
 #include <asm/immap_fsl_pci.h>
-#include <spd.h>
+#include <spd_sdram.h>
 #include <asm/io.h>
 #include <libfdt.h>
 #include <fdt_support.h>
 extern void ddr_enable_ecc(unsigned int dram_size);
 #endif
 
-#if defined(CONFIG_SPD_EEPROM)
-#include "spd_sdram.h"
-#endif
-
 void sdram_init(void);
 long int fixed_sdram(void);
 
@@ -51,13 +47,15 @@ int board_early_init_f(void)
 
 int checkboard(void)
 {
-       puts("Board: MPC8641HPCN\n");
-
+       printf ("Board: MPC8641HPCN, System ID: 0x%02lx, "
+               "System Version: 0x%02lx, FPGA Version: 0x%02lx\n",
+               in8(PIXIS_BASE + PIXIS_ID), in8(PIXIS_BASE + PIXIS_VER),
+               in8(PIXIS_BASE + PIXIS_PVER));
        return 0;
 }
 
 
-long int
+phys_size_t
 initdram(int board_type)
 {
        long dram_size = 0;
@@ -85,42 +83,6 @@ initdram(int board_type)
 }
 
 
-#if defined(CFG_DRAM_TEST)
-int
-testdram(void)
-{
-       uint *pstart = (uint *) CFG_MEMTEST_START;
-       uint *pend = (uint *) CFG_MEMTEST_END;
-       uint *p;
-
-       puts("SDRAM test phase 1:\n");
-       for (p = pstart; p < pend; p++)
-               *p = 0xaaaaaaaa;
-
-       for (p = pstart; p < pend; p++) {
-               if (*p != 0xaaaaaaaa) {
-                       printf("SDRAM test fails at: %08x\n", (uint) p);
-                       return 1;
-               }
-       }
-
-       puts("SDRAM test phase 2:\n");
-       for (p = pstart; p < pend; p++)
-               *p = 0x55555555;
-
-       for (p = pstart; p < pend; p++) {
-               if (*p != 0x55555555) {
-                       printf("SDRAM test fails at: %08x\n", (uint) p);
-                       return 1;
-               }
-       }
-
-       puts("SDRAM test passed.\n");
-       return 0;
-}
-#endif
-
-
 #if !defined(CONFIG_SPD_EEPROM)
 /*
  * Fixed sdram init -- doesn't use serial presence detect.
@@ -134,7 +96,7 @@ fixed_sdram(void)
 
        ddr->cs0_bnds = CFG_DDR_CS0_BNDS;
        ddr->cs0_config = CFG_DDR_CS0_CONFIG;
-       ddr->ext_refrec = CFG_DDR_EXT_REFRESH;
+       ddr->timing_cfg_3 = CFG_DDR_TIMING_3;
        ddr->timing_cfg_0 = CFG_DDR_TIMING_0;
        ddr->timing_cfg_1 = CFG_DDR_TIMING_1;
        ddr->timing_cfg_2 = CFG_DDR_TIMING_2;