From: Teresa Gámez <t.gamez@xxxxxxxxx> Add config to select RAM assembly. The difference is if one or two chip selects are used. This can't be checkt at runtime. Signed-off-by: Jan Weitzel <j.weitzel@xxxxxxxxx> --- arch/arm/boards/pcm049/board.c | 4 ++++ arch/arm/boards/pcm049/lowlevel.c | 21 ++++++++++++++++++++- arch/arm/mach-omap/Kconfig | 12 ++++++++++++ 3 files changed, 36 insertions(+), 1 deletions(-) diff --git a/arch/arm/boards/pcm049/board.c b/arch/arm/boards/pcm049/board.c index b0d689b..3c4b1a7 100644 --- a/arch/arm/boards/pcm049/board.c +++ b/arch/arm/boards/pcm049/board.c @@ -48,7 +48,11 @@ console_initcall(pcm049_console_init); static int pcm049_mem_init(void) { +#ifdef CONFIG_1024MB_DDR2RAM + omap_add_ram0(SZ_1G); +#else omap_add_ram0(SZ_512M); +#endif omap44xx_add_sram0(); return 0; diff --git a/arch/arm/boards/pcm049/lowlevel.c b/arch/arm/boards/pcm049/lowlevel.c index 5075bbb..2df5fae 100644 --- a/arch/arm/boards/pcm049/lowlevel.c +++ b/arch/arm/boards/pcm049/lowlevel.c @@ -30,6 +30,7 @@ void set_muxconf_regs(void); +/* 512MB */ static const struct ddr_regs ddr_regs_mt42L64M64_25_400_mhz = { .tim1 = 0x0EEB0662, .tim2 = 0x20370DD2, @@ -43,6 +44,20 @@ static const struct ddr_regs ddr_regs_mt42L64M64_25_400_mhz = { .mr2 = 0x4 }; +/* 1GB */ +static const struct ddr_regs ddr_regs_mt42L128M64_25_400_mhz = { + .tim1 = 0x0EEB0663, + .tim2 = 0x205715D2, + .tim3 = 0x00BFC53F, + .phy_ctrl_1 = 0x849FF408, + .ref_ctrl = 0x00000618, + .config_init = 0x80001AB9, + .config_final = 0x80001AB9, + .zq_config = 0x50093215, + .mr1 = 0x83, + .mr2 = 0x4 +}; + static void noinline pcm049_init_lowlevel(void) { struct dpll_param core = OMAP4_CORE_DPLL_PARAM_19M2_DDR400; @@ -55,7 +70,11 @@ static void noinline pcm049_init_lowlevel(void) set_muxconf_regs(); - omap4_ddr_init(&ddr_regs_mt42L64M64_25_400_mhz, &core); +#ifdef CONFIG_1024MB_DDR2RAM + omap4_ddr_init(&ddr_regs_mt42L128M64_25_400_mhz, &core); +#else + omap4_ddr_init(&ddr_regs_mt42L64M64_25_400_mhz, &core); +#endif /* Set VCORE1 = 1.3 V, VCORE2 = VCORE3 = 1.21V */ omap4_scale_vcores(TPS62361_VSEL0_GPIO); diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig index 42e5f4a..87d3b3e 100644 --- a/arch/arm/mach-omap/Kconfig +++ b/arch/arm/mach-omap/Kconfig @@ -209,6 +209,18 @@ endchoice endif +if MACH_PCM049 + choice + prompt "Select DDR2-RAM Size" + + config 512MB_DDR2RAM + bool "512MB" + config 1024MB_DDR2RAM + bool "1024MB" + + endchoice +endif + config MACH_OMAP_ADVANCED_MUX bool "Enable advanced pin muxing" depends on MACH_OMAP343xSDP -- 1.7.0.4 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox