Skip to contentSkip to conversation

mx5: Define a common get_board_rev()

PATCH New Fabio Estevam 3 participants 9 messages Apr 25, 2013

Subsystems (2)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/3 mx5: Define a common get_board_rev()

From: Fabio Estevam <[email protected]>

When booting a FSL kernel based on 2.6.35 it is necessary to pass the revision tag to the kernel.

Place a common weak function into soc.c for such purpose.

---
 arch/arm/cpu/armv7/mx5/soc.c |    7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/cpu/armv7/mx5/soc.c +7 -0
index 263658a..3d50a5d 100644
@@ -72,6 +72,13 @@ u32 get_cpu_rev(void)
 	return system_rev;
 }
 
+#ifdef CONFIG_REVISION_TAG
+u32 __weak get_board_rev(void)
+{
+	return get_cpu_rev();
+}
+#endif
+
 #ifndef CONFIG_SYS_DCACHE_OFF
 void enable_caches(void)
 {
Signature · 1 line
1.7.9.5
author reviewer
#1 lore raw

PATCH 2/3 mx5: Select CONFIG_REVISION_TAG

From: Fabio Estevam <[email protected]>

FSL 2.6.35 kernel expects that revision tag is passed by the bootloader.

Select CONFIG_REVISION_TAG so that mx53 boards can work properly with 2.6.35.

---
 include/configs/mx53ard.h |    1 +
 include/configs/mx53evk.h |    1 +
 include/configs/mx53smd.h |    1 +
 3 files changed, 3 insertions(+)
include/configs/mx53ard.h +1 -0
index 148f7a2..296cae3 100644
@@ -34,6 +34,7 @@
 #define CONFIG_CMDLINE_TAG			/* enable passing of ATAGs */
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_INITRD_TAG
+#define CONFIG_REVISION_TAG
 
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 2 * 1024 * 1024)
include/configs/mx53evk.h +1 -0
index a0af3ee..822b926 100644
@@ -34,6 +34,7 @@
 #define CONFIG_CMDLINE_TAG			/* enable passing of ATAGs */
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_INITRD_TAG
+#define CONFIG_REVISION_TAG
 
 #define CONFIG_OF_LIBFDT
 
include/configs/mx53smd.h +1 -0
index 9e83319..942949d 100644
@@ -34,6 +34,7 @@
 #define CONFIG_CMDLINE_TAG			/* enable passing of ATAGs */
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_INITRD_TAG
+#define CONFIG_REVISION_TAG
 
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 2 * 1024 * 1024)
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH 2/3 mx5: Select CONFIG_REVISION_TAG

In reply to Fabio Estevam
Quoted 8 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

FSL 2.6.35 kernel expects that revision tag is passed by the bootloader.

Select CONFIG_REVISION_TAG so that mx53 boards can work properly with 2.6.35.

---

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
=====================================================================
author reviewer
#4 lore raw

PATCH 3/3 mx53ard: Move register masks into imx-regs.h

In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>

imx-regs.h is more appropriate location for containing register masks.

---
 arch/arm/include/asm/arch-mx5/imx-regs.h |    2 ++
 board/freescale/mx53ard/mx53ard.c        |    2 --
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/include/asm/arch-mx5/imx-regs.h +2 -0
index a71cc13..6aff3be 100644
@@ -267,6 +267,8 @@
 /* M4IF */
 #define M4IF_FBPM0	0x40
 #define M4IF_FIDBP	0x48
+#define M4IF_GENP_WEIM_MM_MASK		0x00000001
+#define WEIM_GCR2_MUX16_BYP_GRANT_MASK	0x00001000
 
 /* Assuming 24MHz input clock with doubler ON */
 /*                            MFI         PDF */
board/freescale/mx53ard/mx53ard.c +0 -2
index 8d433a3..32c4d5f 100644
@@ -62,8 +62,6 @@ void dram_init_banksize(void)
 static void setup_iomux_nand(void)
 {
 	u32 i, reg;
-	#define M4IF_GENP_WEIM_MM_MASK		0x00000001
-	#define WEIM_GCR2_MUX16_BYP_GRANT_MASK	0x00001000
 
 	reg = __raw_readl(M4IF_BASE_ADDR + 0xc);
 	reg &= ~M4IF_GENP_WEIM_MM_MASK;
Signature · 1 line
1.7.9.5
#6 lore raw

PATCH 3/3 mx53ard: Move register masks into imx-regs.h

In reply to Fabio Estevam
Quoted 6 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

imx-regs.h is more appropriate location for containing register masks.

---

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
=====================================================================
#8 lore raw

PATCH 1/3 mx5: Define a common get_board_rev()

In reply to Fabio Estevam
Quoted 9 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

When booting a FSL kernel based on 2.6.35 it is necessary to pass the revision tag to the kernel.

Place a common weak function into soc.c for such purpose.

---

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
=====================================================================