All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/1] IMX: rename mx51 to mx5
       [not found] <1287053835-29339-1-git-send-email-r64343@freescale.com>
@ 2010-10-14 13:39 ` Stefano Babic
  0 siblings, 0 replies; 4+ messages in thread
From: Stefano Babic @ 2010-10-14 13:39 UTC (permalink / raw)
  To: u-boot

On 10/14/2010 12:57 PM, Jason Liu wrote:
> Rename mx51 to mx5 in order to support more mx51
> like-style SOCs such as MX53 and the followings.

Hi Jason,

> 
> Signed-off-by: Jason Liu <r64343@freescale.com>

Your mailer (or the original patch) cannot be applied. It seems it is
was generated on another system, any line is terminated with ^M
(linefeed). As I checked with another patch on the ML, it seems really
related to your site.

There are some other errors and git-am (or patch) reports :

patch: **** malformed patch at line 2024:

It seems that the patch was changed after its creation. Could you check
and resend it ?

> --- a/boards.cfg
> +++ b/boards.cfg
> -mx51evk		arm	armv7		mx51evk		freescale	mx51
> +mx51evk		arm	armv7		mx51evk		freescale	mx5

There a second board in u-boot mainline with the MX51, that I added
recently (vision2). You should change the processor type for that board,
too.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 1/1] IMX: rename mx51 to mx5
  2010-10-15 11:39 ` Stefano Babic
@ 2010-10-15 14:06   ` Liu Hui-R64343
  0 siblings, 0 replies; 4+ messages in thread
From: Liu Hui-R64343 @ 2010-10-15 14:06 UTC (permalink / raw)
  To: u-boot

Hi, Stefano,

> -----Original Message-----
> From: Stefano Babic [mailto:sbabic at denx.de]
> Sent: Friday, October 15, 2010 7:40 PM
> To: Liu Hui-R64343
> Cc: sbabic at denx.de; u-boot at lists.denx.de
> Subject: Re: [U-Boot][PATCH 1/1] IMX: rename mx51 to mx5
> 
> On 10/15/2010 04:22 AM, Jason Liu wrote:
> > Rename mx51 to mx5 in order to support more mx51
> > like-style SOCs such as MX53 and the followings.
> >
> > Signed-off-by: Jason Liu <r64343@freescale.com>
> 
> Hi Jason,
> 
> a little feedback. This patch is well-formed and I do not see the
> corruption problems as with the former one.
> 
> However, the patch does not apply:
> 
> Applying: IMX: rename mx51 to mx5
> error: patch failed: arch/arm/include/asm/arch-mx51/sys_proto.h:24
> error: arch/arm/include/asm/arch-mx51/sys_proto.h: patch does not
apply
> error: patch failed: boards.cfg:46
> error: boards.cfg: patch does not apply
> Patch failed at 0001 IMX: rename mx51 to mx5
> 
> Have you applied the patch on the current u-boot.git tree ? It seems
you
> have to to rebase your patch.

Yes, correct.

> 
> Please increment the version of your patch to allow everybody to track
> easier the changes. Something like [PATCH V2 1/1] makes the job.

Yes, I will do it.

> 
> > @@ -2,7 +2,7 @@
> >   * (C) Copyright 2007
> >   * Sascha Hauer, Pengutronix
> >   *
> > - * (C) Copyright 2009 Freescale Semiconductor, Inc.
> > + * (C) Copyright 2009-2010 Freescale Semiconductor, Inc.
> 
> I let someone with more legal experience as me to judge if this change
> is allowed or not. Normally, a new Copyright is added in case there is
> some important improvement that are not covered by the original file.
In
> this case, only a define was changed (CONFIG_MX51_HCLK_FREQ ->
> CONFIG_HCLK_FREQ).

Make sense, I will modify it.

> 
> > --- a/arch/arm/cpu/armv7/mx51/soc.c
> > +++ b/arch/arm/cpu/armv7/mx5/soc.c
> > @@ -2,7 +2,7 @@
> >   * (C) Copyright 2007
> >   * Sascha Hauer, Pengutronix
> >   *
> > - * (C) Copyright 2009 Freescale Semiconductor, Inc.
> > + * (C) Copyright 2009-2010 Freescale Semiconductor, Inc.
> >   *
> >   * See file CREDITS for list of people who contributed to this
> >   * project.
> > @@ -35,26 +35,25 @@
> >
> >  u32 get_cpu_rev(void)
> >  {
> > -	int reg;
> > -	int system_rev;
> > +	int system_rev = CONFIG_CPU_TYPE << 8;
> 
> CONFIG_CPU_TYPE is a new CONFIG_ switch, that should be not needed.
See
> my comments later.

Good point.

> 
> > diff --git a/boards.cfg b/boards.cfg
> > index 9226424..e144281 100644
> > --- a/boards.cfg
> > +++ b/boards.cfg
> > @@ -46,7 +46,7 @@ pm9263		arm	arm926ejs	-
ronetix
> 		at91
> >  jadecpu		arm	arm926ejs	jadecpu		syteco
> 	mb86r0x
> >  suen3		arm	arm926ejs	km_arm		keymile
> 	kirkwood
> >  rd6281a		arm	arm926ejs	-		Marvell
> 	kirkwood
> > -mx51evk		arm	armv7		mx51evk
freescale	mx51
> > +mx51evk		arm	armv7		mx51evk
freescale	mx5
> 
> It makes sense to change other boards with MX51 inside this patch and
> not with a separate patch. So add changes for the other board, too.

Agree.
 
> 
> > diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h
> > old mode 100644
> > new mode 100755
> > index 86a4731..363af3d
> > --- a/include/configs/mx51evk.h
> > +++ b/include/configs/mx51evk.h
> > @@ -1,7 +1,7 @@
> >  /*
> >   * Copyright (C) 2007, Guennadi Liakhovetski <lg@denx.de>
> >   *
> > - * (C) Copyright 2009 Freescale Semiconductor, Inc.
> > + * (C) Copyright 2009-2010 Freescale Semiconductor, Inc.
> >   *
> >   * Configuration settings for the MX51EVK Board
> >   *
> > @@ -28,10 +28,11 @@
> >   /* High Level Configuration Options */
> >
> >  #define CONFIG_MX51	/* in a mx51 */
> > +#define CONFIG_CPU_TYPE	51
> 
> Why do we have CONFIG_MX51 and CONFIG_CPU_TYPE ? It seems redundant. A
> board maintainer must set both and this makes no great sense. Can we
> derive CONFIG_CPU_TYPE (or its meaning) from CONFIG_MX51 when we need
?

Good point, I will modify it.

The v2 patch will be sent out for review soon. :)

BR,
Jason
> 
> 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
> =====================================================================

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 1/1] IMX: rename mx51 to mx5
  2010-10-15  2:22 Jason Liu
@ 2010-10-15 11:39 ` Stefano Babic
  2010-10-15 14:06   ` Liu Hui-R64343
  0 siblings, 1 reply; 4+ messages in thread
From: Stefano Babic @ 2010-10-15 11:39 UTC (permalink / raw)
  To: u-boot

On 10/15/2010 04:22 AM, Jason Liu wrote:
> Rename mx51 to mx5 in order to support more mx51
> like-style SOCs such as MX53 and the followings.
> 
> Signed-off-by: Jason Liu <r64343@freescale.com>

Hi Jason,

a little feedback. This patch is well-formed and I do not see the
corruption problems as with the former one.

However, the patch does not apply:

Applying: IMX: rename mx51 to mx5
error: patch failed: arch/arm/include/asm/arch-mx51/sys_proto.h:24
error: arch/arm/include/asm/arch-mx51/sys_proto.h: patch does not apply
error: patch failed: boards.cfg:46
error: boards.cfg: patch does not apply
Patch failed at 0001 IMX: rename mx51 to mx5

Have you applied the patch on the current u-boot.git tree ? It seems you
have to to rebase your patch.

Please increment the version of your patch to allow everybody to track
easier the changes. Something like [PATCH V2 1/1] makes the job.

> @@ -2,7 +2,7 @@
>   * (C) Copyright 2007
>   * Sascha Hauer, Pengutronix
>   *
> - * (C) Copyright 2009 Freescale Semiconductor, Inc.
> + * (C) Copyright 2009-2010 Freescale Semiconductor, Inc.

I let someone with more legal experience as me to judge if this change
is allowed or not. Normally, a new Copyright is added in case there is
some important improvement that are not covered by the original file. In
this case, only a define was changed (CONFIG_MX51_HCLK_FREQ ->
CONFIG_HCLK_FREQ).

> --- a/arch/arm/cpu/armv7/mx51/soc.c
> +++ b/arch/arm/cpu/armv7/mx5/soc.c
> @@ -2,7 +2,7 @@
>   * (C) Copyright 2007
>   * Sascha Hauer, Pengutronix
>   *
> - * (C) Copyright 2009 Freescale Semiconductor, Inc.
> + * (C) Copyright 2009-2010 Freescale Semiconductor, Inc.
>   *
>   * See file CREDITS for list of people who contributed to this
>   * project.
> @@ -35,26 +35,25 @@
>  
>  u32 get_cpu_rev(void)
>  {
> -	int reg;
> -	int system_rev;
> +	int system_rev = CONFIG_CPU_TYPE << 8;

CONFIG_CPU_TYPE is a new CONFIG_ switch, that should be not needed. See
my comments later.

> diff --git a/boards.cfg b/boards.cfg
> index 9226424..e144281 100644
> --- a/boards.cfg
> +++ b/boards.cfg
> @@ -46,7 +46,7 @@ pm9263		arm	arm926ejs	-		ronetix		at91
>  jadecpu		arm	arm926ejs	jadecpu		syteco		mb86r0x
>  suen3		arm	arm926ejs	km_arm		keymile		kirkwood
>  rd6281a		arm	arm926ejs	-		Marvell		kirkwood
> -mx51evk		arm	armv7		mx51evk		freescale	mx51
> +mx51evk		arm	armv7		mx51evk		freescale	mx5

It makes sense to change other boards with MX51 inside this patch and
not with a separate patch. So add changes for the other board, too.

> diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h
> old mode 100644
> new mode 100755
> index 86a4731..363af3d
> --- a/include/configs/mx51evk.h
> +++ b/include/configs/mx51evk.h
> @@ -1,7 +1,7 @@
>  /*
>   * Copyright (C) 2007, Guennadi Liakhovetski <lg@denx.de>
>   *
> - * (C) Copyright 2009 Freescale Semiconductor, Inc.
> + * (C) Copyright 2009-2010 Freescale Semiconductor, Inc.
>   *
>   * Configuration settings for the MX51EVK Board
>   *
> @@ -28,10 +28,11 @@
>   /* High Level Configuration Options */
>  
>  #define CONFIG_MX51	/* in a mx51 */
> +#define CONFIG_CPU_TYPE	51

Why do we have CONFIG_MX51 and CONFIG_CPU_TYPE ? It seems redundant. A
board maintainer must set both and this makes no great sense. Can we
derive CONFIG_CPU_TYPE (or its meaning) from CONFIG_MX51 when we need ?

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 1/1] IMX: rename mx51 to mx5
@ 2010-10-15  2:22 Jason Liu
  2010-10-15 11:39 ` Stefano Babic
  0 siblings, 1 reply; 4+ messages in thread
