From: Kumar Gala Date: Fri, 6 Feb 2009 02:40:58 +0000 (-0600) Subject: ppc: Move CONFIG_MAX_MEM_MAPPED to common config.h X-Git-Tag: v2009.03-rc1~98 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=87c9063963561d3d01064be34d0c30855a56587b;p=u-boot ppc: Move CONFIG_MAX_MEM_MAPPED to common config.h 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 Acked-by: Stefan Roese --- diff --git a/cpu/ppc4xx/44x_spd_ddr2.c b/cpu/ppc4xx/44x_spd_ddr2.c index b40e4b1515..1e495716b5 100644 --- a/cpu/ppc4xx/44x_spd_ddr2.c +++ b/cpu/ppc4xx/44x_spd_ddr2.c @@ -160,9 +160,6 @@ * 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 diff --git a/include/asm-ppc/config.h b/include/asm-ppc/config.h index 049c44eaf8..6d27cb1db3 100644 --- a/include/asm-ppc/config.h +++ b/include/asm-ppc/config.h @@ -21,4 +21,12 @@ #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 diff --git a/lib_ppc/board.c b/lib_ppc/board.c index 2262bb4a0f..d90607d02c 100644 --- a/lib_ppc/board.c +++ b/lib_ppc/board.c @@ -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