Skip to contentSkip to conversation

MX28: use a clear name for DDR2 initialization

PATCH Superseded Otavio Salvador 3 participants 5 messages Jul 28, 2012 – Aug 5, 2012 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 MX28: use a clear name for DDR2 initialization

The mx28 prefix has been added to the initialization data and function so it is clear by which SoC it is used as i.MX233 will have a specific one. While on that, we also change it to static.

---
Changes in v2:
- use static for the allocation of memory initialization matrix

Changes in v3:
- change short-description prefix

 arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c +6 -6
index e17a4d7..cca1316 100644
@@ -31,7 +31,7 @@
 
 #include "mx28_init.h"
 
-uint32_t dram_vals[] = {
+static uint32_t mx28_dram_vals[] = {
 	0x00000000, 0x00000000, 0x00000000, 0x00000000,
 	0x00000000, 0x00000000, 0x00000000, 0x00000000,
 	0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -88,14 +88,14 @@ void __mx28_adjust_memory_params(uint32_t *dram_vals)
 void mx28_adjust_memory_params(uint32_t *dram_vals)
 	__attribute__((weak, alias("__mx28_adjust_memory_params")));
 
-void init_m28_200mhz_ddr2(void)
+void init_mx28_200mhz_ddr2(void)
 {
 	int i;
 
-	mx28_adjust_memory_params(dram_vals);
+	mx28_adjust_memory_params(mx28_dram_vals);
 
-	for (i = 0; i < ARRAY_SIZE(dram_vals); i++)
-		writel(dram_vals[i], MXS_DRAM_BASE + (4 * i));
+	for (i = 0; i < ARRAY_SIZE(mx28_dram_vals); i++)
+		writel(mx28_dram_vals[i], MXS_DRAM_BASE + (4 * i));
 }
 
 void mx28_mem_init_clock(void)
@@ -230,7 +230,7 @@ void mx28_mem_init(void)
 	/* Clear START bit from DRAM_CTL16 */
 	clrbits_le32(MXS_DRAM_BASE + 0x40, 1);
 
-	init_m28_200mhz_ddr2();
+	init_mx28_200mhz_ddr2();
 
 	/* Clear SREFRESH bit from DRAM_CTL17 */
 	clrbits_le32(MXS_DRAM_BASE + 0x44, 1);
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v3 1/1 MX28: use a clear name for DDR2 initialization

Quoted 9 lines · Otavio Salvador

The mx28 prefix has been added to the initialization data and function so it is clear by which SoC it is used as i.MX233 will have a specific one. While on that, we also change it to static.

---
Changes in v2:
- use static for the allocation of memory initialization matrix

Quoted 5 lines

Changes in v3:
- change short-description prefix

 arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Ping?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
#2 lore raw

PATCH v3 1/1 MX28: use a clear name for DDR2 initialization

In reply to Otavio Salvador

Dear Otavio Salvador,

Quoted 11 lines

The mx28 prefix has been added to the initialization data and function so it is clear by which SoC it is used as i.MX233 will have a specific one. While on that, we also change it to static.

---
Changes in v2:
- use static for the allocation of memory initialization matrix

Changes in v3:
- change short-description prefix

Best regards,
Marek Vasut

#3 lore raw

PATCH v3 1/1 MX28: use a clear name for DDR2 initialization

In reply to Otavio Salvador
Quoted 49 lines · Otavio Salvador

The mx28 prefix has been added to the initialization data and function so it is clear by which SoC it is used as i.MX233 will have a specific one. While on that, we also change it to static.

---
Changes in v2:
- use static for the allocation of memory initialization matrix

Changes in v3:
- change short-description prefix

 arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c +5 -5
index e17a4d7..cca1316 100644
@@ -31,7 +31,7 @@
 
 #include "mx28_init.h"
 
-uint32_t dram_vals[] = {
+static uint32_t mx28_dram_vals[] = {
 	0x00000000, 0x00000000, 0x00000000, 0x00000000,
 	0x00000000, 0x00000000, 0x00000000, 0x00000000,
 	0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -88,14 +88,14 @@ void __mx28_adjust_memory_params(uint32_t *dram_vals)
 void mx28_adjust_memory_params(uint32_t *dram_vals)
 	__attribute__((weak, alias("__mx28_adjust_memory_params")));
 
-void init_m28_200mhz_ddr2(void)
+void init_mx28_200mhz_ddr2(void)
 {
 	int i;
 
-	mx28_adjust_memory_params(dram_vals);
+	mx28_adjust_memory_params(mx28_dram_vals);
 
-	for (i = 0; i < ARRAY_SIZE(dram_vals); i++)
-		writel(dram_vals[i], MXS_DRAM_BASE + (4 * i));
+	for (i = 0; i < ARRAY_SIZE(mx28_dram_vals); i++)
+		writel(mx28_dram_vals[i], MXS_DRAM_BASE + (4 * i));
 }
 
 void mx28_mem_init_clock(void)

arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c void mx28_mem_init(void) · line 236

Quoted 8 lines
arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c +1 -1
@@ -230,7 +230,7 @@ void mx28_mem_init(void)
 	/* Clear START bit from DRAM_CTL16 */
 	clrbits_le32(MXS_DRAM_BASE + 0x40, 1);
 
-	init_m28_200mhz_ddr2();
+	init_mx28_200mhz_ddr2();
 
 	/* Clear SREFRESH bit from DRAM_CTL17 */
 	clrbits_le32(MXS_DRAM_BASE + 0x44, 1);

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#4 lore raw

PATCH v3 1/1 MX28: use a clear name for DDR2 initialization

In reply to Otavio Salvador
Quoted 6 lines · Otavio Salvador

The mx28 prefix has been added to the initialization data and function so it is clear by which SoC it is used as i.MX233 will have a specific one. While on that, we also change it to static.

---

Applied to u-boot-imx, thanks

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================