* [PATCH 1/3] ARM: imx6-mmdc: Fix cs0_end calculation
@ 2015-07-16 13:50 Sascha Hauer
2015-07-16 13:50 ` [PATCH 2/3] ARM: i.MX6 cm-fx6: Fix Chip density for DDR_64BIT_2GB case Sascha Hauer
2015-07-16 13:50 ` [PATCH 3/3] ARM: i.MX6 cm-fx6: Fix area for get_ram_size Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Sascha Hauer @ 2015-07-16 13:50 UTC (permalink / raw)
To: Barebox List; +Cc: Nikita Kiryanov, embeddedsupport
The current calculation does not take the 0x10000000 offset where
SDRAM starts into account. For example with a 1GiB chip density
the current code calculates cs1 start to 0x40000000, but it
has to be 0x10000000 + 0x40000000 = 0x50000000. Add the missing
8 32MiB chunks.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-imx/imx6-mmdc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-imx/imx6-mmdc.c b/arch/arm/mach-imx/imx6-mmdc.c
index fb81a15..64fb624 100644
--- a/arch/arm/mach-imx/imx6-mmdc.c
+++ b/arch/arm/mach-imx/imx6-mmdc.c
@@ -1199,7 +1199,7 @@ void mx6_dram_cfg(const struct mx6_ddr_sysinfo *sysinfo,
twtr = ROUND(max(4 * clkper, 7500) / clkper, 1) - 1;
trcd = trp;
trtp = twtr;
- cs0_end = 4 * sysinfo->cs_density - 1;
+ cs0_end = 4 * sysinfo->cs_density - 1 + 8;
debug("density:%d Gb (%d Gb per chip)\n",
sysinfo->cs_density, ddr3_cfg->density);
--
2.1.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/3] ARM: i.MX6 cm-fx6: Fix Chip density for DDR_64BIT_2GB case
2015-07-16 13:50 [PATCH 1/3] ARM: imx6-mmdc: Fix cs0_end calculation Sascha Hauer
@ 2015-07-16 13:50 ` Sascha Hauer
2015-07-16 13:50 ` [PATCH 3/3] ARM: i.MX6 cm-fx6: Fix area for get_ram_size Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2015-07-16 13:50 UTC (permalink / raw)
To: Barebox List; +Cc: Nikita Kiryanov, embeddedsupport
DDR_64BIT_2GB corresponds to two chip selects (ncs = 2) with 1GiB
each. In this case cs_density must be configured to 8Gb (1GiB).
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/cm-fx6/lowlevel.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/boards/cm-fx6/lowlevel.c b/arch/arm/boards/cm-fx6/lowlevel.c
index 9c5c33c..fa8bd7b 100644
--- a/arch/arm/boards/cm-fx6/lowlevel.c
+++ b/arch/arm/boards/cm-fx6/lowlevel.c
@@ -206,6 +206,8 @@ static void spl_mx6q_dram_init(enum ddr_config dram_config, bool reset)
cm_fx6_sysinfo_q.ncs = 1;
break;
case DDR_64BIT_2GB:
+ cm_fx6_sysinfo_q.cs_density = 8;
+ cm_fx6_ddr3_cfg_q.density = 2;
cm_fx6_sysinfo_q.dsize = 2;
cm_fx6_sysinfo_q.ncs = 2;
break;
--
2.1.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 3/3] ARM: i.MX6 cm-fx6: Fix area for get_ram_size
2015-07-16 13:50 [PATCH 1/3] ARM: imx6-mmdc: Fix cs0_end calculation Sascha Hauer
2015-07-16 13:50 ` [PATCH 2/3] ARM: i.MX6 cm-fx6: Fix Chip density for DDR_64BIT_2GB case Sascha Hauer
@ 2015-07-16 13:50 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2015-07-16 13:50 UTC (permalink / raw)
To: Barebox List; +Cc: Nikita Kiryanov, embeddedsupport
for bank2_size get_ram_size must be called with the CS1 area. With the
recent fix to calculate CS1 start this now starts at 0x90000000 and no
longer at 0x80000000.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/cm-fx6/lowlevel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boards/cm-fx6/lowlevel.c b/arch/arm/boards/cm-fx6/lowlevel.c
index fa8bd7b..60ffbbf 100644
--- a/arch/arm/boards/cm-fx6/lowlevel.c
+++ b/arch/arm/boards/cm-fx6/lowlevel.c
@@ -257,8 +257,8 @@ static unsigned long cm_fx6_spl_dram_init(void)
return SZ_2G;
if (bank1_size == 0x40000000) {
- bank2_size = get_ram_size((long int *)0x80000000,
- 0x80000000);
+ bank2_size = get_ram_size((long int *)0x90000000,
+ 0x40000000);
if (bank2_size == 0x40000000) {
/* Don't do a full reset here */
spl_mx6q_dram_init(DDR_64BIT_2GB, false);
--
2.1.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-16 13:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-16 13:50 [PATCH 1/3] ARM: imx6-mmdc: Fix cs0_end calculation Sascha Hauer
2015-07-16 13:50 ` [PATCH 2/3] ARM: i.MX6 cm-fx6: Fix Chip density for DDR_64BIT_2GB case Sascha Hauer
2015-07-16 13:50 ` [PATCH 3/3] ARM: i.MX6 cm-fx6: Fix area for get_ram_size Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox