Re: [U-Boot] [PATCH v2 1/6] arm: mvf600: Add Vybrid MVF600 CPU support

2013-05-15 Thread Stefano Babic
On 14/05/2013 11:51, Alison Wang wrote:
 This patch adds generic codes to support Freescale's Vybrid MVF600 CPU.
 
 It aligns Vybrid MVF600 platform with i.MX platform. As there are
 some differences between MVF600 and i.MX platforms, the specific
 codes are in the arch/arm/cpu/armv7/mvf600 directory.
 
 Signed-off-by: Alison Wang b18...@freescale.com
 ---

Hi Alison,

 Changes in v2:
 - Remove vybrid-common directory
 - Rename directory name 'vybrid' to 'mvf600'
 - Add generic.c file
 - Rewrite get_reset_cause() to make it readable
 - Remove reset_cpu(), and use the function in imx_watchdog.c
 - Rewrite timer.c file
 - Use vybrid_get_clock(VYBRID_UART_CLK) instead of vybrid_get_uartclk()
 - Remove lowlevel_init.S, and add clock_init() in board_early_init_f()
 - Remove useless CONFIG_SYS_ defines
 - Move CONFIG_MACH_TYPE to board configuration file
 - Define C structures and access C structures to set/read registers
 - Remove useless errata
 - Remove useless macros
 - Rename directory 'arch-vybrid' to 'arch-mvf600' 
 
  Makefile|   2 +-
  arch/arm/cpu/armv7/mvf600/Makefile  |  42 
  arch/arm/cpu/armv7/mvf600/generic.c | 309 
 

Just a minor concern here. The SOC is a ARMv5, but files go into the
armv7 directory. Maybe the bigger issue can be with the increasing
number of work-around (CONFIG_ERRATA) that flow into start.S for armv7,
that are specific only for armv7. I know that for ARMv5 we split
differently instead of ARM architecture (ARM926,...).

Albert, what do you think about ? Should these files be moved away from
armv7 ?

 +unsigned int mvf_get_clock(enum mvf_clock clk)
 +{
 + switch (clk) {
 + case MVF_ARM_CLK:
 + return get_mcu_main_clk();
 + case MVF_BUS_CLK:
 + return get_bus_clk();
 + case MVF_IPG_CLK:
 + return get_ipg_clk();
 + case MVF_UART_CLK:
 + return get_uart_clk();
 + case MVF_ESDHC_CLK:
 + return get_sdhc_clk();
 + case MVF_FEC_CLK:
 + return get_fec_clk();
 + default:
 + break;
 + }
 + return -1;
 +}

Ok - we have the same structure as for i.MX. I agree with you that the
name of the function mxc_get_clock() is not anymore correct, after some
other Freescale's SOC families were introduced. However, it is still
important to have a common API to expone a SOC to a board maintainer.

If you see, the mxs family (MX23 / MX28) has a mxc_get_clock(), even if
most internal functions are marked as mxs_. I think we can later change
the name for this function (maybe this is not the only one) to make the
name clearer and not specific to i.MX, but then it is will be easier if
all SOCs use the same names. For this reason, it is better to rename
this function to mxc_get_clock() and please take the same enums that are
already set for the other Freescale's SOCs.

 +
 +#ifdef CONFIG_FEC_MXC
 +void imx_get_mac_from_fuse(int dev_id, unsigned char *mac)
 +{
 + struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;
 + struct fuse_bank *bank = ocotp-bank[4];
 + struct fuse_bank4_regs *fuse =
 + (struct fuse_bank4_regs *)bank-fuse_regs;
 +
 + u32 value = readl(fuse-mac_addr0);
 + mac[0] = (value  8);
 + mac[1] = value;

To my knowledge : is the whole MAC stored in the ocotp ? No need to add
the first bytes (vendor-id) as we had for MX28 ?

 diff --git a/arch/arm/cpu/armv7/mvf600/timer.c 
 b/arch/arm/cpu/armv7/mvf600/timer.c
 new file mode 100644
 index 000..99ca57d
 --- /dev/null
 +++ b/arch/arm/cpu/armv7/mvf600/timer.c
 @@ -0,0 +1,144 @@
 +/*
 + * Copyright 2013 Freescale Semiconductor, Inc.
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License as
 + * published by the Free Software Foundation; either version 2 of
 + * the License, or (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 + * MA 02111-1307 USA
 + */
 +
 +#include common.h
 +#include asm/io.h
 +#include div64.h
 +#include asm/arch/imx-regs.h
 +#include asm/arch/clock.h
 +
 +/* Periodic interrupt timer registers */
 +struct pit_reg {
 + u32 mcr;
 + u32 recv0[55];
 + u32 ltmr64h;
 + u32 ltmr64l;
 + u32 recv1[6];
 + u32 ldval0;
 + u32 cval0;
 + u32 tctrl0;
 + u32 tflg0;
 + u32 ldval1;
 + u32 cval1;
 + u32 tctrl1;
 + u32 tflg1;
 + u32 ldval2;
 + u32 cval2;
 + u32 tctrl2;
 + u32 tflg2;
 + u32 ldval3;
 + 

Re: [U-Boot] [PATCH v2 1/6] arm: mvf600: Add Vybrid MVF600 CPU support

2013-05-15 Thread Albert ARIBAUD
Hi Stefano,

On Wed, 15 May 2013 10:13:36 +0200, Stefano Babic sba...@denx.de
wrote:

 On 14/05/2013 11:51, Alison Wang wrote:
  This patch adds generic codes to support Freescale's Vybrid MVF600 CPU.
  
  It aligns Vybrid MVF600 platform with i.MX platform. As there are
  some differences between MVF600 and i.MX platforms, the specific
  codes are in the arch/arm/cpu/armv7/mvf600 directory.
  
  Signed-off-by: Alison Wang b18...@freescale.com
  ---
 
 Hi Alison,
 
  Changes in v2:
  - Remove vybrid-common directory
  - Rename directory name 'vybrid' to 'mvf600'
  - Add generic.c file
  - Rewrite get_reset_cause() to make it readable
  - Remove reset_cpu(), and use the function in imx_watchdog.c
  - Rewrite timer.c file
  - Use vybrid_get_clock(VYBRID_UART_CLK) instead of vybrid_get_uartclk()
  - Remove lowlevel_init.S, and add clock_init() in board_early_init_f()
  - Remove useless CONFIG_SYS_ defines
  - Move CONFIG_MACH_TYPE to board configuration file
  - Define C structures and access C structures to set/read registers
  - Remove useless errata
  - Remove useless macros
  - Rename directory 'arch-vybrid' to 'arch-mvf600' 
  
   Makefile|   2 +-
   arch/arm/cpu/armv7/mvf600/Makefile  |  42 
   arch/arm/cpu/armv7/mvf600/generic.c | 309 
  
 
 Just a minor concern here. The SOC is a ARMv5, but files go into the
 armv7 directory. Maybe the bigger issue can be with the increasing
 number of work-around (CONFIG_ERRATA) that flow into start.S for armv7,
 that are specific only for armv7. I know that for ARMv5 we split
 differently instead of ARM architecture (ARM926,...).
 
 Albert, what do you think about ? Should these files be moved away from
 armv7 ?

If the SoC is ARMv5, then yes, its arch/arm/cpu files should not go in
armv7 -- and then, we may have to discuss whether, and how, to factorize
ISA-level code. Maybe we need an arch/arm/isa/armv{4,5,6,7...} beside
arch/cpu, and move wherever is isa-specific there.

Regarding errata, I don't understand your point: if they are specific
to armv7, then arch/arm/cpu/armv7/start.S seems to be the place to put
them (assuming they affect execution before board_init_f() of course).

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


Re: [U-Boot] [PATCH v2 1/6] arm: mvf600: Add Vybrid MVF600 CPU support

2013-05-15 Thread Stefano Babic
On 15/05/2013 14:09, Albert ARIBAUD wrote:

 Albert, what do you think about ? Should these files be moved away from
 armv7 ?
 
 If the SoC is ARMv5, then yes, its arch/arm/cpu files should not go in
 armv7 -- and then, we may have to discuss whether, and how, to factorize
 ISA-level code. Maybe we need an arch/arm/isa/armv{4,5,6,7...} beside
 arch/cpu, and move wherever is isa-specific there.

Agree. I think adding armv{4,5,6,7...} is the most clean solution.

 
 Regarding errata, I don't understand your point: if they are specific
 to armv7, then arch/arm/cpu/armv7/start.S seems to be the place to put
 them (assuming they affect execution before board_init_f() of course).

I was not able to express my point, sorry. Of course, the right place
for them is arch/arm/cpu/armv7/start.S. My concern was related to this
SOC, as it seems it steals armv7 code but it is not armv7. Then changes
in start.S, that fixes real problems for armv7, can break this Vybrid.
But the reason is that Vybrid initialization should not be taken from
arch/arm/cpu/armv7/start.S.

Best regards,
Stefano

-- 
=
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: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/6] arm: mvf600: Add Vybrid MVF600 CPU support

2013-05-15 Thread Albert ARIBAUD
Hi Stefano,

On Wed, 15 May 2013 14:24:33 +0200, Stefano Babic sba...@denx.de
wrote:

 On 15/05/2013 14:09, Albert ARIBAUD wrote:
 
  Albert, what do you think about ? Should these files be moved away from
  armv7 ?
  
  If the SoC is ARMv5, then yes, its arch/arm/cpu files should not go in
  armv7 -- and then, we may have to discuss whether, and how, to factorize
  ISA-level code. Maybe we need an arch/arm/isa/armv{4,5,6,7...} beside
  arch/cpu, and move wherever is isa-specific there.
 
 Agree. I think adding armv{4,5,6,7...} is the most clean solution.

This is a clean solution, but do we have the problem? IOW, do we have a
substantial quantity of code that is common to a given ISA but neither
generic to ARM (if it were, it would go to arch/arm or arch/arm/lib) nor
specific to a CPU (if it were, then it should stay under arch/arm/cpu/)?
If we do then moving this code under an isa tree makes sense; if we
don't, then arch/arm/cpu/cpu/soc is enough, and mvf600 just jas to
move under arch/arm/cpu/ and copy the few ARMv5 snippets it needs from
another ARMv5-based cpu.

IMO, the proof is in the pudding: if I see a patch that creates e.g.
arch/arm/isa/armv5 and factorizes isa code there from cpu subdirs, and
if this results in a smaller codebase (apart from doc) and no binary
size increase, then I'll ack it and apply it [albeit on next as the
merge window is now closed].

  Regarding errata, I don't understand your point: if they are specific
  to armv7, then arch/arm/cpu/armv7/start.S seems to be the place to put
  them (assuming they affect execution before board_init_f() of course).
 
 I was not able to express my point, sorry. Of course, the right place
 for them is arch/arm/cpu/armv7/start.S. My concern was related to this
 SOC, as it seems it steals armv7 code but it is not armv7. Then changes
 in start.S, that fixes real problems for armv7, can break this Vybrid.
 But the reason is that Vybrid initialization should not be taken from
 arch/arm/cpu/armv7/start.S.

