ppc: Move CONFIG_MAX_MEM_MAPPED to common config.h
authorKumar Gala <galak@kernel.crashing.org>
Fri, 6 Feb 2009 02:40:58 +0000 (20:40 -0600)
committerWolfgang Denk <wd@denx.de>
Mon, 9 Feb 2009 23:44:13 +0000 (00:44 +0100)
Moved CONFIG_MAX_MEM_MAPPED to the asm/config.h so its kept consistent
between the two current users (lib_ppc/board.c, 44x SPD DDR2).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Stefan Roese <sr@denx.de>
cpu/ppc4xx/44x_spd_ddr2.c
include/asm-ppc/config.h
lib_ppc/board.c

index b40e4b15150a507077facfae1498eae41888e637..1e495716b55bd913a8f27bf8fe2c33002afcca53 100644 (file)
  * SDRAM. This is because we only map the first 2GB on such systems, and therefore
  * the ECC parity byte of the remaining area can't be written.
  */
-#ifndef CONFIG_MAX_MEM_MAPPED
-#define CONFIG_MAX_MEM_MAPPED  ((phys_size_t)2 << 30)
-#endif
 
 /*
  * Board-specific Platform code can reimplement spd_ddr_init_hang () if needed
index 049c44eaf84de0ce67d86afcf0cd016d4bd6c407..6d27cb1db34537918dd0a7d885ff40d74b6d0814 100644 (file)
 #ifndef _ASM_CONFIG_H_
 #define _ASM_CONFIG_H_
 
+#ifndef CONFIG_MAX_MEM_MAPPED
+#if defined(CONFIG_SDRAM_PPC4xx_IBM_DDR2) && defined(CONFIG_SPD_EEPROM)
+#define CONFIG_MAX_MEM_MAPPED  ((phys_size_t)2 << 30)
+#else
+#define CONFIG_MAX_MEM_MAPPED (256 << 20)
+#endif
+#endif
+
 #endif
index 2262bb4a0f3d643dff7fd576e1854646d652d0de..d90607d02cb979c72df2d7f3c114cf36afc921ec 100644 (file)
@@ -352,9 +352,6 @@ init_fnc_t *init_sequence[] = {
        NULL,                   /* Terminate this list */
 };
 
-#ifndef CONFIG_MAX_MEM_MAPPED
-#define CONFIG_MAX_MEM_MAPPED (256 << 20)
-#endif
 ulong get_effective_memsize(void)
 {
 #ifndef        CONFIG_VERY_BIG_RAM