Skip to contentSkip to conversation

MX5: Add initial support for MX53 processor

PATCH Superseded Jason Liu 5 participants 14 messages Dec 22, 2010 – Jan 10, 2011

Subsystems (4)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Jason Liu

author
#0 lore raw

PATCH v2 1/3 MX5: Add initial support for MX53 processor

Add initial support for Freescale MX53 processor,

- Add the iomux support and the pin definition,
- Add the regs definition, clean up some unused def from mx51,
- Add the low level init support, make use the freq input of setup_pll macro

---
Changes for v2:
-address some comments of Stefano Babic, remove the is_soc_type
and use #ifdef,
-address the comments of stefano, remove CPU_TYPE def, remove something
like /*0x760*/ comments in mx5x_pins.h.
-fix the build break for vision2 board

---
 arch/arm/cpu/armv7/mx5/iomux.c              |   30 ++-
 arch/arm/cpu/armv7/mx5/lowlevel_init.S      |   91 +++---
 arch/arm/cpu/armv7/mx5/soc.c                |   22 +-
 arch/arm/include/asm/arch-mx5/asm-offsets.h |    5 +
 arch/arm/include/asm/arch-mx5/imx-regs.h    |   78 ++---
 arch/arm/include/asm/arch-mx5/iomux.h       |  102 ------
 arch/arm/include/asm/arch-mx5/mx5x_pins.h   |  469 ++++++++++++++++++++++++++-
 include/configs/mx51evk.h                   |    3 +-
 include/configs/vision2.h                   |    3 +-
 9 files changed, 599 insertions(+), 204 deletions(-)
arch/arm/cpu/armv7/mx5/iomux.c +25 -5
old mode 100644
new mode 100755
index e8928d5..d4e3bbb
@@ -34,7 +34,7 @@ enum iomux_reg_addr {
 	IOMUXSW_MUX_CTL = IOMUXC_BASE_ADDR,
 	IOMUXSW_MUX_END = IOMUXC_BASE_ADDR + MUX_I_END,
 	IOMUXSW_PAD_CTL = IOMUXC_BASE_ADDR + PAD_I_START,
-	IOMUXSW_INPUT_CTL = IOMUXC_BASE_ADDR,
+	IOMUXSW_INPUT_CTL = IOMUXC_BASE_ADDR + INPUT_CTL_START,
 };
 
 #define MUX_PIN_NUM_MAX (((MUX_I_END - MUX_I_START) >> 2) + 1)
@@ -44,11 +44,12 @@ static inline u32 get_mux_reg(iomux_pin_name_t pin)
 {
 	u32 mux_reg = PIN_TO_IOMUX_MUX(pin);
 
+#if defined(CONFIG_MX51)
 	if (is_soc_rev(CHIP_REV_2_0) < 0) {
 		/*
 		 * Fixup register address:
-		 *	i.MX51 TO1 has offset with the register
-		 * 	which is define as TO2.
+		 * i.MX51 TO1 has offset with the register
+		 * which is define as TO2.
 		 */
 		if ((pin == MX51_PIN_NANDF_RB5) ||
 			(pin == MX51_PIN_NANDF_RB6) ||
@@ -59,6 +60,7 @@ static inline u32 get_mux_reg(iomux_pin_name_t pin)
 		else if (mux_reg >= 0x130)
 			mux_reg += 0xC;
 	}
+#endif
 	mux_reg += IOMUXSW_MUX_CTL;
 	return mux_reg;
 }
@@ -68,11 +70,12 @@ static inline u32 get_pad_reg(iomux_pin_name_t pin)
 {
 	u32 pad_reg = PIN_TO_IOMUX_PAD(pin);
 
+#if defined(CONFIG_MX51)
 	if (is_soc_rev(CHIP_REV_2_0) < 0) {
 		/*
 		 * Fixup register address:
-		 *	i.MX51 TO1 has offset with the register
-		 * 	which is define as TO2.
+		 * i.MX51 TO1 has offset with the register
+		 * which is define as TO2.
 		 */
 		if ((pin == MX51_PIN_NANDF_RB5) ||
 			(pin == MX51_PIN_NANDF_RB6) ||
@@ -91,6 +94,7 @@ static inline u32 get_pad_reg(iomux_pin_name_t pin)
 		else
 			pad_reg += 8;
 	}
+#endif
 	pad_reg += IOMUXSW_PAD_CTL;
 	return pad_reg;
 }
@@ -98,10 +102,13 @@ static inline u32 get_pad_reg(iomux_pin_name_t pin)
 /* Get the last iomux register address */
 static inline u32 get_mux_end(void)
 {
+#if defined(CONFIG_MX51)
 	if (is_soc_rev(CHIP_REV_2_0) < 0)
 		return IOMUXC_BASE_ADDR + (0x3F8 - 4);
 	else
 		return IOMUXC_BASE_ADDR + (0x3F0 - 4);
+#endif
+	return IOMUXSW_MUX_END;
 }
 
 /*
@@ -164,3 +171,16 @@ unsigned int mxc_iomux_get_pad(iomux_pin_name_t pin)
 	u32 pad_reg = get_pad_reg(pin);
 	return readl(pad_reg);
 }
+
+/*
+ * This function configures daisy-chain
+ *
+ * @param input    index of input select register
+ * @param config   the binary value of elements
+ */
+void mxc_iomux_set_input(iomux_input_select_t input, u32 config)
+{
+	u32 reg = IOMUXSW_INPUT_CTL + (input << 2);
+
+	writel(config, reg);
+}
arch/arm/cpu/armv7/mx5/lowlevel_init.S +54 -37

192 lines not on this page · raw message

arch/arm/cpu/armv7/mx5/soc.c +17 -5
index 2900119..09500b3 100644
@@ -33,17 +33,20 @@
 #include <fsl_esdhc.h>
 #endif
 
-#if defined(CONFIG_MX51)
-#define CPU_TYPE 0x51000
-#else
+#if !(defined(CONFIG_MX51) || defined(CONFIG_MX53))
 #error "CPU_TYPE not defined"
 #endif
 
 u32 get_cpu_rev(void)
 {
-	int system_rev = CPU_TYPE;
+#ifdef CONFIG_MX51
+	int system_rev = 0x51000;
+#else
+	int system_rev = 0x53000;
+#endif
 	int reg = __raw_readl(ROM_SI_REV);
 
+#if defined(CONFIG_MX51)
 	switch (reg) {
 	case 0x02:
 		system_rev |= CHIP_REV_1_1;
@@ -57,11 +60,20 @@ u32 get_cpu_rev(void)
 	case 0x20:
 		system_rev |= CHIP_REV_3_0;
 		break;
-	return system_rev;
 	default:
 		system_rev |= CHIP_REV_1_0;
 		break;
 	}
+#else
+	switch (reg) {
+	case 0x20:
+		system_rev |= CHIP_REV_2_0;
+		break;
+	default:
+		system_rev |= CHIP_REV_1_0;
+		break;
+	}
+#endif
 	return system_rev;
 }
 
arch/arm/include/asm/arch-mx5/asm-offsets.h +5 -0
index afd2728..2258f2f 100644
@@ -37,7 +37,12 @@
 #define CLKCTL_CCGR4            0x78
 #define CLKCTL_CCGR5            0x7C
 #define CLKCTL_CCGR6            0x80
+#if defined(CONFIG_MX53)
+#define CLKCTL_CCGR7            0x84
 #define CLKCTL_CMEOR            0x84
+#elif defined(CONFIG_MX51)
+#define CLKCTL_CMEOR            0x84
+#endif
 
 /* DPLL */
 #define PLL_DP_CTL	0x00
arch/arm/include/asm/arch-mx5/imx-regs.h +29 -49

116 lines not on this page · raw message

arch/arm/include/asm/arch-mx5/iomux.h +0 -102

108 lines not on this page · raw message

arch/arm/include/asm/arch-mx5/mx5x_pins.h +466 -3

490 lines not on this page · raw message

include/configs/mx51evk.h +1 -2
old mode 100644
new mode 100755
index b4e5738..3d6d390
@@ -24,8 +24,6 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#include <asm/arch/imx-regs.h>
-
  /* High Level Configuration Options */
 
 #define CONFIG_MX51	/* in a mx51 */
@@ -37,6 +35,7 @@
 
 #define CONFIG_L2_OFF
 
+#include <asm/arch/imx-regs.h>
 /*
  * Disabled for now due to build problems under Debian and a significant
  * increase in the final file size: 144260 vs. 109536 Bytes.
include/configs/vision2.h +2 -1
index a5c116b..4c8e7fa 100644
@@ -24,11 +24,12 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#include <asm/arch/imx-regs.h>
 
 #define CONFIG_MX51	/* in a mx51 */
 #define CONFIG_L2_OFF
 
+#include <asm/arch/imx-regs.h>
+
 #define CONFIG_SYS_MX5_HCLK	24000000
 #define CONFIG_SYS_MX5_CLK32		32768
 #define CONFIG_DISPLAY_CPUINFO
Signature · 1 line
1.7.0.4
author
#1 lore raw

PATCH v2 2/3 mxc_i2c: add support for MX53 processor

This patch add I2C support for Freescale MX53 processor

---
Changes for v2:
-address the comments of Heiko, add #if defined(CONFIG_MX31)
to avoid break MX31 build. Move CONFIG_HARD_I2C to the top of the file and fix the error message from:
#error "define CONFIG_SYS_I2C_PORT to use the I2C driver"
to #error "define CONFIG_SYS_I2C_MXxx_PORTx to use the I2C driver"

---
 drivers/i2c/mxc_i2c.c |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)
drivers/i2c/mxc_i2c.c +17 -2
old mode 100644
new mode 100755
index 8e10fbb..95d27ae
@@ -26,8 +26,14 @@
 
 #if defined(CONFIG_HARD_I2C)
 
+#ifdef CONFIG_MX31
 #include <asm/arch/mx31.h>
 #include <asm/arch/mx31-regs.h>
+#endif
+
+#if defined(CONFIG_MX53)
+#include <asm/arch/clock.h>
+#endif
 
 #define IADR	0x00
 #define IFDR	0x04
@@ -56,8 +62,12 @@
 #elif defined (CONFIG_SYS_I2C_MX31_PORT3)
 #define I2C_BASE	0x43f84000
 #define I2C_CLK_OFFSET	30
+#elif defined(CONFIG_SYS_I2C_MX53_PORT1)
+#define I2C_BASE        I2C1_BASE_ADDR
+#elif defined(CONFIG_SYS_I2C_MX53_PORT2)
+#define I2C_BASE        I2C2_BASE_ADDR
 #else
-#error "define CONFIG_SYS_I2C_MX31_PORTx to use the mx31 I2C driver"
+#error "define CONFIG_SYS_I2C_MXxx_PORTx to use the I2C driver"
 #endif
 
 #ifdef DEBUG
@@ -72,11 +82,16 @@ static u16 div[] = { 30, 32, 36, 42, 48, 52, 60, 72, 80, 88, 104, 128, 144,
 
 void i2c_init(int speed, int unused)
 {
-	int freq = mx31_get_ipg_clk();
+	int freq;
 	int i;
 
+#ifdef CONFIG_MX31
+	freq = mx31_get_ipg_clk();
 	/* start the required I2C clock */
 	__REG(CCM_CGR0) = __REG(CCM_CGR0) | (3 << I2C_CLK_OFFSET);
+#else
+	freq = mxc_get_clock(MXC_IPG_PERCLK);
+#endif
 
 	for (i = 0; i < 0x1f; i++)
 		if (freq / div[i] <= speed)
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH v2 2/3 mxc_i2c: add support for MX53 processor

Le 22/12/2010 14:23, Jason Liu a ?crit :

Quoted 22 lines

This patch add I2C support for Freescale MX53 processor

---
Changes for v2:
-address the comments of Heiko, add #if defined(CONFIG_MX31)
to avoid break MX31 build. Move CONFIG_HARD_I2C to the top of the file and fix the error message from:
#error "define CONFIG_SYS_I2C_PORT to use the I2C driver"
to #error "define CONFIG_SYS_I2C_MXxx_PORTx to use the I2C driver"

---
  drivers/i2c/mxc_i2c.c |   19 +++++++++++++++++--
  1 files changed, 17 insertions(+), 2 deletions(-)
drivers/i2c/mxc_i2c.c +0 -0
old mode 100644
new mode 100755
index 8e10fbb..95d27ae

drivers/i2c/mxc_i2c.c line 29

Quoted 4 lines
drivers/i2c/mxc_i2c.c +1 -0
@@ -26,8 +26,14 @@
 
  #if defined(CONFIG_HARD_I2C)
 
+#ifdef CONFIG_MX31

Can you make this an #if defined() like all others you are adding here?

Quoted 25 lines
drivers/i2c/mxc_i2c.c +10 -1
  #include<asm/arch/mx31.h>
  #include<asm/arch/mx31-regs.h>
+#endif
+
+#if defined(CONFIG_MX53)
+#include<asm/arch/clock.h>
+#endif
 
  #define IADR	0x00
  #define IFDR	0x04
@@ -56,8 +62,12 @@
  #elif defined (CONFIG_SYS_I2C_MX31_PORT3)
  #define I2C_BASE	0x43f84000
  #define I2C_CLK_OFFSET	30
+#elif defined(CONFIG_SYS_I2C_MX53_PORT1)
+#define I2C_BASE        I2C1_BASE_ADDR
+#elif defined(CONFIG_SYS_I2C_MX53_PORT2)
+#define I2C_BASE        I2C2_BASE_ADDR
  #else
-#error "define CONFIG_SYS_I2C_MX31_PORTx to use the mx31 I2C driver"
+#error "define CONFIG_SYS_I2C_MXxx_PORTx to use the I2C driver"
  #endif
 
  #ifdef DEBUG

drivers/i2c/mxc_i2c.c static u16 div[] = { 30, 32, 36, 42, 48, 52, 60, 72, 80, 88, 104, 128, 144, · line 88

Quoted 8 lines
drivers/i2c/mxc_i2c.c +2 -1
@@ -72,11 +82,16 @@ static u16 div[] = { 30, 32, 36, 42, 48, 52, 60, 72, 80, 88, 104, 128, 144,
 
  void i2c_init(int speed, int unused)
  {
-	int freq = mx31_get_ipg_clk();
+	int freq;
  	int i;
 
+#ifdef CONFIG_MX31

Ditto, for the sake of homogeneity.

drivers/i2c/mxc_i2c.c static u16 div[] = { 30, 32, 36, 42, 48, 52, 60, 72, 80, 88, 104, 128, 144,

Quoted 9 lines
drivers/i2c/mxc_i2c.c +4 -0
+	freq = mx31_get_ipg_clk();
  	/* start the required I2C clock */
  	__REG(CCM_CGR0) = __REG(CCM_CGR0) | (3<<  I2C_CLK_OFFSET);
+#else
+	freq = mxc_get_clock(MXC_IPG_PERCLK);
+#endif
 
  	for (i = 0; i<  0x1f; i++)
  		if (freq / div[i]<= speed)

Amicalement,

Signature · 1 line
Albert.
#3 lore raw

PATCH v2 2/3 mxc_i2c: add support for MX53 processor

Hi, Albert,

2010/12/23 Albert ARIBAUD <[email protected]>:

Quoted 24 lines

Le 22/12/2010 14:23, Jason Liu a ?crit :

Quoted 23 lines

This patch add I2C support for Freescale MX53 processor

---
Changes for v2:
-address the comments of Heiko, add #if defined(CONFIG_MX31) ? to avoid break MX31 build. Move CONFIG_HARD_I2C to the top ? of the file and fix the error message from:
? ? ? ?#error "define CONFIG_SYS_I2C_PORT to use the I2C driver" ? to ? ? ?#error "define CONFIG_SYS_I2C_MXxx_PORTx to use the I2C driver"
---
? drivers/i2c/mxc_i2c.c | ? 19 +++++++++++++++++--
? 1 files changed, 17 insertions(+), 2 deletions(-)

drivers/i2c/mxc_i2c.c +0 -0
old mode 100644
new mode 100755
index 8e10fbb..95d27ae
@@ -26,8 +26,14 @@
 
Quoted 5 lines

drivers/i2c/mxc_i2c.c line 29

Quoted 3 lines
drivers/i2c/mxc_i2c.c +1 -0
 ? #if defined(CONFIG_HARD_I2C)
 
+#ifdef CONFIG_MX31

Can you make this an #if defined() like all others you are adding here?

OK, I will do it. Thanks,

Quoted 56 lines
Quoted 26 lines

? #include<asm/arch/mx31.h>
? #include<asm/arch/mx31-regs.h>

drivers/i2c/mxc_i2c.c +5 -0
+#endif
+
+#if defined(CONFIG_MX53)
+#include<asm/arch/clock.h>
+#endif

? #define IADR ? ? ? ?0x00
? #define IFDR ? ? ? ?0x04

drivers/i2c/mxc_i2c.c +0 -0
@@ -56,8 +62,12 @@
 ? #elif defined (CONFIG_SYS_I2C_MX31_PORT3)

? #define I2C_BASE ? ?0x43f84000
? #define I2C_CLK_OFFSET ? ? ?30

drivers/i2c/mxc_i2c.c +4 -0
+#elif defined(CONFIG_SYS_I2C_MX53_PORT1)
+#define I2C_BASE ? ? ? ?I2C1_BASE_ADDR
+#elif defined(CONFIG_SYS_I2C_MX53_PORT2)
+#define I2C_BASE ? ? ? ?I2C2_BASE_ADDR

? #else

drivers/i2c/mxc_i2c.c +1 -1
-#error "define CONFIG_SYS_I2C_MX31_PORTx to use the mx31 I2C driver"
+#error "define CONFIG_SYS_I2C_MXxx_PORTx to use the I2C driver"

? #endif

? #ifdef DEBUG

drivers/i2c/mxc_i2c.c static u16 div[] = { 30, 32, 36, 42, 48, 52, 60, 72, 80, 88, 104, 128, 144, · line 88

Quoted 8 lines
drivers/i2c/mxc_i2c.c +2 -1
@@ -72,11 +82,16 @@ static u16 div[] = { 30, 32, 36, 42, 48, 52, 60, 72, 80, 88, 104, 128, 144,
 
 ? void i2c_init(int speed, int unused)
 ? {
- ? ? int freq = mx31_get_ipg_clk();
+ ? ? int freq;
 ? ? ? int i;
 
+#ifdef CONFIG_MX31

Ditto, for the sake of homogeneity.

Quoted 9 lines
drivers/i2c/mxc_i2c.c +1 -0
+ ? ? freq = mx31_get_ipg_clk();

? ? ? /* start the required I2C clock */
? ? ? __REG(CCM_CGR0) = __REG(CCM_CGR0) | (3<< ?I2C_CLK_OFFSET);

drivers/i2c/mxc_i2c.c +3 -0
+#else
+ ? ? freq = mxc_get_clock(MXC_IPG_PERCLK);
+#endif

? ? ? for (i = 0; i< ?0x1f; i++)
? ? ? ? ? ? ? if (freq / div[i]<= speed)

Amicalement,
--
Albert.
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

author
#4 lore raw

PATCH v2 3/3 MX5:MX53: add initial support for MX53EVK board

In reply to Jason Liu

Add initial support for MX53EVK board support.
FEC, SD/MMC, UART, I2C, have been support.

---
Changes for v2:
-Address the comments from Stefano, Albert and Wolfgang,
-remove the ivt.S file and use imximage.cfg instead,
-remove the ivt link to u-boot
-Address the comments from Stefano,
-Correct the copyright issue,
-Use mxc_get_gpio() and mxc_set_gpio() accessors.
-Get rid of system_rev,
-use i2c enumeration value (0,1,..N) instead of BASE address, -use fsl_pmic i2c interface,
-Add comments for why manage the pmic in a different way for TO2 -Remove the comments from configs/mx53evk.h,
- /*
- * Disabled for now due to build problems under Debian and a significant
- * increase in the final file size: 144260 vs. 109536 Bytes.
- */
-Address the comments from Wolfgang,
-Move CONFIG_SYS_TEXT_BASE to board config file,
-Remove the comments from configs/mx53evk.h
- /* size in bytes reserved for initial data */
#define BOARD_LATE_INIT
-Change the comments, * Hardware drivers to * UART drivers

---
 MAINTAINERS                       |    3 +
 board/freescale/mx53evk/Makefile  |   48 +++++
 board/freescale/mx53evk/mx53evk.c |  393 +++++++++++++++++++++++++++++++++++++
 boards.cfg                        |    1 +
 include/configs/mx53evk.h         |  216 ++++++++++++++++++++
 5 files changed, 661 insertions(+), 0 deletions(-)
MAINTAINERS +3 -0
index 0590ad9..c87ca56 100644
@@ -1085,6 +1085,9 @@ Peter Meerwald <[email protected]>
 
 	bct-brettl2	BF536
 
+Jason Liu <[email protected]>
+
+	MX53evk         i.MX53
 #########################################################################
 # End of MAINTAINERS list						#
 #########################################################################
board/freescale/mx53evk/Makefile new file +48 -0

48 lines not on this page · raw message

board/freescale/mx53evk/mx53evk.c new file +393 -0

393 lines not on this page · raw message

boards.cfg +1 -0
index dcd5a12..736e88e 100644
@@ -101,6 +101,7 @@ omap5912osk                  arm         arm926ejs   -                   ti
 edminiv2                     arm         arm926ejs   -                   LaCie          orion5x
 ca9x4_ct_vxp                 arm         armv7       vexpress            armltd
 mx51evk                      arm         armv7       mx51evk             freescale      mx5
+mx53evk                      arm         armv7       mx53evk             freescale      mx5
 vision2                      arm         armv7       vision2             ttcontrol      mx5
 omap3_overo                  arm         armv7       overo               -              omap3
 omap3_pandora                arm         armv7       pandora             -              omap3
include/configs/mx53evk.h new file +216 -0

216 lines not on this page · raw message

Signature · 1 line
1.7.0.4
#5 lore raw

PATCH v2 3/3 MX5:MX53: add initial support for MX53EVK board

Quoted 43 lines · Jason Liu

Add initial support for MX53EVK board support.
FEC, SD/MMC, UART, I2C, have been support.

---
Changes for v2:

(quoted diff) +0 -4
-Address the comments from Stefano, Albert and Wolfgang,
        -remove the ivt.S file and use imximage.cfg instead,
        -remove the ivt link to u-boot
-Address the comments from Stefano,
        -Correct the copyright issue,
        -Use mxc_get_gpio() and mxc_set_gpio() accessors.
        -Get rid of system_rev,
        -use i2c enumeration value (0,1,..N) instead of BASE address,
        -use fsl_pmic i2c interface,
        -Add comments for why manage the pmic in a different way for TO2
        -Remove the comments from configs/mx53evk.h,
         - /*
         -  * Disabled for now due to build problems under Debian and a significant
         -  * increase in the final file size: 144260 vs. 109536 Bytes.
         -  */
-Address the comments from Wolfgang,
        -Move CONFIG_SYS_TEXT_BASE  to board config file,
        -Remove the comments from configs/mx53evk.h
         - /* size in bytes reserved for initial data */
         #define BOARD_LATE_INIT
        -Change the comments,  * Hardware drivers to * UART drivers
---
 
 
 MAINTAINERS                       |    3 +
 board/freescale/mx53evk/Makefile  |   48 +++++
 board/freescale/mx53evk/mx53evk.c |  393 +++++++++++++++++++++++++++++++++++++
 boards.cfg                        |    1 +
 include/configs/mx53evk.h         |  216 ++++++++++++++++++++
 5 files changed, 661 insertions(+), 0 deletions(-)
MAINTAINERS +0 -0
index 0590ad9..c87ca56 100644

MAINTAINERS Peter Meerwald <[email protected]> · line 1090

Quoted 6 lines
MAINTAINERS +3 -0
@@ -1085,6 +1085,9 @@ Peter Meerwald <[email protected]>
 
 	bct-brettl2	BF536
 
+Jason Liu <[email protected]>
+
+	MX53evk         i.MX53

Why do you add your name at the end of the Blackfin list and not inside the ARM list ? Please maintain the list sorted.

MAINTAINERS Peter Meerwald <[email protected]>

Quoted 7 lines
MAINTAINERS +7 -0
+void power_init(void)
+{
+	unsigned int val;
+
+	/* Set VDDA to 1.25V */
+	val = pmic_reg_read(REG_SW_2);
+	val = (val & (~0x1F)) | 0x1A;

I have already commented this. Please drop all fix constants and use already provided #define or add new ones if needed.

MAINTAINERS

Quoted 4 lines
MAINTAINERS +4 -0
+	if (is_soc_rev(CHIP_REV_2_0) == 0) {
+		/* Set VCC to 1.3V for TO2 */
+		val = pmic_reg_read(REG_SW_1);
+		val = (val & (~0x1F)) | 0x1C;

Ditto.

MAINTAINERS

Quoted 7 lines
MAINTAINERS +7 -0
+int board_init(void)
+{
+	gd->bd->bi_arch_number = MACH_TYPE_MX53_EVK;
+	/* address of boot parameters */
+	gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
+
+	setup_iomux_uart();

You sent a patch for mx51evk moving this call in board_early_init_f. Do we need the same for mx53evk ?

MAINTAINERS

Quoted 4 lines
MAINTAINERS +4 -0
+#ifdef BOARD_LATE_INIT
+int board_late_init(void)
+{
+#ifdef CONFIG_I2C_MXC

Is there a possibility to have a working board if CONFIG_I2C_MXC and BOARD_LATE_INIT are not set ? If not, it should be better to check if they are set on the beginning of this file and reporting a compile error if they are not set, and removing the #ifdef in this function.

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-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#6 lore raw

PATCH v2 3/3 MX5:MX53: add initial support for MX53EVK board

Hi, Stefano,

2010/12/27 Stefano Babic <[email protected]>:

Quoted 45 lines · Jason Liu
Quoted 44 lines

Add initial support for MX53EVK board support.
FEC, SD/MMC, UART, I2C, have been support.

---
Changes for v2:
-Address the comments from Stefano, Albert and Wolfgang,
? ? ? ? -remove the ivt.S file and use imximage.cfg instead,
? ? ? ? -remove the ivt link to u-boot
-Address the comments from Stefano,
? ? ? ? -Correct the copyright issue,
? ? ? ? -Use mxc_get_gpio() and mxc_set_gpio() accessors.
? ? ? ? -Get rid of system_rev,
? ? ? ? -use i2c enumeration value (0,1,..N) instead of BASE address, ? ? ? ? -use fsl_pmic i2c interface,
? ? ? ? -Add comments for why manage the pmic in a different way for TO2 ? ? ? ? -Remove the comments from configs/mx53evk.h,
? ? ? ? ?- /*
? ? ? ? ?- ?* Disabled for now due to build problems under Debian and a significant ? ? ? ? ?- ?* increase in the final file size: 144260 vs. 109536 Bytes. ? ? ? ? ?- ?*/
-Address the comments from Wolfgang,
? ? ? ? -Move CONFIG_SYS_TEXT_BASE ?to board config file,
? ? ? ? -Remove the comments from configs/mx53evk.h
? ? ? ? ?- /* size in bytes reserved for initial data */
? ? ? ? ?#define BOARD_LATE_INIT
? ? ? ? -Change the comments, ?* Hardware drivers to * UART drivers
---

?MAINTAINERS ? ? ? ? ? ? ? ? ? ? ? | ? ?3 +
?board/freescale/mx53evk/Makefile ?| ? 48 +++++
?board/freescale/mx53evk/mx53evk.c | ?393 +++++++++++++++++++++++++++++++++++++
?boards.cfg ? ? ? ? ? ? ? ? ? ? ? ?| ? ?1 +
?include/configs/mx53evk.h ? ? ? ? | ?216 ++++++++++++++++++++

?5 files changed, 661 insertions(+), 0 deletions(-)

MAINTAINERS +0 -0
index 0590ad9..c87ca56 100644
@@ -1085,6 +1085,9 @@ Peter Meerwald <[email protected]>
 
Quoted 8 lines

MAINTAINERS Peter Meerwald <[email protected]>

Quoted 5 lines

? ? ? bct-brettl2 ? ? BF536

MAINTAINERS +3 -0
+Jason Liu <[email protected]>
+
+ ? ? MX53evk ? ? ? ? i.MX53

Why do you add your name at the end of the Blackfin list and not inside the ARM list ? Please maintain the list sorted.

OK, I will put it into the ARM list.

Quoted 11 lines

MAINTAINERS

Quoted 8 lines
MAINTAINERS +7 -0
+void power_init(void)
+{
+ ? ? unsigned int val;
+
+ ? ? /* Set VDDA to 1.25V */
+ ? ? val = pmic_reg_read(REG_SW_2);
+ ? ? val = (val & (~0x1F)) | 0x1A;

I have already commented this. Please drop all fix constants and use already provided #define or add new ones if needed.

Do you think that both 0x1F and 0x1A should be used with #define?

Quoted 7 lines
Quoted 5 lines

+ ? ? if (is_soc_rev(CHIP_REV_2_0) == 0) {
+ ? ? ? ? ? ? /* Set VCC to 1.3V for TO2 */
+ ? ? ? ? ? ? val = pmic_reg_read(REG_SW_1);
+ ? ? ? ? ? ? val = (val & (~0x1F)) | 0x1C;

Ditto.

Do you think that both 0x1F and 0x1C should be used with #define?

Quoted 13 lines

MAINTAINERS

Quoted 10 lines
MAINTAINERS +7 -0
+int board_init(void)
+{
+ ? ? gd->bd->bi_arch_number = MACH_TYPE_MX53_EVK;
+ ? ? /* address of boot parameters */
+ ? ? gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
+
+ ? ? setup_iomux_uart();

You sent a patch for mx51evk moving this call in board_early_init_f. Do we need the same for mx53evk ?

Yes, we need the same for mx53evk.

Quoted 10 lines

MAINTAINERS

Quoted 5 lines
MAINTAINERS +4 -0
+#ifdef BOARD_LATE_INIT
+int board_late_init(void)
+{
+#ifdef CONFIG_I2C_MXC

Is there a possibility to have a working board if CONFIG_I2C_MXC and BOARD_LATE_INIT are not set ? If not, it should be better to check if they are set on the beginning of this file and reporting a compile error if they are not set, and removing the #ifdef in this function.

OK, I will remove it.

Thanks for the review.

Quoted 15 lines

Best regards,
Stefano Babic

--
=====================================================================
DENX Software Engineering GmbH, ? ? MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 ?Email: office at denx.de
=====================================================================
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#7 lore raw

PATCH v2 3/3 MX5:MX53: add initial support for MX53EVK board

Quoted 8 lines · Jason Liu
Quoted 6 lines

board/freescale/mx53evk/mx53evk.c line 130

Quoted 3 lines
board/freescale/mx53evk/mx53evk.c new file +3 -0
+     /* Set VDDA to 1.25V */
+     val = pmic_reg_read(REG_SW_2);
+     val = (val & (~0x1F)) | 0x1A;

I have already commented this. Please drop all fix constants and use already provided #define or add new ones if needed.

Do you think that both 0x1F and 0x1A should be used with #define?

Yes, of course. I see you have not included any specific pmic header in the file (take a look at the mc13892.h file). Nobody knows what 0x1F and 0x1A mean, and everybody relies only on the comment. However, not always a comment is updated...

Quoted 1 line

Do you think that both 0x1F and 0x1C should be used with #define?

Yes

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-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#8 lore raw

PATCH v2 1/3 MX5: Add initial support for MX53 processor

In reply to Jason Liu

Review

Quoted 13 lines · Jason Liu

Add initial support for Freescale MX53 processor,

- Add the iomux support and the pin definition,
- Add the regs definition, clean up some unused def from mx51,
- Add the low level init support, make use the freq input of setup_pll macro

---
Changes for v2:

(quoted diff) +0 -3
-address some comments of Stefano Babic, remove the is_soc_type
 and use #ifdef,
-address the comments of stefano, remove CPU_TYPE def, remove something
 like /*0x760*/ comments in mx5x_pins.h.
-fix the build break for vision2 board

A general remark. You posted two different patchset now to support the MX53 processor. As the patches are related, please combine all patches in a single patchset to avoid that only a few of them go to be applied and to simplify review.

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-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#9 lore raw

PATCH v2 1/3 MX5: Add initial support for MX53 processor

Hi, Stefano,

2010/12/27 Stefano Babic <[email protected]>:

Quoted 7 lines · Jason Liu
Quoted 6 lines

Add initial support for Freescale MX53 processor,

- Add the iomux support and the pin definition,
- Add the regs definition, clean up some unused def from mx51,
- Add the low level init support, make use the freq input of setup_pll macro

Quoted 12 lines
Quoted 7 lines

---
Changes for v2:
-address some comments of Stefano Babic, remove the is_soc_type ?and use #ifdef,
-address the comments of stefano, remove CPU_TYPE def, remove something ?like /*0x760*/ comments in mx5x_pins.h.
-fix the build break for vision2 board

A general remark. You posted two different patchset now to support the MX53 processor. As the patches are related, please combine all patches in a single patchset to avoid that only a few of them go to be applied and to simplify review.

The patch for support mx53 processor is tracked by version. Sorry, I don't catch your mean. Thanks in advance for telling me clear on that if something wrong.

Quoted 15 lines

Best regards,
Stefano Babic

--
=====================================================================
DENX Software Engineering GmbH, ? ? MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 ?Email: office at denx.de
=====================================================================
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#10 lore raw

PATCH v2 1/3 MX5: Add initial support for MX53 processor

Quoted 7 lines · Jason Liu
Quoted 4 lines

A general remark. You posted two different patchset now to support the MX53 processor. As the patches are related, please combine all patches in a single patchset to avoid that only a few of them go to be applied and to simplify review.

The patch for support mx53 processor is tracked by version. Sorry, I don't catch your mean. Thanks in advance for telling me clear on that if something wrong.

Patches for mx53evk are in one patchset, but they depends on patches you sent in another patchset (for pmic, gpio,). All patches that belong to the same patchset are merged together into the mainline, avoiding conflicts and board breakages. If for example your first patchset is merged, but the second one is waiting for changes, the board cannot be compiled clean and can potentially break other board, if for example it contains a partial modification that is fixed in the second patchset. Increase the version number and put all related patches in the same patchset.

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-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#11 lore raw

PATCH v2 1/3 MX5: Add initial support for MX53 processor

Hi, Stefano,

2010/12/28 Stefano Babic <[email protected]>:

Quoted 10 lines · Jason Liu
Quoted 8 lines
Quoted 5 lines

A general remark. You posted two different patchset now to support the MX53 processor. As the patches are related, please combine all patches in a single patchset to avoid that only a few of them go to be applied and to simplify review.

The patch for support mx53 processor is tracked by version. Sorry, I don't catch your mean. Thanks in advance for telling me clear on that if something wrong.

Quoted 9 lines

Patches for mx53evk are in one patchset, but they depends on patches you sent in another patchset (for pmic, gpio,). All patches that belong to the same patchset are merged together into the mainline, avoiding conflicts and board breakages. If for example your first patchset is merged, but the second one is waiting for changes, the board cannot be compiled clean and can potentially break other board, if for example it contains a partial modification that is fixed in the second patchset. Increase the version number and put all related patches in the same patchset.

OK, I get it. Thanks for the clarification.

Quoted 11 lines

Best regards,
Stefano Babic

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

#12 lore raw

PATCH v2 1/3 MX5: Add initial support for MX53 processor

In reply to Jason Liu

Dear Jason Liu,

Quoted 5 lines · In message <[email protected]> you wrote:

Add initial support for Freescale MX53 processor,

- Add the iomux support and the pin definition,
- Add the regs definition, clean up some unused def from mx51,
- Add the low level init support, make use the freq input of setup_pll macro

...

arch/arm/cpu/armv7/mx5/lowlevel_init.S line 95

Quoted 1 line
arch/arm/cpu/armv7/mx5/lowlevel_init.S +1 -0
+	ldr r0, =\pll

What does '\p' mean ?

arch/arm/cpu/armv7/mx5/lowlevel_init.S line 101

Quoted 1 line
arch/arm/cpu/armv7/mx5/lowlevel_init.S +1 -0
+	ldr r1, W_DP_OP_\freq

What does '\f' mean?

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Don't try to outweird me, three-eyes. I get stranger things than you
free with my breakfast cereal."
           - Zaphod Beeblebrox in  "Hitchhiker's Guide to the Galaxy"
#13 lore raw

PATCH v2 1/3 MX5: Add initial support for MX53 processor

Hi, Wolfgang,

2011/1/10 Wolfgang Denk <[email protected]>:

Quoted 5 lines

Dear Jason Liu,

Quoted 2 lines · In message <[email protected]> you wrote:

Add initial support for Freescale MX53 processor,

Quoted 7 lines
Quoted 3 lines

- Add the iomux support and the pin definition,
- Add the regs definition, clean up some unused def from mx51,
- Add the low level init support, make use the freq input of setup_pll macro

...

Quoted 1 line

+ ? ? ldr r0, =\pll

What does '\p' mean ?

In order to evaluate the macro parameter, we need put escape sequences before the param.

See, http://sourceware.org/binutils/docs-2.21/as/Macro.html#Macro
for detailed information.

Quoted 4 lines
Quoted 2 lines

+ ? ? ldr r1, W_DP_OP_\freq

What does '\f' mean?

Ditto,

Quoted 18 lines

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH, ? ? MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "Don't try to outweird me, three-eyes. I get stranger things than you free with my breakfast cereal."
? ? ? ? ? - Zaphod Beeblebrox in ?"Hitchhiker's Guide to the Galaxy"
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot