mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jan Weitzel <j.weitzel@phytec.de>
To: barebox@lists.infradead.org
Subject: [PATCH] pcm049: add 1GB RAM support
Date: Tue, 28 May 2013 13:51:41 +0200	[thread overview]
Message-ID: <1369741903-24988-3-git-send-email-j.weitzel@phytec.de> (raw)

From: Teresa Gámez <t.gamez@phytec.de>

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>
---
 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2013-05-28 11:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-28 11:51 Jan Weitzel [this message]
2013-05-30  9:22 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1369741903-24988-3-git-send-email-j.weitzel@phytec.de \
    --to=j.weitzel@phytec.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox