summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTeresa Gámez <t.gamez@phytec.de>2013-05-28 13:51:41 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-05-30 11:21:42 +0200
commit303efd1bc0ad1e78ef0ce67ec1125df6010f3c1a (patch)
tree98376c20ead1b1afe4e852573e1dac9c13099b7f /arch
parentf88a1ff57da545f92373866d82386e81dd704d41 (diff)
downloadbarebox-303efd1bc0ad1e78ef0ce67ec1125df6010f3c1a.tar.gz
barebox-303efd1bc0ad1e78ef0ce67ec1125df6010f3c1a.tar.xz
pcm049: add 1GB RAM support
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@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boards/pcm049/board.c4
-rw-r--r--arch/arm/boards/pcm049/lowlevel.c21
-rw-r--r--arch/arm/mach-omap/Kconfig12
3 files changed, 36 insertions, 1 deletions
diff --git a/arch/arm/boards/pcm049/board.c b/arch/arm/boards/pcm049/board.c
index b0d689bf02..3c4b1a7dbe 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 5075bbba3b..2df5faed8d 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 f7aa8c5a28..3ec18f0c4d 100644
--- a/arch/arm/mach-omap/Kconfig
+++ b/arch/arm/mach-omap/Kconfig
@@ -214,6 +214,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