Browse Source

Merge branch 'master' of git://www.denx.de/git/u-boot-mpc86xx

Wolfgang Denk 17 years ago
parent
commit
3c6e979a94

+ 0 - 36
board/freescale/mpc8610hpcd/mpc8610hpcd.c

@@ -141,42 +141,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)
 #if !defined(CONFIG_SPD_EEPROM)
 /*
 /*
  * Fixed sdram init -- doesn't use serial presence detect.
  * Fixed sdram init -- doesn't use serial presence detect.

+ 0 - 36
board/freescale/mpc8641hpcn/mpc8641hpcn.c

@@ -81,42 +81,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)
 #if !defined(CONFIG_SPD_EEPROM)
 /*
 /*
  * Fixed sdram init -- doesn't use serial presence detect.
  * Fixed sdram init -- doesn't use serial presence detect.

+ 7 - 1
cpu/mpc86xx/traps.c

@@ -43,7 +43,13 @@ int (*debugger_exception_handler)(struct pt_regs *) = 0;
 /* Returns 0 if exception not found and fixup otherwise.  */
 /* Returns 0 if exception not found and fixup otherwise.  */
 extern unsigned long search_exception_table(unsigned long);
 extern unsigned long search_exception_table(unsigned long);
 
 
-#define END_OF_MEM (gd->bd->bi_memstart + gd->bd->bi_memsize)
+/*
+ * End of addressable memory.  This may be less than the actual
+ * amount of memory on the system if we're unable to keep all
+ * the memory mapped in.
+ */
+extern ulong get_effective_memsize(void);
+#define END_OF_MEM (gd->bd->bi_memstart + get_effective_memsize())
 
 
 /*
 /*
  * Trap & Exception support
  * Trap & Exception support

+ 0 - 2
include/configs/MPC8610HPCD.h

@@ -72,10 +72,8 @@
 #define CONFIG_BOARD_EARLY_INIT_F	1	/* Call board_pre_init */
 #define CONFIG_BOARD_EARLY_INIT_F	1	/* Call board_pre_init */
 #define CONFIG_MISC_INIT_R		1
 #define CONFIG_MISC_INIT_R		1
 
 
-#undef	CFG_DRAM_TEST			/* memory test, takes time */
 #define CFG_MEMTEST_START	0x00200000	/* memtest region */
 #define CFG_MEMTEST_START	0x00200000	/* memtest region */
 #define CFG_MEMTEST_END		0x00400000
 #define CFG_MEMTEST_END		0x00400000
-#define CFG_ALT_MEMTEST
 
 
 /*
 /*
  * Base addresses -- Note these are effective addresses where the
  * Base addresses -- Note these are effective addresses where the

+ 0 - 1
include/configs/MPC8641HPCN.h

@@ -87,7 +87,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 
 
 #define CONFIG_BOARD_EARLY_INIT_F	1	/* Call board_pre_init */
 #define CONFIG_BOARD_EARLY_INIT_F	1	/* Call board_pre_init */
 
 
-#undef	CFG_DRAM_TEST			/* memory test, takes time */
 #define CFG_MEMTEST_START	0x00200000	/* memtest region */
 #define CFG_MEMTEST_START	0x00200000	/* memtest region */
 #define CFG_MEMTEST_END		0x00400000
 #define CFG_MEMTEST_END		0x00400000