From: Jason Liu @ 2010-10-15  2:22 UTC (permalink / raw)
  To: u-boot

Rename mx51 to mx5 in order to support more mx51
like-style SOCs such as MX53 and the followings.

Signed-off-by: Jason Liu <r64343@freescale.com>
---
 arch/arm/cpu/armv7/{mx51 => mx5}/Makefile          |    0
 arch/arm/cpu/armv7/{mx51 => mx5}/clock.c           |   44 ++++++++++----------
 arch/arm/cpu/armv7/{mx51 => mx5}/iomux.c           |    4 +-
 arch/arm/cpu/armv7/{mx51 => mx5}/lowlevel_init.S   |    0
 arch/arm/cpu/armv7/{mx51 => mx5}/soc.c             |   24 +++++-----
 arch/arm/cpu/armv7/{mx51 => mx5}/speed.c           |    0
 arch/arm/cpu/armv7/{mx51 => mx5}/timer.c           |   10 ++--
 arch/arm/cpu/armv7/{mx51 => mx5}/u-boot.lds        |    0
 .../asm/{arch-mx51 => arch-mx5}/asm-offsets.h      |    0
 .../include/asm/{arch-mx51 => arch-mx5}/clock.h    |    0
 .../include/asm/{arch-mx51 => arch-mx5}/crm_regs.h |    0
 .../include/asm/{arch-mx51 => arch-mx5}/imx-regs.h |    0
 .../include/asm/{arch-mx51 => arch-mx5}/iomux.h    |   10 ++--
 .../mx51_pins.h => arch-mx5/mx5x_pins.h}           |    8 ++--
 .../asm/{arch-mx51 => arch-mx5}/sys_proto.h        |    3 +-
 board/freescale/mx51evk/mx51evk.c                  |    4 +-
 boards.cfg                                         |    2 +-
 include/configs/mx51evk.h                          |    7 ++-
 18 files changed, 59 insertions(+), 57 deletions(-)

diff --git a/arch/arm/cpu/armv7/mx51/Makefile b/arch/arm/cpu/armv7/mx5/Makefile
similarity index 100%
rename from arch/arm/cpu/armv7/mx51/Makefile
rename to arch/arm/cpu/armv7/mx5/Makefile
diff --git a/arch/arm/cpu/armv7/mx51/clock.c b/arch/arm/cpu/armv7/mx5/clock.c
old mode 100644
new mode 100755
similarity index 84%
rename from arch/arm/cpu/armv7/mx51/clock.c
rename to arch/arm/cpu/armv7/mx5/clock.c
index a27227d..840ee92
--- a/arch/arm/cpu/armv7/mx51/clock.c
+++ b/arch/arm/cpu/armv7/mx5/clock.c
@@ -2,7 +2,7 @@
  * (C) Copyright 2007
  * Sascha Hauer, Pengutronix
  *
- * (C) Copyright 2009 Freescale Semiconductor, Inc.
+ * (C) Copyright 2009-2010 Freescale Semiconductor, Inc.
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -71,7 +71,7 @@ u32 get_mcu_main_clk(void)
 
 	reg = (__raw_readl(&mxc_ccm->cacrr) & MXC_CCM_CACRR_ARM_PODF_MASK) >>
 		MXC_CCM_CACRR_ARM_PODF_OFFSET;
-	freq = decode_pll(mxc_plls[PLL1_CLOCK], CONFIG_MX51_HCLK_FREQ);
+	freq = decode_pll(mxc_plls[PLL1_CLOCK], CONFIG_HCLK_FREQ);
 	return freq / (reg + 1);
 }
 
@@ -84,14 +84,14 @@ static u32 get_periph_clk(void)
 
 	reg = __raw_readl(&mxc_ccm->cbcdr);
 	if (!(reg & MXC_CCM_CBCDR_PERIPH_CLK_SEL))
-		return decode_pll(mxc_plls[PLL2_CLOCK], CONFIG_MX51_HCLK_FREQ);
+		return decode_pll(mxc_plls[PLL2_CLOCK], CONFIG_HCLK_FREQ);
 	reg = __raw_readl(&mxc_ccm->cbcmr);
 	switch ((reg & MXC_CCM_CBCMR_PERIPH_CLK_SEL_MASK) >>
 		MXC_CCM_CBCMR_PERIPH_CLK_SEL_OFFSET) {
 	case 0:
-		return decode_pll(mxc_plls[PLL1_CLOCK], CONFIG_MX51_HCLK_FREQ);
+		return decode_pll(mxc_plls[PLL1_CLOCK], CONFIG_HCLK_FREQ);
 	case 1:
-		return decode_pll(mxc_plls[PLL3_CLOCK], CONFIG_MX51_HCLK_FREQ);
+		return decode_pll(mxc_plls[PLL3_CLOCK], CONFIG_HCLK_FREQ);
 	default:
 		return 0;
 	}
@@ -146,15 +146,15 @@ static u32 get_uart_clk(void)
 		MXC_CCM_CSCMR1_UART_CLK_SEL_OFFSET) {
 	case 0x0:
 		freq = decode_pll(mxc_plls[PLL1_CLOCK],
-				    CONFIG_MX51_HCLK_FREQ);
+				    CONFIG_HCLK_FREQ);
 		break;
 	case 0x1:
 		freq = decode_pll(mxc_plls[PLL2_CLOCK],
-				    CONFIG_MX51_HCLK_FREQ);
+				    CONFIG_HCLK_FREQ);
 		break;
 	case 0x2:
 		freq = decode_pll(mxc_plls[PLL3_CLOCK],
-				    CONFIG_MX51_HCLK_FREQ);
+				    CONFIG_HCLK_FREQ);
 		break;
 	default:
 		return 66500000;
@@ -181,7 +181,7 @@ u32 get_lp_apm(void)
 	u32 ccsr = __raw_readl(&mxc_ccm->ccsr);
 
 	if (((ccsr >> 9) & 1) == 0)
-		ret_val = CONFIG_MX51_HCLK_FREQ;
+		ret_val = CONFIG_HCLK_FREQ;
 	else
 		ret_val = ((32768 * 1024));
 
@@ -207,17 +207,17 @@ u32 imx_get_cspiclk(void)
 	switch (clk_sel) {
 	case 0:
 		ret_val = decode_pll(mxc_plls[PLL1_CLOCK],
-					CONFIG_MX51_HCLK_FREQ) /
+					CONFIG_HCLK_FREQ) /
 					((pre_pdf + 1) * (pdf + 1));
 		break;
 	case 1:
 		ret_val = decode_pll(mxc_plls[PLL2_CLOCK],
-					CONFIG_MX51_HCLK_FREQ) /
+					CONFIG_HCLK_FREQ) /
 					((pre_pdf + 1) * (pdf + 1));
 		break;
 	case 2:
 		ret_val = decode_pll(mxc_plls[PLL3_CLOCK],
-					CONFIG_MX51_HCLK_FREQ) /
+					CONFIG_HCLK_FREQ) /
 					((pre_pdf + 1) * (pdf + 1));
 		break;
 	default:
@@ -248,7 +248,7 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
 		return imx_get_cspiclk();
 	case MXC_FEC_CLK:
 		return decode_pll(mxc_plls[PLL1_CLOCK],
-				    CONFIG_MX51_HCLK_FREQ);
+				    CONFIG_HCLK_FREQ);
 	default:
 		break;
 	}
@@ -269,16 +269,16 @@ u32 imx_get_fecclk(void)
 /*
  * Dump some core clockes.
  */
-int do_mx51_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
 	u32 freq;
 
-	freq = decode_pll(mxc_plls[PLL1_CLOCK], CONFIG_MX51_HCLK_FREQ);
-	printf("mx51 pll1: %dMHz\n", freq / 1000000);
-	freq = decode_pll(mxc_plls[PLL2_CLOCK], CONFIG_MX51_HCLK_FREQ);
-	printf("mx51 pll2: %dMHz\n", freq / 1000000);
-	freq = decode_pll(mxc_plls[PLL3_CLOCK], CONFIG_MX51_HCLK_FREQ);
-	printf("mx51 pll3: %dMHz\n", freq / 1000000);
+	freq = decode_pll(mxc_plls[PLL1_CLOCK], CONFIG_HCLK_FREQ);
+	printf("pll1: %dMHz\n", freq / 1000000);
+	freq = decode_pll(mxc_plls[PLL2_CLOCK], CONFIG_HCLK_FREQ);
+	printf("pll2: %dMHz\n", freq / 1000000);
+	freq = decode_pll(mxc_plls[PLL3_CLOCK], CONFIG_HCLK_FREQ);
+	printf("pll3: %dMHz\n", freq / 1000000);
 	printf("ipg clock     : %dHz\n", mxc_get_clock(MXC_IPG_CLK));
 	printf("ipg per clock : %dHz\n", mxc_get_clock(MXC_IPG_PERCLK));
 
@@ -288,7 +288,7 @@ int do_mx51_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]
 /***************************************************/
 
 U_BOOT_CMD(
-	clockinfo,	CONFIG_SYS_MAXARGS,	1,	do_mx51_showclocks,
-	"display mx51 clocks\n",
+	clockinfo,	CONFIG_SYS_MAXARGS,	1,	do_showclocks,
+	"display clocks\n",
 	""
 );
diff --git a/arch/arm/cpu/armv7/mx51/iomux.c b/arch/arm/cpu/armv7/mx5/iomux.c
similarity index 98%
rename from arch/arm/cpu/armv7/mx51/iomux.c
rename to arch/arm/cpu/armv7/mx5/iomux.c
index 62b2954..43cfc69 100644
--- a/arch/arm/cpu/armv7/mx51/iomux.c
+++ b/arch/arm/cpu/armv7/mx5/iomux.c
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2009 Freescale Semiconductor, Inc.
+ * (C) Copyright 2009-2010 Freescale Semiconductor, Inc.
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -23,7 +23,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
-#include <asm/arch/mx51_pins.h>
+#include <asm/arch/mx5x_pins.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/sys_proto.h>
 
diff --git a/arch/arm/cpu/armv7/mx51/lowlevel_init.S b/arch/arm/cpu/armv7/mx5/lowlevel_init.S
similarity index 100%
rename from arch/arm/cpu/armv7/mx51/lowlevel_init.S
rename to arch/arm/cpu/armv7/mx5/lowlevel_init.S
diff --git a/arch/arm/cpu/armv7/mx51/soc.c b/arch/arm/cpu/armv7/mx5/soc.c
old mode 100644
new mode 100755
similarity index 82%
rename from arch/arm/cpu/armv7/mx51/soc.c
rename to arch/arm/cpu/armv7/mx5/soc.c
index f22ebe9..f4c0bde
--- a/arch/arm/cpu/armv7/mx51/soc.c
+++ b/arch/arm/cpu/armv7/mx5/soc.c
@@ -2,7 +2,7 @@
  * (C) Copyright 2007
  * Sascha Hauer, Pengutronix
  *
- * (C) Copyright 2009 Freescale Semiconductor, Inc.
+ * (C) Copyright 2009-2010 Freescale Semiconductor, Inc.
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -35,26 +35,25 @@
 
 u32 get_cpu_rev(void)
 {
-	int reg;
-	int system_rev;
+	int system_rev = CONFIG_CPU_TYPE << 8;
+	int reg = __raw_readl(ROM_SI_REV);
 
-	reg = __raw_readl(ROM_SI_REV);
 	switch (reg) {
 	case 0x02:
-		system_rev = 0x51000 | CHIP_REV_1_1;
+		system_rev |= CHIP_REV_1_1;
 		break;
 	case 0x10:
 		if ((__raw_readl(GPIO1_BASE_ADDR + 0x0) & (0x1 << 22)) == 0)
-			system_rev = 0x51000 | CHIP_REV_2_5;
+			system_rev |= CHIP_REV_2_5;
 		else
-			system_rev = 0x51000 | CHIP_REV_2_0;
+			system_rev |= CHIP_REV_2_0;
 		break;
 	case 0x20:
-		system_rev = 0x51000 | CHIP_REV_3_0;
+		system_rev |= CHIP_REV_3_0;
 		break;
 	return system_rev;
 	default:
-		system_rev = 0x51000 | CHIP_REV_1_0;
+		system_rev |= CHIP_REV_1_0;
 		break;
 	}
 	return system_rev;
@@ -67,9 +66,10 @@ int print_cpuinfo(void)
 	u32 cpurev;
 
 	cpurev = get_cpu_rev();
-	printf("CPU:   Freescale i.MX51 family rev%d.%d@%d MHz\n",
-		(cpurev & 0xF0) >> 4,
-		(cpurev & 0x0F) >> 4,
+	printf("CPU:   Freescale i.MX%d family rev%d.%d at %d MHz\n",
+		(cpurev & 0xFF00) >> 8,
+		(cpurev & 0x00F0) >> 4,
+		(cpurev & 0x000F) >> 4,
 		mxc_get_clock(MXC_ARM_CLK) / 1000000);
 	return 0;
 }
diff --git a/arch/arm/cpu/armv7/mx51/speed.c b/arch/arm/cpu/armv7/mx5/speed.c
similarity index 100%
rename from arch/arm/cpu/armv7/mx51/speed.c
rename to arch/arm/cpu/armv7/mx5/speed.c
diff --git a/arch/arm/cpu/armv7/mx51/timer.c b/arch/arm/cpu/armv7/mx5/timer.c
old mode 100644
new mode 100755
similarity index 90%
rename from arch/arm/cpu/armv7/mx51/timer.c
rename to arch/arm/cpu/armv7/mx5/timer.c
index 110edbf..100643d
--- a/arch/arm/cpu/armv7/mx51/timer.c
+++ b/arch/arm/cpu/armv7/mx5/timer.c
@@ -2,7 +2,7 @@
  * (C) Copyright 2007
  * Sascha Hauer, Pengutronix
  *
- * (C) Copyright 2009 Freescale Semiconductor, Inc.
+ * (C) Copyright 2009-2010 Freescale Semiconductor, Inc.
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -75,18 +75,18 @@ void reset_timer(void)
 void reset_timer_masked(void)
 {
 	ulong val = __raw_readl(&cur_gpt->counter);
-	lastinc = val / (CONFIG_MX51_CLK32 / CONFIG_SYS_HZ);
+	lastinc = val / (CONFIG_CLK32 / CONFIG_SYS_HZ);
 	timestamp = 0;
 }
 
 ulong get_timer_masked(void)
 {
 	ulong val = __raw_readl(&cur_gpt->counter);
-	val /= (CONFIG_MX51_CLK32 / CONFIG_SYS_HZ);
+	val /= (CONFIG_CLK32 / CONFIG_SYS_HZ);
 	if (val >= lastinc)
 		timestamp += (val - lastinc);
 	else
-		timestamp += ((0xFFFFFFFF / (CONFIG_MX51_CLK32 / CONFIG_SYS_HZ))
+		timestamp += ((0xFFFFFFFF / (CONFIG_CLK32 / CONFIG_SYS_HZ))
 				- lastinc) + val;
 	lastinc = val;
 	return timestamp;
@@ -106,7 +106,7 @@ void set_timer(ulong t)
 void __udelay(unsigned long usec)
 {
 	unsigned long now, start, tmo;
-	tmo = usec * (CONFIG_MX51_CLK32 / 1000) / 1000;
+	tmo = usec * (CONFIG_CLK32 / 1000) / 1000;
 
 	if (!tmo)
 		tmo = 1;
diff --git a/arch/arm/cpu/armv7/mx51/u-boot.lds b/arch/arm/cpu/armv7/mx5/u-boot.lds
similarity index 100%
rename from arch/arm/cpu/armv7/mx51/u-boot.lds
rename to arch/arm/cpu/armv7/mx5/u-boot.lds
diff --git a/arch/arm/include/asm/arch-mx51/asm-offsets.h b/arch/arm/include/asm/arch-mx5/asm-offsets.h
similarity index 100%
rename from arch/arm/include/asm/arch-mx51/asm-offsets.h
rename to arch/arm/include/asm/arch-mx5/asm-offsets.h
diff --git a/arch/arm/include/asm/arch-mx51/clock.h b/arch/arm/include/asm/arch-mx5/clock.h
similarity index 100%
rename from arch/arm/include/asm/arch-mx51/clock.h
rename to arch/arm/include/asm/arch-mx5/clock.h
diff --git a/arch/arm/include/asm/arch-mx51/crm_regs.h b/arch/arm/include/asm/arch-mx5/crm_regs.h
similarity index 100%
rename from arch/arm/include/asm/arch-mx51/crm_regs.h
rename to arch/arm/include/asm/arch-mx5/crm_regs.h
diff --git a/arch/arm/include/asm/arch-mx51/imx-regs.h b/arch/arm/include/asm/arch-mx5/imx-regs.h
similarity index 100%
rename from arch/arm/include/asm/arch-mx51/imx-regs.h
rename to arch/arm/include/asm/arch-mx5/imx-regs.h
diff --git a/arch/arm/include/asm/arch-mx51/iomux.h b/arch/arm/include/asm/arch-mx5/iomux.h
similarity index 97%
rename from arch/arm/include/asm/arch-mx51/iomux.h
rename to arch/arm/include/asm/arch-mx5/iomux.h
index a41c387..4eabee7 100644
--- a/arch/arm/include/asm/arch-mx51/iomux.h
+++ b/arch/arm/include/asm/arch-mx5/iomux.h
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2008-2009 Freescale Semiconductor, Inc.
+ * (C) Copyright 2008-2010 Freescale Semiconductor, Inc.
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -20,13 +20,13 @@
  * MA 02111-1307 USA
  */
 
-#ifndef __MACH_MX51_IOMUX_H__
-#define __MACH_MX51_IOMUX_H__
+#ifndef __MACH_MX5_IOMUX_H__
+#define __MACH_MX5_IOMUX_H__
 
 #include <common.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
-#include <asm/arch/mx51_pins.h>
+#include <asm/arch/mx5x_pins.h>
 
 typedef unsigned int iomux_pin_name_t;
 
@@ -190,4 +190,4 @@ void mxc_iomux_set_pad(iomux_pin_name_t pin, u32 config);
 unsigned int mxc_iomux_get_pad(iomux_pin_name_t pin);
 void mxc_iomux_set_input(iomux_input_select_t input, u32 config);
 
-#endif				/*  __MACH_MX51_IOMUX_H__ */
+#endif				/*  __MACH_MX5_IOMUX_H__ */
diff --git a/arch/arm/include/asm/arch-mx51/mx51_pins.h b/arch/arm/include/asm/arch-mx5/mx5x_pins.h
similarity index 99%
rename from arch/arm/include/asm/arch-mx51/mx51_pins.h
rename to arch/arm/include/asm/arch-mx5/mx5x_pins.h
index ca26f41..a73187e 100644
--- a/arch/arm/include/asm/arch-mx51/mx51_pins.h
+++ b/arch/arm/include/asm/arch-mx5/mx5x_pins.h
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2008-2009 Freescale Semiconductor, Inc.
+ * (C) Copyright 2008-2010 Freescale Semiconductor, Inc.
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -20,8 +20,8 @@
  * MA 02111-1307 USA
  */
 
-#ifndef __ASM_ARCH_MXC_MX51_PINS_H__
-#define __ASM_ARCH_MXC_MX51_PINS_H__
+#ifndef __ASM_ARCH_MX5_MX5X_PINS_H__
+#define __ASM_ARCH_MX5_MX5X_PINS_H__
 
 #ifndef __ASSEMBLY__
 
@@ -371,4 +371,4 @@ enum iomux_pins {
 };
 
 #endif				/* __ASSEMBLY__ */
-#endif				/* __ASM_ARCH_MXC_MX51_PINS_H__ */
+#endif				/* __ASM_ARCH_MX5_MX5X_PINS_H__ */
diff --git a/arch/arm/include/asm/arch-mx51/sys_proto.h b/arch/arm/include/asm/arch-mx5/sys_proto.h
old mode 100644
new mode 100755
similarity index 93%
rename from arch/arm/include/asm/arch-mx51/sys_proto.h
rename to arch/arm/include/asm/arch-mx5/sys_proto.h
index bf500a8..ab771f7
--- a/arch/arm/include/asm/arch-mx51/sys_proto.h
+++ b/arch/arm/include/asm/arch-mx5/sys_proto.h
@@ -24,7 +24,8 @@
 #ifndef _SYS_PROTO_H_
 #define _SYS_PROTO_H_
 
-u32 get_cpu_rev(void);
 #define is_soc_rev(rev)	((get_cpu_rev() & 0xFF) - rev)
+#define is_soc_type(rev)((((get_cpu_rev() & 0xFF00)) >> 8) - rev)
+u32 get_cpu_rev(void);
 
 #endif
diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c
old mode 100644
new mode 100755
index 75d642b..4b52536
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2009 Freescale Semiconductor, Inc.
+ * (C) Copyright 2009-2010 Freescale Semiconductor, Inc.
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -23,7 +23,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
-#include <asm/arch/mx51_pins.h>
+#include <asm/arch/mx5x_pins.h>
 #include <asm/arch/iomux.h>
 #include <asm/errno.h>
 #include <asm/arch/sys_proto.h>
diff --git a/boards.cfg b/boards.cfg
index 9226424..e144281 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -46,7 +46,7 @@ pm9263		arm	arm926ejs	-		ronetix		at91
 jadecpu		arm	arm926ejs	jadecpu		syteco		mb86r0x
 suen3		arm	arm926ejs	km_arm		keymile		kirkwood
 rd6281a		arm	arm926ejs	-		Marvell		kirkwood
-mx51evk		arm	armv7		mx51evk		freescale	mx51
+mx51evk		arm	armv7		mx51evk		freescale	mx5
 actux1		arm	ixp
 actux2		arm	ixp
 actux3		arm	ixp
diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h
old mode 100644
new mode 100755
index 86a4731..363af3d
--- a/include/configs/mx51evk.h
+++ b/include/configs/mx51evk.h
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2007, Guennadi Liakhovetski <lg@denx.de>
  *
- * (C) Copyright 2009 Freescale Semiconductor, Inc.
+ * (C) Copyright 2009-2010 Freescale Semiconductor, Inc.
  *
  * Configuration settings for the MX51EVK Board
  *
@@ -28,10 +28,11 @@
  /* High Level Configuration Options */
 
 #define CONFIG_MX51	/* in a mx51 */
+#define CONFIG_CPU_TYPE	51
 #define CONFIG_SKIP_RELOCATE_UBOOT
 
-#define CONFIG_MX51_HCLK_FREQ		24000000	/* RedBoot says 26MHz */
-#define CONFIG_MX51_CLK32		32768
+#define CONFIG_HCLK_FREQ	24000000
+#define CONFIG_CLK32		32768
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO
 
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-15 14:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1287053835-29339-1-git-send-email-r64343@freescale.com>
2010-10-14 13:39 ` [U-Boot] [PATCH 1/1] IMX: rename mx51 to mx5 Stefano Babic
2010-10-15  2:22 Jason Liu
2010-10-15 11:39 ` Stefano Babic
2010-10-15 14:06   ` Liu Hui-R64343

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.