I understand now, and this is a valid point -- all the more a reason to
move mvf600 under arch/cpu/, with or without factorizing armv5 code.

 Best regards,
 Stefano

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


Re: [U-Boot] [PATCH v2 1/6] arm: mvf600: Add Vybrid MVF600 CPU support

2013-05-15 Thread Stefano Babic
On 15/05/2013 14:39, Albert ARIBAUD wrote:
 Hi Stefano,
 

Hi Albert, hi Alison,

 Agree. I think adding armv{4,5,6,7...} is the most clean solution.
 
 This is a clean solution, but do we have the problem? IOW, do we have a
 substantial quantity of code that is common to a given ISA but neither
 generic to ARM (if it were, it would go to arch/arm or arch/arm/lib) nor
 specific to a CPU (if it were, then it should stay under arch/arm/cpu/)?
 If we do then moving this code under an isa tree makes sense; if we
 don't, then arch/arm/cpu/cpu/soc is enough, and mvf600 just jas to
 move under arch/arm/cpu/ and copy the few ARMv5 snippets it needs from
 another ARMv5-based cpu.

Roght - this is also a clean solution, because we have already arm926
and so on. Alison, please check how you can move your initialization
code as Alber suggested.

Best regards,
Stefano


-- 
=
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: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/6] arm: mvf600: Add Vybrid MVF600 CPU support

2013-05-15 Thread Wang Huan-B18965
Hi, Stefano,

 
 On 14/05/2013 11:51, Alison Wang wrote:
  This patch adds generic codes to support Freescale's Vybrid MVF600 CPU.
 
  It aligns Vybrid MVF600 platform with i.MX platform. As there are some
  differences between MVF600 and i.MX platforms, the specific codes are
  in the arch/arm/cpu/armv7/mvf600 directory.
 
  Signed-off-by: Alison Wang b18...@freescale.com
  ---
 
 Hi Alison,
 
  Changes in v2:
  - Remove vybrid-common directory
  - Rename directory name 'vybrid' to 'mvf600'
  - Add generic.c file
  - Rewrite get_reset_cause() to make it readable
  - Remove reset_cpu(), and use the function in imx_watchdog.c
  - Rewrite timer.c file
  - Use vybrid_get_clock(VYBRID_UART_CLK) instead of
  vybrid_get_uartclk()
  - Remove lowlevel_init.S, and add clock_init() in board_early_init_f()
  - Remove useless CONFIG_SYS_ defines
  - Move CONFIG_MACH_TYPE to board configuration file
  - Define C structures and access C structures to set/read registers
  - Remove useless errata
  - Remove useless macros
  - Rename directory 'arch-vybrid' to 'arch-mvf600'
 
   Makefile|   2 +-
   arch/arm/cpu/armv7/mvf600/Makefile  |  42 
   arch/arm/cpu/armv7/mvf600/generic.c | 309
 
 
 Just a minor concern here. The SOC is a ARMv5, but files go into the
 armv7 directory. Maybe the bigger issue can be with the increasing number
 of work-around (CONFIG_ERRATA) that flow into start.S for armv7, that are
 specific only for armv7. I know that for ARMv5 we split differently
 instead of ARM architecture (ARM926,...).
 
 Albert, what do you think about ? Should these files be moved away from
 armv7 ?
 
  +unsigned int mvf_get_clock(enum mvf_clock clk) {
  +   switch (clk) {
  +   case MVF_ARM_CLK:
  +   return get_mcu_main_clk();
  +   case MVF_BUS_CLK:
  +   return get_bus_clk();
  +   case MVF_IPG_CLK:
  +   return get_ipg_clk();
  +   case MVF_UART_CLK:
  +   return get_uart_clk();
  +   case MVF_ESDHC_CLK:
  +   return get_sdhc_clk();
  +   case MVF_FEC_CLK:
  +   return get_fec_clk();
  +   default:
  +   break;
  +   }
  +   return -1;
  +}
 
 Ok - we have the same structure as for i.MX. I agree with you that the
 name of the function mxc_get_clock() is not anymore correct, after some
 other Freescale's SOC families were introduced. However, it is still
 important to have a common API to expone a SOC to a board maintainer.
 
 If you see, the mxs family (MX23 / MX28) has a mxc_get_clock(), even if
 most internal functions are marked as mxs_. I think we can later change
 the name for this function (maybe this is not the only one) to make the
 name clearer and not specific to i.MX, but then it is will be easier if
 all SOCs use the same names. For this reason, it is better to rename this
 function to mxc_get_clock() and please take the same enums that are
 already set for the other Freescale's SOCs.
[Alison Wang] Agree. I will rename this function to mxc_get_clock() and take the
same enums. Thanks.
 
  +
  +#ifdef CONFIG_FEC_MXC
  +void imx_get_mac_from_fuse(int dev_id, unsigned char *mac) {
  +   struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;
  +   struct fuse_bank *bank = ocotp-bank[4];
  +   struct fuse_bank4_regs *fuse =
  +   (struct fuse_bank4_regs *)bank-fuse_regs;
  +
  +   u32 value = readl(fuse-mac_addr0);
  +   mac[0] = (value  8);
  +   mac[1] = value;
 
 To my knowledge : is the whole MAC stored in the ocotp ? No need to add
 the first bytes (vendor-id) as we had for MX28 ?
[Alison Wang] Yes, the whole MAC is stored in the ocotp for Vybrid.
 
  diff --git a/arch/arm/cpu/armv7/mvf600/timer.c
  b/arch/arm/cpu/armv7/mvf600/timer.c
  new file mode 100644
  index 000..99ca57d
  --- /dev/null
  +++ b/arch/arm/cpu/armv7/mvf600/timer.c
  @@ -0,0 +1,144 @@
  +/*
  + * Copyright 2013 Freescale Semiconductor, Inc.
  + *
  + * This program is free software; you can redistribute it and/or
  + * modify it under the terms of the GNU General Public License as
  + * published by the Free Software Foundation; either version 2 of
  + * the License, or (at your option) any later version.
  + *
  + * This program is distributed in the hope that it will be useful,
  + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  + * GNU General Public License for more details.
  + *
  + * You should have received a copy of the GNU General Public License
  + * along with this program; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  + * MA 02111-1307 USA
  + */
  +
  +#include common.h
  +#include asm/io.h
  +#include div64.h
  +#include asm/arch/imx-regs.h
  +#include asm/arch/clock.h
  +
  +/* Periodic interrupt timer registers */ struct pit_reg {
  +   u32 mcr;
  +   u32 recv0[55];
  +   u32 ltmr64h;
  +   u32 ltmr64l;
  +   u32 recv1[6];
  +   

[U-Boot] [PATCH v2 1/6] arm: mvf600: Add Vybrid MVF600 CPU support

2013-05-14 Thread Alison Wang
This patch adds generic codes to support Freescale's Vybrid MVF600 CPU.

It aligns Vybrid MVF600 platform with i.MX platform. As there are
some differences between MVF600 and i.MX platforms, the specific
codes are in the arch/arm/cpu/armv7/mvf600 directory.

Signed-off-by: Alison Wang b18...@freescale.com
---
Changes in v2:
- Remove vybrid-common directory
- Rename directory name 'vybrid' to 'mvf600'
- Add generic.c file
- Rewrite get_reset_cause() to make it readable
- Remove reset_cpu(), and use the function in imx_watchdog.c
- Rewrite timer.c file
- Use vybrid_get_clock(VYBRID_UART_CLK) instead of vybrid_get_uartclk()
- Remove lowlevel_init.S, and add clock_init() in board_early_init_f()
- Remove useless CONFIG_SYS_ defines
- Move CONFIG_MACH_TYPE to board configuration file
- Define C structures and access C structures to set/read registers
- Remove useless errata
- Remove useless macros
- Rename directory 'arch-vybrid' to 'arch-mvf600' 

 Makefile|   2 +-
 arch/arm/cpu/armv7/mvf600/Makefile  |  42 
 arch/arm/cpu/armv7/mvf600/generic.c | 309 
 arch/arm/cpu/armv7/mvf600/timer.c   | 144 +
 arch/arm/include/asm/arch-mvf600/clock.h|  38 
 arch/arm/include/asm/arch-mvf600/crm_regs.h | 170 +++
 arch/arm/include/asm/arch-mvf600/imx-regs.h | 201 ++
 arch/arm/include/asm/arch-mvf600/mvf_pins.h |  92 +
 8 files changed, 997 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/cpu/armv7/mvf600/Makefile
 create mode 100644 arch/arm/cpu/armv7/mvf600/generic.c
 create mode 100644 arch/arm/cpu/armv7/mvf600/timer.c
 create mode 100644 arch/arm/include/asm/arch-mvf600/clock.h
 create mode 100644 arch/arm/include/asm/arch-mvf600/crm_regs.h
 create mode 100644 arch/arm/include/asm/arch-mvf600/imx-regs.h
 create mode 100644 arch/arm/include/asm/arch-mvf600/mvf_pins.h

diff --git a/Makefile b/Makefile
index c52f0f1..9df2138 100644
--- a/Makefile
+++ b/Makefile
@@ -341,7 +341,7 @@ ifneq 
($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(C
 LIBS-y += $(CPUDIR)/omap-common/libomap-common.o
 endif
 
-ifneq (,$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35 mxs))
+ifneq (,$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35 mxs mvf600))
 LIBS-y += arch/$(ARCH)/imx-common/libimx-common.o
 endif
 
diff --git a/arch/arm/cpu/armv7/mvf600/Makefile 
b/arch/arm/cpu/armv7/mvf600/Makefile
new file mode 100644
index 000..9232cd4
--- /dev/null
+++ b/arch/arm/cpu/armv7/mvf600/Makefile
@@ -0,0 +1,42 @@
+#
+# Copyright 2013 Freescale Semiconductor, Inc.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(SOC).o
+
+COBJS  += generic.o
+COBJS  += timer.o
+
+SRCS   := $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+
+all:   $(obj).depend $(LIB)
+
+$(LIB):$(OBJS)
+   $(call cmd_link_o_target, $(OBJS))
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/arch/arm/cpu/armv7/mvf600/generic.c 
b/arch/arm/cpu/armv7/mvf600/generic.c
new file mode 100644
index 000..f21ce73
--- /dev/null
+++ b/arch/arm/cpu/armv7/mvf600/generic.c
@@ -0,0 +1,309 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include common.h
+#include asm/io.h
+#include asm/arch/imx-regs.h
+#include asm/arch/clock.h
+#include asm/arch/crm_regs.h
+#include