ARM i.MX53 MSL patch set
Subsystems (3)
PATCH v2 1/1 ARM i.MX53 MSL patch set
Only minor change based on v1:
set ckih2 to 0, since it is not installed on evk board.
PATCH v2 1/2 ARM i.MX53: Some bug fix about MX53 MSL code
From: Yong Shen <[email protected]>
1. pll_base address should return right value
2. uart parent clk is from pll3
3. add cpu_is_mx53 definition
--- arch/arm/mach-mx5/clock-mx51-mx53.c | 7 ++++--- arch/arm/mach-mx5/crm_regs.h | 4 ++++ arch/arm/plat-mxc/include/mach/mxc.h | 15 +++++++++++++-- 3 files changed, 21 insertions(+), 5 deletions(-)
arch/arm/mach-mx5/clock-mx51-mx53.c +4 -3
@@ -127,11 +127,11 @@ static inline u32 _get_mux(struct clk *parent, struct clk *m0,static inline void __iomem *_get_pll_base (struct clk *pll) {if (pll == &pll1_main_clk) -return MX51_DPLL1_BASE ; +return cpu_is_mx51 () ?MX51_DPLL1_BASE :MX53_DPLL1_BASE ;else if (pll == &pll2_sw_clk) -return MX51_DPLL2_BASE ; +return cpu_is_mx51 () ?MX51_DPLL2_BASE :MX53_DPLL2_BASE ;else if (pll == &pll3_sw_clk) -return MX51_DPLL3_BASE ; +return cpu_is_mx51 () ?MX51_DPLL3_BASE :MX53_DPLL3_BASE ;else if (pll == &mx53_pll4_sw_clk)return MX53_DPLL4_BASE ;else
@@ -1202,6 +1202,7 @@ int __init mx53_clocks_init(unsigned long ckil, unsigned long osc,clk_tree_init (); +clk_set_parent (&uart_root_clk, &pll3_sw_clk);clk_enable (&cpu_clk);clk_enable (&main_bus_clk);
arch/arm/mach-mx5/crm_regs.h +4 -0
@@ -19,6 +19,10 @@#define MX51_GPC_BASE MX51_IO_ADDRESS(MX51_GPC_BASE_ADDR)/*MX53*/ +#define MX53_CCM_BASE MX53_IO_ADDRESS(MX53_CCM_BASE_ADDR) +#define MX53_DPLL1_BASE MX53_IO_ADDRESS(MX53_PLL1_BASE_ADDR) +#define MX53_DPLL2_BASE MX53_IO_ADDRESS(MX53_PLL2_BASE_ADDR) +#define MX53_DPLL3_BASE MX53_IO_ADDRESS(MX53_PLL3_BASE_ADDR)#define MX53_DPLL4_BASE MX53_IO_ADDRESS(MX53_PLL3_BASE_ADDR)/* PLL Register Offsets */
arch/arm/plat-mxc/include/mach/mxc.h +13 -2
@@ -126,7 +126,7 @@ extern unsigned int __mxc_cpu_type;# define cpu_is_mx35 () (0)#endif -#ifdef CONFIG_ARCH_MX5 +#ifdef CONFIG_ARCH_MX51 # ifdef mxc_cpu_type# undef mxc_cpu_type# define mxc_cpu_type __mxc_cpu_type
@@ -134,11 +134,22 @@ extern unsigned int __mxc_cpu_type;# define mxc_cpu_type MXC_CPU_MX51# endif # define cpu_is_mx51 () (mxc_cpu_type == MXC_CPU_MX51) -# define cpu_is_mx53 () (mxc_cpu_type == MXC_CPU_MX53)#else # define cpu_is_mx51 () (0)#endif +#ifdef CONFIG_ARCH_MX53 +# ifdef mxc_cpu_type +# undef mxc_cpu_type +# define mxc_cpu_type __mxc_cpu_type +# else +# define mxc_cpu_type MXC_CPU_MX53 +# endif +# define cpu_is_mx53 () (mxc_cpu_type == MXC_CPU_MX53) +#else +# define cpu_is_mx53 () (0) +#endif +#ifdef CONFIG_ARCH_MXC91231 # ifdef mxc_cpu_type# undef mxc_cpu_type
Signature · 1 line
1.7.0.4
PATCH v2 1/2 ARM i.MX53: Some bug fix about MX53 MSL code
Quoted 22 lines · yong.shen at freescale.com
From: Yong Shen <[email protected]>
1.
pll_baseaddress should return right value
2. uart parent clk is from pll3
3. addcpu_is_mx53definitionSigned-off-by Yong Shen <[email protected]>--- arch/arm/mach-mx5/clock-mx51-mx53.c | 7 ++++--- arch/arm/mach-mx5/crm_regs.h | 4 ++++ arch/arm/plat-mxc/include/mach/mxc.h | 15 +++++++++++++-- 3 files changed, 21 insertions(+), 5 deletions(-)arch/arm/mach-mx5/clock-mx51-mx53.c +0
-1@@ -127,11 +127,11 @@ static inline u32 _get_mux(struct clk *parent, struct clk *m0,static inline void __iomem *_get_pll_base (struct clk *pll) {if (pll == &pll1_main_clk) -return MX51_DPLL1_BASE ;
arch/arm/mach-mx5/clock-mx51-mx53.c static inline u32 _get_mux(struct clk *parent, struct clk *m0, · line 137
Quoted 10 lines
arch/arm/mach-mx5/clock-mx51-mx53.c +3
-2+return cpu_is_mx51 () ?MX51_DPLL1_BASE :MX53_DPLL1_BASE ; else if (pll == &pll2_sw_clk) -return MX51_DPLL2_BASE ; + return cpu_is_mx51() ? MX51_DPLL2_BASE : MX53_DPLL2_BASE; else if (pll == &pll3_sw_clk) -return MX51_DPLL3_BASE ; + return cpu_is_mx51() ? MX51_DPLL3_BASE : MX53_DPLL3_BASE; else if (pll == &mx53_pll4_sw_clk) return MX53_DPLL4_BASE; else
hmmm, not nice. I assume Sascha won't take that.
Quoted 50 lines
arch/arm/mach-mx5/clock-mx51-mx53.c +1
-0@@ -1202,6 +1202,7 @@ int __init mx53_clocks_init(unsigned long ckil, unsigned long osc,clk_tree_init (); +clk_set_parent (&uart_root_clk, &pll3_sw_clk);clk_enable (&cpu_clk);clk_enable (&main_bus_clk);arch/arm/mach-mx5/crm_regs.h +4
-0@@ -19,6 +19,10 @@#define MX51_GPC_BASE MX51_IO_ADDRESS(MX51_GPC_BASE_ADDR)/*MX53*/ +#define MX53_CCM_BASE MX53_IO_ADDRESS(MX53_CCM_BASE_ADDR) +#define MX53_DPLL1_BASE MX53_IO_ADDRESS(MX53_PLL1_BASE_ADDR) +#define MX53_DPLL2_BASE MX53_IO_ADDRESS(MX53_PLL2_BASE_ADDR) +#define MX53_DPLL3_BASE MX53_IO_ADDRESS(MX53_PLL3_BASE_ADDR)#define MX53_DPLL4_BASE MX53_IO_ADDRESS(MX53_PLL3_BASE_ADDR)/* PLL Register Offsets */ arch/arm/plat-mxc/include/mach/mxc.h +6
-2@@ -126,7 +126,7 @@ extern unsigned int __mxc_cpu_type;# define cpu_is_mx35 () (0)#endif -#ifdef CONFIG_ARCH_MX5 +#ifdef CONFIG_ARCH_MX51 # ifdef mxc_cpu_type# undef mxc_cpu_type# define mxc_cpu_type __mxc_cpu_type@@ -134,11 +134,22 @@ extern unsigned int __mxc_cpu_type;# define mxc_cpu_type MXC_CPU_MX51# endif # define cpu_is_mx51 () (mxc_cpu_type == MXC_CPU_MX51) -# define cpu_is_mx53 () (mxc_cpu_type == MXC_CPU_MX53)#else # define cpu_is_mx51 () (0)#endif +#ifdef CONFIG_ARCH_MX53 +# ifdef mxc_cpu_type +# undef mxc_cpu_type +# define mxc_cpu_type __mxc_cpu_type +# else
arch/arm/plat-mxc/include/mach/mxc.h extern unsigned int __mxc_cpu_type; · line 155
Quoted 10 lines
arch/arm/plat-mxc/include/mach/mxc.h +7
-0+# define mxc_cpu_type MXC_CPU_MX53 +# endif +# define cpu_is_mx53 () (mxc_cpu_type == MXC_CPU_MX53) +#else +# define cpu_is_mx53 () (0) +#endif +#ifdef CONFIG_ARCH_MXC91231 # ifdef mxc_cpu_type# undef mxc_cpu_type
This hunk is also included in one of Richard's patches for mx50.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH v2 1/2 ARM i.MX53: Some bug fix about MX53 MSL code
Hi Uwe,
Do you think we need to add postfix -mx51-mx53 to all mx51/53 specific files :arch/arm/mach-mx5: cpu.c devices.c mm.c crm_regs.h devices.h ? And add obj-$(CONFIG_SOC_IMX51) := xxxxxxxxxxxxxxxx to Makefile.
Thanks
Richard
PATCH v2 1/2 ARM i.MX53: Some bug fix about MX53 MSL code
In reply to Uwe Kleine-KönigHi Uwe,
Thanks for comments, some discussion follewed inline.
Yong
2010/12/30 Uwe Kleine-K?nig <[email protected]>:
Quoted 26 lines · yong.shen at freescale.com
Quoted 25 lines
From: Yong Shen <[email protected]>
1.
pll_baseaddress should return right value
2. uart parent clk is from pll3
3. addcpu_is_mx53definitionSigned-off-by Yong Shen <[email protected]>---
?arch/arm/mach-mx5/clock-mx51-mx53.c ?| ? ?7 ++++--- ?arch/arm/mach-mx5/crm_regs.h ? ? ? ? | ? ?4 ++++ ?arch/arm/plat-mxc/include/mach/mxc.h | ? 15 +++++++++++++--?3 files changed, 21 insertions(+), 5 deletions(-)
arch/arm/mach-mx5/clock-mx51-mx53.c +1
-2@@ -127,11 +127,11 @@ static inline u32 _get_mux(struct clk *parent, struct clk *m0, ?static inline void __iomem *_get_pll_base(struct clk *pll) ?{ ? ? ? if (pll == &pll1_main_clk) - ? ? ? ? ? ? return MX51_DPLL1_BASE; + ? ? ? ? ? ? return cpu_is_mx51() ? MX51_DPLL1_BASE : MX53_DPLL1_BASE; ? ? ? else if (pll == &pll2_sw_clk) - ? ? ? ? ? ? return MX51_DPLL2_BASE;
Quoted 8 lines
Quoted 7 lines
arch/arm/mach-mx5/clock-mx51-mx53.c +2
-1+ ? ? ? ? ? ? return cpu_is_mx51() ? MX51_DPLL2_BASE : MX53_DPLL2_BASE; ? ? ? else if (pll == &pll3_sw_clk) - ? ? ? ? ? ? return MX51_DPLL3_BASE; + ? ? ? ? ? ? return cpu_is_mx51() ? MX51_DPLL3_BASE : MX53_DPLL3_BASE; ? ? ? else if (pll == &mx53_pll4_sw_clk) ? ? ? ? ? ? ? return MX53_DPLL4_BASE;? ? ? else
hmmm, not nice. ?I assume Sascha won't take that.
Since the file name is clock-mx51-mx53.c, so this file is supposed to contain clock information either for mx51 or mx53. And you can find cpu_is_mx5x() is widely used across the file for this purpose, which is way I also adapt it in this function. So IMHO, I guess this is the straight way to add it with little code changes. Please correct me.
Quoted 46 lines
Quoted 46 lines
arch/arm/mach-mx5/clock-mx51-mx53.c +1
-0@@ -1202,6 +1202,7 @@ int __init mx53_clocks_init(unsigned long ckil, unsigned long osc, ? ? ? clk_tree_init(); + ? ? clk_set_parent(&uart_root_clk, &pll3_sw_clk); ? ? ? clk_enable(&cpu_clk); ? ? ? clk_enable(&main_bus_clk);arch/arm/mach-mx5/crm_regs.h +0
-0@@ -19,6 +19,10 @@ ?#define MX51_GPC_BASE ? ? ? ? ? ? ? ?MX51_IO_ADDRESS(MX51_GPC_BASE_ADDR)?/*MX53*/
arch/arm/mach-mx5/crm_regs.h +4
-0+#define MX53_CCM_BASE ? ? ? ? ? ? ? ?MX53_IO_ADDRESS(MX53_CCM_BASE_ADDR) +#define MX53_DPLL1_BASE ? ? ? ? ? ? ?MX53_IO_ADDRESS(MX53_PLL1_BASE_ADDR) +#define MX53_DPLL2_BASE ? ? ? ? ? ? ?MX53_IO_ADDRESS(MX53_PLL2_BASE_ADDR) +#define MX53_DPLL3_BASE ? ? ? ? ? ? ?MX53_IO_ADDRESS(MX53_PLL3_BASE_ADDR)?#define
MX53_DPLL4_BASE? ? ? ? ? ? ?MX53_IO_ADDRESS(MX53_PLL3_BASE_ADDR)?/* PLL Register Offsets */
arch/arm/plat-mxc/include/mach/mxc.h +0
-0@@ -126,7 +126,7 @@ extern unsigned int __mxc_cpu_type; ?# define cpu_is_mx35() ? ? ? ? ? ? ? (0)?#endif
arch/arm/plat-mxc/include/mach/mxc.h +1
-1-#ifdef CONFIG_ARCH_MX5 +#ifdef CONFIG_ARCH_MX51 ?# ifdef
mxc_cpu_type
?# ?undefmxc_cpu_type
?# ?definemxc_cpu_type__mxc_cpu_typearch/arm/plat-mxc/include/mach/mxc.h +0
-0@@ -134,11 +134,22 @@ extern unsigned int __mxc_cpu_type;?# ?define
mxc_cpu_typeMXC_CPU_MX51
?# endif
?# definecpu_is_mx51()? ? ? ? ? ? ? (mxc_cpu_type==MXC_CPU_MX51) -# definecpu_is_mx53()? ? ? ? ? ? ? (mxc_cpu_type==MXC_CPU_MX53) ?#else
?# definecpu_is_mx51()? ? ? ? ? ? ? (0)
?#endif
Quoted 16 lines
Quoted 12 lines
arch/arm/plat-mxc/include/mach/mxc.h +12
-0+#ifdef CONFIG_ARCH_MX53 +# ifdef mxc_cpu_type +# ?undef mxc_cpu_type +# ?define mxc_cpu_type __mxc_cpu_type +# else +# ?define mxc_cpu_type MXC_CPU_MX53 +# endif +# define cpu_is_mx53 () ? ? ? ? ? ? ? (mxc_cpu_type == MXC_CPU_MX53) +#else +# define cpu_is_mx53 () ? ? ? ? ? ? ? (0) +#endif +Quoted 3 lines
?#ifdef
CONFIG_ARCH_MXC91231
?# ifdefmxc_cpu_type
?# ?undefmxc_cpu_typeThis hunk is also included in one of Richard's patches for mx50.
Since Richard's patches are not in the tree so far, so I can not develop my patch based on his code, which is why there are some duplicated code here. But I guess it should not be an issue, since maintainer can easily resolve this conflict when merging this patch.
Quoted 8 lines
Best regards
Uwe--
Pengutronix e.K. ? ? ? ? ? ? ? ? ? ? ? ? ? | Uwe Kleine-K?nig ? ? ? ? ? ?| Industrial Linux Solutions ? ? ? ? ? ? ? ? | http://www.pengutronix.de/ ?|
PATCH v2 1/2 ARM i.MX53: Some bug fix about MX53 MSL code
Hi Yong[1],
Quoted 35 lines · Yong Shen
2010/12/30 Uwe Kleine-K?nig <[email protected]>:
Quoted 26 lines · yong.shen at freescale.com
Quoted 25 lines
From: Yong Shen <[email protected]>
1.
pll_baseaddress should return right value
2. uart parent clk is from pll3
3. addcpu_is_mx53definitionSigned-off-by Yong Shen <[email protected]>---
?arch/arm/mach-mx5/clock-mx51-mx53.c ?| ? ?7 ++++--- ?arch/arm/mach-mx5/crm_regs.h ? ? ? ? | ? ?4 ++++ ?arch/arm/plat-mxc/include/mach/mxc.h | ? 15 +++++++++++++--?3 files changed, 21 insertions(+), 5 deletions(-)
arch/arm/mach-mx5/clock-mx51-mx53.c +1
-2@@ -127,11 +127,11 @@ static inline u32 _get_mux(struct clk *parent, struct clk *m0, ?static inline void __iomem *_get_pll_base(struct clk *pll) ?{ ? ? ? if (pll == &pll1_main_clk) - ? ? ? ? ? ? return MX51_DPLL1_BASE; + ? ? ? ? ? ? return cpu_is_mx51() ? MX51_DPLL1_BASE : MX53_DPLL1_BASE; ? ? ? else if (pll == &pll2_sw_clk) - ? ? ? ? ? ? return MX51_DPLL2_BASE;Quoted 8 lines
Quoted 7 lines
arch/arm/mach-mx5/clock-mx51-mx53.c +2
-1+ ? ? ? ? ? ? return cpu_is_mx51() ? MX51_DPLL2_BASE : MX53_DPLL2_BASE; ? ? ? else if (pll == &pll3_sw_clk) - ? ? ? ? ? ? return MX51_DPLL3_BASE; + ? ? ? ? ? ? return cpu_is_mx51() ? MX51_DPLL3_BASE : MX53_DPLL3_BASE; ? ? ? else if (pll == &mx53_pll4_sw_clk) ? ? ? ? ? ? ? return MX53_DPLL4_BASE;? ? ? else
hmmm, not nice. ?I assume Sascha won't take that.
Quoted 5 lines
Since the file name is
clock-mx51-mx53.c, so this file is supposed to contain clock information either for mx51 or mx53. And you can findcpu_is_mx5x()is widely used across the file for this purpose, which is way I also adapt it in this function. So IMHO, I guess this is the straight way to add it with little code changes. Please correct me.
little code changes are not always the first goal. Note that this code results in a runtime choice, it would be nicer to have a dedicated function for mx51 and mx53 each and set pointers to the respective function. OTOH this is not a hot path.
Quoted 36 lines
Quoted 20 lines
Quoted 20 lines
arch/arm/plat-mxc/include/mach/mxc.h +0
-0@@ -126,7 +126,7 @@ extern unsigned int __mxc_cpu_type; ?# define cpu_is_mx35() ? ? ? ? ? ? ? (0)?#endif
arch/arm/plat-mxc/include/mach/mxc.h +1
-1-#ifdef CONFIG_ARCH_MX5 +#ifdef CONFIG_ARCH_MX51 ?# ifdef
mxc_cpu_type
?# ?undefmxc_cpu_type
?# ?definemxc_cpu_type__mxc_cpu_typearch/arm/plat-mxc/include/mach/mxc.h +0
-0@@ -134,11 +134,22 @@ extern unsigned int __mxc_cpu_type;?# ?define
mxc_cpu_typeMXC_CPU_MX51
?# endif
?# definecpu_is_mx51()? ? ? ? ? ? ? (mxc_cpu_type==MXC_CPU_MX51) -# definecpu_is_mx53()? ? ? ? ? ? ? (mxc_cpu_type==MXC_CPU_MX53) ?#else
?# definecpu_is_mx51()? ? ? ? ? ? ? (0)
?#endifQuoted 16 lines
Quoted 12 lines
arch/arm/plat-mxc/include/mach/mxc.h +12
-0+#ifdef CONFIG_ARCH_MX53 +# ifdef mxc_cpu_type +# ?undef mxc_cpu_type +# ?define mxc_cpu_type __mxc_cpu_type +# else +# ?define mxc_cpu_type MXC_CPU_MX53 +# endif +# define cpu_is_mx53 () ? ? ? ? ? ? ? (mxc_cpu_type == MXC_CPU_MX53) +#else +# define cpu_is_mx53 () ? ? ? ? ? ? ? (0) +#endif +Quoted 3 lines
?#ifdef
CONFIG_ARCH_MXC91231
?# ifdefmxc_cpu_type
?# ?undefmxc_cpu_typeThis hunk is also included in one of Richard's patches for mx50.
Quoted 4 lines
Since Richard's patches are not in the tree so far, so I can not develop my patch based on his code, which is why there are some duplicated code here. But I guess it should not be an issue, since maintainer can easily resolve this conflict when merging this patch.
This was only meant as hint to make you, Richard and Sascha aware of it.
Best regards and happy new year,
Uwe
[1] I hope this is the right part of your name to address you.
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH v2 2/2 ARM i.MX53: Make MX53 EVK bootable
In reply to yong.shen at freescale.comFrom: Yong Shen <[email protected]>
1. Add entries to Kconfig
2. Add machine definition
3. Add Uart platform data, pad setting and base address
4. Adjust GPIO irq number
--- arch/arm/mach-mx5/Kconfig | 17 +++++ arch/arm/mach-mx5/Makefile | 1 + arch/arm/mach-mx5/Makefile.boot | 9 ++- arch/arm/mach-mx5/board-mx53_evk.c | 90 +++++++++++++++++++++++++ arch/arm/mach-mx5/devices-imx53.h | 13 ++++ arch/arm/plat-mxc/devices/platform-imx-uart.c | 10 +++ arch/arm/plat-mxc/include/mach/iomux-mx53.h | 20 ++++++ arch/arm/plat-mxc/include/mach/irqs.h | 4 +- arch/arm/plat-mxc/include/mach/uncompress.h | 4 + 9 files changed, 164 insertions(+), 4 deletions(-) create mode 100644 arch/arm/mach-mx5/board-mx53_evk.c create mode 100644 arch/arm/mach-mx5/devices-imx53.h
arch/arm/mach-mx5/Kconfig +17 -0
@@ -4,6 +4,9 @@ if ARCH_MX5 config ARCH_MX51 bool +config ARCH_MX53 + bool + config SOC_IMX51 bool select MXC_TZIC
@@ -12,6 +15,12 @@ config SOC_IMX51 select ARCH_HAS_CPUFREQ select ARCH_MX51 +config SOC_IMX53 + bool + select MXC_TZIC + select ARCH_MXC_IOMUX_V3 + select ARCH_MX53 + comment "MX5 platforms:" config MACH_MX51_BABBAGE
@@ -100,4 +109,12 @@ config MACH_MX51_EFIKAMX Include support for Genesi Efika MX nettop. This includes specific configurations for the board and its peripherals. +config MACH_MX53_EVK + bool "Support MX53 EVK platforms" + select SOC_IMX53 + select IMX_HAVE_PLATFORM_IMX_UART + help + Include support for MX53 EVK platform. This includes specific + configurations for the board and its peripherals. + endif
arch/arm/mach-mx5/Makefile +1 -0
@@ -8,6 +8,7 @@ obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o obj-$(CONFIG_MACH_MX51_BABBAGE) += board-mx51_babbage.o obj-$(CONFIG_MACH_MX51_3DS) += board-mx51_3ds.o +obj-$(CONFIG_MACH_MX53_EVK) += board-mx53_evk.o obj-$(CONFIG_MACH_EUKREA_CPUIMX51) += board-cpuimx51.o obj-$(CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD) += eukrea_mbimx51-baseboard.o obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += board-cpuimx51sd.o
arch/arm/mach-mx5/Makefile.boot +6 -3
@@ -1,3 +1,6 @@ - zreladdr-y := 0x90008000 -params_phys-y := 0x90000100 -initrd_phys-y := 0x90800000 + zreladdr-$(CONFIG_SOC_IMX51) := 0x90008000 +params_phys-$(CONFIG_SOC_IMX51) := 0x90000100 +initrd_phys-$(CONFIG_SOC_IMX51) := 0x90800000 + zreladdr-$(CONFIG_SOC_IMX53) := 0x70008000 +params_phys-$(CONFIG_SOC_IMX53) := 0x70000100 +initrd_phys-$(CONFIG_SOC_IMX53) := 0x70800000
arch/arm/mach-mx5/board-mx53_evk.c new file +90 -0
90 lines not on this page · raw message
arch/arm/mach-mx5/devices-imx53.h new file +13 -0
@@ -0,0 +1,13 @@ +/* +* Copyright (C) 2010 Yong Shen. <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it under +* the terms of the GNU General Public License version 2 as published by the +* Free Software Foundation. +*/ +#include <mach/mx53.h> +#include <mach/devices-common.h> + +extern const struct imx_imx_uart_1irq_data imx53_imx_uart_data[]__initconst ; +#define imx53_add_imx_uart (id, pdata) \ + imx_add_imx_uart_1irq(&imx53_imx_uart_data[id], pdata)
arch/arm/plat-mxc/devices/platform-imx-uart.c +10 -0
@@ -104,6 +104,16 @@ const struct imx_imx_uart_1irq_data imx51_imx_uart_data[] __initconst = { };#endif /* ifdef CONFIG_SOC_IMX51 */ +#ifdef CONFIG_SOC_IMX53 +const struct imx_imx_uart_1irq_data imx53_imx_uart_data[]__initconst = { +#define imx53_imx_uart_data_entry(_id, _hwid) \ + imx_imx_uart_1irq_data_entry(MX53, _id, _hwid, SZ_4K) +imx53_imx_uart_data_entry (0 ,1 ), +imx53_imx_uart_data_entry (1 ,2 ), +imx53_imx_uart_data_entry (2 ,3 ), +}; +#endif /* ifdef CONFIG_SOC_IMX53 */ +struct platform_device *__init imx_add_imx_uart_3irq (const struct imx_imx_uart_3irq_data *data,const struct imxuart_platform_data *pdata)
arch/arm/plat-mxc/include/mach/iomux-mx53.h +20 -0
@@ -42,6 +42,26 @@ typedef enum iomux_config {#define NON_MUX_I 0x00#define NON_PAD_I 0x00 +#define MX53_UART_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \ + PAD_CTL_DSE_HIGH | PAD_CTL_SRE_FAST | PAD_CTL_HYS) +/* UART1 */ +#define MX53_PAD_CSI0_D10__UART1_TXD IOMUX_PAD(0x414, 0xE8, 2, 0x0, 0, MX53_UART_PAD_CTRL) +#define MX53_PAD_CSI0_D11__UART1_RXD IOMUX_PAD(0x418, 0xEC, 2, 0x878, 1, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_DIOW__UART1_TXD IOMUX_PAD(0x5F0, 0x270, 3, 0x0, 0, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_DMACK__UART1_RXD IOMUX_PAD(0x5F4, 0x274, 3, 0x880, 3, MX53_UART_PAD_CTRL) + +/* UART2 */ +#define MX53_PAD_ATA_BUFFER_EN__UART2_RXD IOMUX_PAD(0x5FC, 0x27C, 3, 0x880, 3, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_DMARQ__UART2_TXD IOMUX_PAD(0x5F8, 0x278, 3, 0x0, 0, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_DIOR__UART2_RTS IOMUX_PAD(0x604, 0x284, 3, 0x87C, 3, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_INTRQ__UART2_CTS IOMUX_PAD(0x600, 0x280, 3, 0x0, 0, MX53_UART_PAD_CTRL) + +/* UART3 */ +#define MX53_PAD_ATA_CS_0__UART3_TXD IOMUX_PAD(0x61C, 0x29C, 4, 0x0, 0, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_CS_1__UART3_RXD IOMUX_PAD(0x620, 0x2A0, 4, 0x888, 3, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_DA_1__UART3_CTS IOMUX_PAD(0x614, 0x294, 4, 0x0, 0, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_DA_2__UART3_RTS IOMUX_PAD(0x618, 0x298, 4, 0x884, 5, MX53_UART_PAD_CTRL) +#define MX53_PAD_GPIO_19__GPIO_4_5 IOMUX_PAD(0x348, 0x20,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)#define MX53_PAD_KEY_COL0__GPIO_4_6 IOMUX_PAD(0x34C, 0x24,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)#define MX53_PAD_KEY_ROW0__GPIO_4_7 IOMUX_PAD(0x350, 0x28,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
arch/arm/plat-mxc/include/mach/irqs.h +3 -1
@@ -29,8 +29,10 @@#define MXC_GPIO_IRQS (32 * 4)#elif definedCONFIG_ARCH_MX25 #define MXC_GPIO_IRQS (32 * 4) -#elif definedCONFIG_ARCH_MX5 +#elif definedCONFIG_ARCH_MX51 #define MXC_GPIO_IRQS (32 * 4) +#elif definedCONFIG_ARCH_MX53 +#define MXC_GPIO_IRQS (32 * 7)#elif definedCONFIG_ARCH_MXC91231 #define MXC_GPIO_IRQS (32 * 4)#elif definedCONFIG_ARCH_MX3
arch/arm/plat-mxc/include/mach/uncompress.h +4 -0
@@ -63,6 +63,7 @@ static inline void flush(void)#define MX3X_UART1_BASE_ADDR 0x43F90000#define MX3X_UART2_BASE_ADDR 0x43F94000#define MX51_UART1_BASE_ADDR 0x73fbc000 +#define MX53_UART1_BASE_ADDR 0x53fbc000static __inline__void __arch_decomp_setup (unsigned long arch_id) {
@@ -102,6 +103,9 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)case MACH_TYPE_EUKREA_CPUIMX51SD : uart_base =MX51_UART1_BASE_ADDR ;break ; +case MACH_TYPE_MX53_EVK : + uart_base =MX53_UART1_BASE_ADDR ; +break ;default :break ; }
Signature · 1 line
1.7.0.4
PATCH v2 2/2 ARM i.MX53: Make MX53 EVK bootable
Hello Yong,
Quoted 119 lines · yong.shen at freescale.com
From: Yong Shen <[email protected]>
1. Add entries to
Kconfig
2. Add machine definition
3. Add Uart platform data, pad setting and base address
4. Adjust GPIO irq numberSigned-off-by Yong Shen <[email protected]>--- arch/arm/mach-mx5/Kconfig | 17 +++++ arch/arm/mach-mx5/Makefile | 1 + arch/arm/mach-mx5/Makefile.boot | 9 ++- arch/arm/mach-mx5/board-mx53_evk.c | 90 +++++++++++++++++++++++++ arch/arm/mach-mx5/devices-imx53.h | 13 ++++ arch/arm/plat-mxc/devices/platform-imx-uart.c | 10 +++ arch/arm/plat-mxc/include/mach/iomux-mx53.h | 20 ++++++ arch/arm/plat-mxc/include/mach/irqs.h | 4 +- arch/arm/plat-mxc/include/mach/uncompress.h | 4 + 9 files changed, 164 insertions(+), 4 deletions(-) create mode 100644 arch/arm/mach-mx5/board-mx53_evk.c create mode 100644 arch/arm/mach-mx5/devices-imx53.harch/arm/mach-mx5/Kconfig +17
-0@@ -4,6 +4,9 @@ if ARCH_MX5 config ARCH_MX51 bool +config ARCH_MX53 + bool + config SOC_IMX51 bool select MXC_TZIC@@ -12,6 +15,12 @@ config SOC_IMX51 select ARCH_HAS_CPUFREQ select ARCH_MX51 +config SOC_IMX53 + bool + select MXC_TZIC + select ARCH_MXC_IOMUX_V3 + select ARCH_MX53 + comment "MX5 platforms:" config MACH_MX51_BABBAGE@@ -100,4 +109,12 @@ config MACH_MX51_EFIKAMX Include support for Genesi Efika MX nettop. This includes specific configurations for the board and its peripherals. +config MACH_MX53_EVK + bool "Support MX53 EVK platforms" + select SOC_IMX53 + select IMX_HAVE_PLATFORM_IMX_UART + help + Include support for MX53 EVK platform. This includes specific + configurations for the board and its peripherals. + endifarch/arm/mach-mx5/Makefile +1
-0@@ -8,6 +8,7 @@ obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o obj-$(CONFIG_MACH_MX51_BABBAGE) += board-mx51_babbage.o obj-$(CONFIG_MACH_MX51_3DS) += board-mx51_3ds.o +obj-$(CONFIG_MACH_MX53_EVK) += board-mx53_evk.o obj-$(CONFIG_MACH_EUKREA_CPUIMX51) += board-cpuimx51.o obj-$(CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD) += eukrea_mbimx51-baseboard.o obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += board-cpuimx51sd.oarch/arm/mach-mx5/Makefile.boot +6
-3@@ -1,3 +1,6 @@ - zreladdr-y := 0x90008000 -params_phys-y := 0x90000100 -initrd_phys-y := 0x90800000 + zreladdr-$(CONFIG_SOC_IMX51) := 0x90008000 +params_phys-$(CONFIG_SOC_IMX51) := 0x90000100 +initrd_phys-$(CONFIG_SOC_IMX51) := 0x90800000 + zreladdr-$(CONFIG_SOC_IMX53) := 0x70008000 +params_phys-$(CONFIG_SOC_IMX53) := 0x70000100 +initrd_phys-$(CONFIG_SOC_IMX53) := 0x70800000arch/arm/mach-mx5/board-mx53_evk.c new file +25
-0@@ -0,0 +1,90 @@ +/* +* Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved. +* Copyright (C) 2010 Yong Shen. <[email protected]> +*/ + +/* +* 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., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ + +#include <linux/init.h> +#include <linux/clk.h> +#include <mach/common.h> +#include <mach/hardware.h>
arch/arm/mach-mx5/board-mx53_evk.c line 35
Quoted 10 lines
arch/arm/mach-mx5/board-mx53_evk.c new file +10
-0+#include <asm/mach-types.h> +#include <asm/mach/arch.h> +#include <asm/mach/time.h> +#include <mach/imx-uart.h> +#include <mach/iomux-mx53.h> + +#include "crm_regs.h" +#include "devices-imx53.h" + +static iomux_v3_cfg_t mx53evk_pads[] = {
mx53_evk_pads to match MX53_EVK
Quoted 7 lines
arch/arm/mach-mx5/board-mx53_evk.c new file +7
-0+MX53_PAD_CSI0_D10__UART1_TXD , +MX53_PAD_CSI0_D11__UART1_RXD , +MX53_PAD_ATA_DIOW__UART1_TXD , +MX53_PAD_ATA_DMACK__UART1_RXD , + +MX53_PAD_ATA_BUFFER_EN__UART2_RXD , + MX53_PAD_ATA_DMARQ__UART2_TXD,
arch/arm/mach-mx5/board-mx53_evk.c line 52
Quoted 10 lines
arch/arm/mach-mx5/board-mx53_evk.c new file +10
-0+MX53_PAD_ATA_DIOR__UART2_RTS , +MX53_PAD_ATA_INTRQ__UART2_CTS , + +MX53_PAD_ATA_CS_0__UART3_TXD , +MX53_PAD_ATA_CS_1__UART3_RXD , +MX53_PAD_ATA_DA_1__UART3_CTS , + MX53_PAD_ATA_DA_2__UART3_RTS, +}; + +#if defined(CONFIG_SERIAL_IMX ) || defined(CONFIG_SERIAL_IMX_MODULE )
I usually advocate unconditional device registration.
arch/arm/mach-mx5/board-mx53_evk.c line 53
Quoted 1 line
arch/arm/mach-mx5/board-mx53_evk.c new file +1
-0+static const struct imxuart_platform_data uart_pdata__initconst = {
mx53_evk_uart_pdata please
Quoted 6 lines
arch/arm/mach-mx5/board-mx53_evk.c new file +6
-0+ .flags = IMXUART_HAVE_RTSCTS, +}; + +static inline void mxc_init_imx_uart (void ) +{ +imx53_add_imx_uart (0 , &uart_pdata);
arch/arm/mach-mx5/board-mx53_evk.c line 69
Quoted 10 lines
arch/arm/mach-mx5/board-mx53_evk.c new file +10
-0+imx53_add_imx_uart (1 , &uart_pdata); + imx53_add_imx_uart(2, &uart_pdata); +} +#else /* !SERIAL_IMX */ +static inline void mxc_init_imx_uart (void ) +{ +} +#endif /* SERIAL_IMX */ + +static void __init mxc_board_init (void )
please use a machine prefix (i.e. mx53_evk_board_init)
arch/arm/mach-mx5/board-mx53_evk.c line 81
Quoted 12 lines
arch/arm/mach-mx5/board-mx53_evk.c new file +12
-0+{ +mxc_iomux_v3_setup_multiple_pads (mx53evk_pads, +ARRAY_SIZE (mx53evk_pads)); +mxc_init_imx_uart (); +} + +static void __init mx53_evk_timer_init (void ) +{ +mx53_clocks_init (32768 ,24000000 ,22579200 ,0 ); +} + +static struct sys_timer mxc_timer = {
mx53_evk_timer ...
Quoted 85 lines
arch/arm/mach-mx5/board-mx53_evk.c new file +9
-0+ .init = mx53_evk_timer_init, +}; + +MACHINE_START (MX53_EVK ,"Freescale MX53 EVK Board" ) + .map_io = mx53_map_io, + .init_irq = mx53_init_irq, + .init_machine = mxc_board_init, + .timer = &mxc_timer, +MACHINE_END arch/arm/mach-mx5/devices-imx53.h new file +13
-0@@ -0,0 +1,13 @@ +/* +* Copyright (C) 2010 Yong Shen. <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it under +* the terms of the GNU General Public License version 2 as published by the +* Free Software Foundation. +*/ +#include <mach/mx53.h> +#include <mach/devices-common.h> + +extern const struct imx_imx_uart_1irq_data imx53_imx_uart_data[]__initconst ; +#define imx53_add_imx_uart (id, pdata) \ + imx_add_imx_uart_1irq(&imx53_imx_uart_data[id], pdata)arch/arm/plat-mxc/devices/platform-imx-uart.c +10
-0@@ -104,6 +104,16 @@ const struct imx_imx_uart_1irq_data imx51_imx_uart_data[] __initconst = { };#endif /* ifdef CONFIG_SOC_IMX51 */ +#ifdef CONFIG_SOC_IMX53 +const struct imx_imx_uart_1irq_data imx53_imx_uart_data[]__initconst = { +#define imx53_imx_uart_data_entry(_id, _hwid) \ + imx_imx_uart_1irq_data_entry(MX53, _id, _hwid, SZ_4K) +imx53_imx_uart_data_entry (0 ,1 ), +imx53_imx_uart_data_entry (1 ,2 ), +imx53_imx_uart_data_entry (2 ,3 ), +}; +#endif /* ifdef CONFIG_SOC_IMX53 */ +struct platform_device *__init imx_add_imx_uart_3irq (const struct imx_imx_uart_3irq_data *data,const struct imxuart_platform_data *pdata)arch/arm/plat-mxc/include/mach/iomux-mx53.h +20
-0@@ -42,6 +42,26 @@ typedef enum iomux_config {#define NON_MUX_I 0x00#define NON_PAD_I 0x00 +#define MX53_UART_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \ + PAD_CTL_DSE_HIGH | PAD_CTL_SRE_FAST | PAD_CTL_HYS) +/* UART1 */ +#define MX53_PAD_CSI0_D10__UART1_TXD IOMUX_PAD(0x414, 0xE8, 2, 0x0, 0, MX53_UART_PAD_CTRL) +#define MX53_PAD_CSI0_D11__UART1_RXD IOMUX_PAD(0x418, 0xEC, 2, 0x878, 1, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_DIOW__UART1_TXD IOMUX_PAD(0x5F0, 0x270, 3, 0x0, 0, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_DMACK__UART1_RXD IOMUX_PAD(0x5F4, 0x274, 3, 0x880, 3, MX53_UART_PAD_CTRL) + +/* UART2 */ +#define MX53_PAD_ATA_BUFFER_EN__UART2_RXD IOMUX_PAD(0x5FC, 0x27C, 3, 0x880, 3, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_DMARQ__UART2_TXD IOMUX_PAD(0x5F8, 0x278, 3, 0x0, 0, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_DIOR__UART2_RTS IOMUX_PAD(0x604, 0x284, 3, 0x87C, 3, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_INTRQ__UART2_CTS IOMUX_PAD(0x600, 0x280, 3, 0x0, 0, MX53_UART_PAD_CTRL) + +/* UART3 */ +#define MX53_PAD_ATA_CS_0__UART3_TXD IOMUX_PAD(0x61C, 0x29C, 4, 0x0, 0, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_CS_1__UART3_RXD IOMUX_PAD(0x620, 0x2A0, 4, 0x888, 3, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_DA_1__UART3_CTS IOMUX_PAD(0x614, 0x294, 4, 0x0, 0, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_DA_2__UART3_RTS IOMUX_PAD(0x618, 0x298, 4, 0x884, 5, MX53_UART_PAD_CTRL) +#define MX53_PAD_GPIO_19__GPIO_4_5 IOMUX_PAD(0x348, 0x20,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)#define MX53_PAD_KEY_COL0__GPIO_4_6 IOMUX_PAD(0x34C, 0x24,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)#define MX53_PAD_KEY_ROW0__GPIO_4_7 IOMUX_PAD(0x350, 0x28,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)arch/arm/plat-mxc/include/mach/irqs.h +0
-0
arch/arm/plat-mxc/include/mach/irqs.h line 35
Quoted 8 lines
arch/arm/plat-mxc/include/mach/irqs.h +3
-1@@ -29,8 +29,10 @@#define MXC_GPIO_IRQS (32 * 4)#elif definedCONFIG_ARCH_MX25 #define MXC_GPIO_IRQS (32 * 4) -#elif definedCONFIG_ARCH_MX5 +#elif definedCONFIG_ARCH_MX51 #define MXC_GPIO_IRQS (32 * 4) +#elif definedCONFIG_ARCH_MX53 +#define MXC_GPIO_IRQS (32 * 7)
You didn't read the comment before this block.
Quoted 16 lines
arch/arm/plat-mxc/include/mach/irqs.h +0
-0#elif definedCONFIG_ARCH_MXC91231 #define MXC_GPIO_IRQS (32 * 4)#elif definedCONFIG_ARCH_MX3 arch/arm/plat-mxc/include/mach/uncompress.h +1
-0@@ -63,6 +63,7 @@ static inline void flush(void)#define MX3X_UART1_BASE_ADDR 0x43F90000#define MX3X_UART2_BASE_ADDR 0x43F94000#define MX51_UART1_BASE_ADDR 0x73fbc000 +#define MX53_UART1_BASE_ADDR 0x53fbc000static __inline__void __arch_decomp_setup (unsigned long arch_id) {
arch/arm/plat-mxc/include/mach/uncompress.h static __inline__ void __arch_decomp_setup(unsigned long arch_id) · line 111
Quoted 9 lines
arch/arm/plat-mxc/include/mach/uncompress.h +3
-0@@ -102,6 +103,9 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)case MACH_TYPE_EUKREA_CPUIMX51SD : uart_base =MX51_UART1_BASE_ADDR ;break ; +case MACH_TYPE_MX53_EVK : + uart_base =MX53_UART1_BASE_ADDR ; +break ;default :break ; }
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH v2 2/2 ARM i.MX53: Make MX53 EVK bootable
Hi Uwe,
All the comments are acked for this 2/2 patch.
Thanks
Yong
2010/12/30 Uwe Kleine-K?nig <[email protected]>:
Quoted 314 lines
Hello Yong,
Quoted 119 lines · yong.shen at freescale.com
From: Yong Shen <[email protected]>
1. Add entries to
Kconfig
2. Add machine definition
3. Add Uart platform data, pad setting and base address
4. Adjust GPIO irq numberSigned-off-by Yong Shen <[email protected]>---
?arch/arm/mach-mx5/Kconfig ? ? ? ? ? ? ? ? ? ? | ? 17 +++++ ?arch/arm/mach-mx5/Makefile ? ? ? ? ? ? ? ? ? ?| ? ?1 + ?arch/arm/mach-mx5/Makefile.boot ? ? ? ? ? ? ? | ? ?9 ++- ?arch/arm/mach-mx5/board-mx53_evk.c ? ? ? ? ? ?| ? 90 +++++++++++++++++++++++++ ?arch/arm/mach-mx5/devices-imx53.h ? ? ? ? ? ? | ? 13 ++++ ?arch/arm/plat-mxc/devices/platform-imx-uart.c | ? 10 +++ ?arch/arm/plat-mxc/include/mach/iomux-mx53.h ? | ? 20 ++++++ ?arch/arm/plat-mxc/include/mach/irqs.h ? ? ? ? | ? ?4 +- ?arch/arm/plat-mxc/include/mach/uncompress.h ? | ? ?4 +?9 files changed, 164 insertions(+), 4 deletions(-) ?create mode 100644
arch/arm/mach-mx5/board-mx53_evk.c?create mode 100644arch/arm/mach-mx5/devices-imx53.harch/arm/mach-mx5/Kconfig +0
-0@@ -4,6 +4,9 @@ if ARCH_MX5?config
ARCH_MX51
? ? ? boolarch/arm/mach-mx5/Kconfig +3
-0+config ARCH_MX53 + ? ? bool +?config ? ? ?
SOC_IMX51
? ? ? bool
? ? ? selectMXC_TZICarch/arm/mach-mx5/Kconfig +0
-0@@ -12,6 +15,12 @@ config ? ? SOC_IMX51? ? ? select
ARCH_HAS_CPUFREQ
? ? ? selectARCH_MX51arch/arm/mach-mx5/Kconfig +6
-0+config ? ? ? SOC_IMX53 + ? ? bool + ? ? select MXC_TZIC + ? ? select ARCH_MXC_IOMUX_V3 + ? ? select ARCH_MX53 +?comment "MX5 platforms:"
?config
MACH_MX51_BABBAGEarch/arm/mach-mx5/Kconfig +0
-0@@ -100,4 +109,12 @@ config MACH_MX51_EFIKAMX? ? ? ? Include support for Genesi Efika MX nettop. This includes specific ? ? ? ? configurations for the board and its peripherals.
arch/arm/mach-mx5/Kconfig +8
-0+config MACH_MX53_EVK + ? ? bool "Support MX53 EVK platforms" + ? ? select SOC_IMX53 + ? ? select IMX_HAVE_PLATFORM_IMX_UART + ? ? help + ? ? ? Include support for MX53 EVK platform. This includes specific + ? ? ? configurations for the board and its peripherals. +?endif
arch/arm/mach-mx5/Makefile +0
-0@@ -8,6 +8,7 @@ obj-y ? := cpu.o mm.o clock-mx51-mx53.o devices.o?obj-$(CONFIG_CPU_FREQ_IMX) ? ?+= cpu_op-mx51.o ?obj-$(CONFIG_MACH_MX51_BABBAGE) += board-mx51_babbage.o ?obj-$(CONFIG_MACH_MX51_3DS) += board-mx51_3ds.o +obj-$(CONFIG_MACH_MX53_EVK) += board-mx53_evk.o ?obj-$(CONFIG_MACH_EUKREA_CPUIMX51) += board-cpuimx51.o ?obj-$(CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD) += eukrea_mbimx51-baseboard.o ?obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += board-cpuimx51sd.o
arch/arm/mach-mx5/Makefile.boot +6
-3@@ -1,3 +1,6 @@ - ? zreladdr-y ? ? ? ?:= 0x90008000 -params_phys-y ? ? ? ?:= 0x90000100 -initrd_phys-y ? ? ? ?:= 0x90800000 + ? zreladdr-$(CONFIG_SOC_IMX51) ? ? ? ?:= 0x90008000 +params_phys-$(CONFIG_SOC_IMX51) ? ? ? ?:= 0x90000100 +initrd_phys-$(CONFIG_SOC_IMX51) ? ? ? ?:= 0x90800000 + ? zreladdr-$(CONFIG_SOC_IMX53) ? ? ? ?:= 0x70008000 +params_phys-$(CONFIG_SOC_IMX53) ? ? ? ?:= 0x70000100 +initrd_phys-$(CONFIG_SOC_IMX53) ? ? ? ?:= 0x70800000arch/arm/mach-mx5/board-mx53_evk.c new file +25
-0@@ -0,0 +1,90 @@ +/* +* Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved. +* Copyright (C) 2010 Yong Shen. <[email protected]> +*/ + +/* +* 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., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ + +#include <linux/init.h> +#include <linux/clk.h> +#include <mach/common.h> +#include <mach/hardware.h> arch/arm/mach-mx5/board-mx53_evk.c line 35
Quoted 10 lines
arch/arm/mach-mx5/board-mx53_evk.c new file +10
-0+#include <asm/mach-types.h> +#include <asm/mach/arch.h> +#include <asm/mach/time.h> +#include <mach/imx-uart.h> +#include <mach/iomux-mx53.h> + +#include "crm_regs.h" +#include "devices-imx53.h" + +static iomux_v3_cfg_t mx53evk_pads[] = {
mx53_evk_padsto matchMX53_EVKQuoted 7 lines
arch/arm/mach-mx5/board-mx53_evk.c new file +7
-0+ ? ? MX53_PAD_CSI0_D10__UART1_TXD, + ? ? MX53_PAD_CSI0_D11__UART1_RXD, + ? ? MX53_PAD_ATA_DIOW__UART1_TXD, + ? ? MX53_PAD_ATA_DMACK__UART1_RXD, + + ? ? MX53_PAD_ATA_BUFFER_EN__UART2_RXD, + ? ? MX53_PAD_ATA_DMARQ__UART2_TXD,arch/arm/mach-mx5/board-mx53_evk.c line 52
Quoted 10 lines
arch/arm/mach-mx5/board-mx53_evk.c new file +10
-0+ ? ? MX53_PAD_ATA_DIOR__UART2_RTS, + ? ? MX53_PAD_ATA_INTRQ__UART2_CTS, + + ? ? MX53_PAD_ATA_CS_0__UART3_TXD, + ? ? MX53_PAD_ATA_CS_1__UART3_RXD, + ? ? MX53_PAD_ATA_DA_1__UART3_CTS, + ? ? MX53_PAD_ATA_DA_2__UART3_RTS, +}; + +#if defined(CONFIG_SERIAL_IMX ) || defined(CONFIG_SERIAL_IMX_MODULE )I usually advocate unconditional device registration.
arch/arm/mach-mx5/board-mx53_evk.c line 53
Quoted 1 line
arch/arm/mach-mx5/board-mx53_evk.c new file +1
-0+static const struct imxuart_platform_data uart_pdata__initconst = {
mx53_evk_uart_pdatapleaseQuoted 6 lines
arch/arm/mach-mx5/board-mx53_evk.c new file +6
-0+ ? ? .flags = IMXUART_HAVE_RTSCTS, +}; + +static inline void mxc_init_imx_uart (void ) +{ + ? ? imx53_add_imx_uart(0, &uart_pdata);arch/arm/mach-mx5/board-mx53_evk.c line 69
Quoted 10 lines
arch/arm/mach-mx5/board-mx53_evk.c new file +10
-0+ ? ? imx53_add_imx_uart(1, &uart_pdata); + ? ? imx53_add_imx_uart(2, &uart_pdata); +} +#else /* !SERIAL_IMX */ +static inline void mxc_init_imx_uart (void ) +{ +} +#endif /* SERIAL_IMX */ + +static void __init mxc_board_init (void )please use a machine prefix (i.e.
mx53_evk_board_init)arch/arm/mach-mx5/board-mx53_evk.c line 81
Quoted 12 lines
arch/arm/mach-mx5/board-mx53_evk.c new file +12
-0+{ + ? ? mxc_iomux_v3_setup_multiple_pads(mx53evk_pads, + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ARRAY_SIZE(mx53evk_pads)); + ? ? mxc_init_imx_uart(); +} + +static void __init mx53_evk_timer_init (void ) +{ + ? ? mx53_clocks_init(32768, 24000000, 22579200, 0); +} + +static struct sys_timer mxc_timer = {
mx53_evk_timer...Quoted 91 lines
arch/arm/mach-mx5/board-mx53_evk.c new file +9
-0+ ? ? .init ? = mx53_evk_timer_init, +}; + +MACHINE_START (MX53_EVK ,"Freescale MX53 EVK Board" ) + ? ? .map_io = mx53_map_io, + ? ? .init_irq = mx53_init_irq, + ? ? .init_machine = mxc_board_init, + ? ? .timer = &mxc_timer, +MACHINE_END arch/arm/mach-mx5/devices-imx53.h new file +13
-0@@ -0,0 +1,13 @@ +/* +* Copyright (C) 2010 Yong Shen. <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it under +* the terms of the GNU General Public License version 2 as published by the +* Free Software Foundation. +*/ +#include <mach/mx53.h> +#include <mach/devices-common.h> + +extern const struct imx_imx_uart_1irq_data imx53_imx_uart_data[]__initconst ; +#define imx53_add_imx_uart (id, pdata) ? ? ? ?\ + ? ? imx_add_imx_uart_1irq(&imx53_imx_uart_data[id], pdata)arch/arm/plat-mxc/devices/platform-imx-uart.c +0
-0@@ -104,6 +104,16 @@ const struct imx_imx_uart_1irq_data imx51_imx_uart_data[] __initconst = { ?};?#endif /* ifdef
CONFIG_SOC_IMX51*/arch/arm/plat-mxc/devices/platform-imx-uart.c +10
-0+#ifdef CONFIG_SOC_IMX53 +const struct imx_imx_uart_1irq_data imx53_imx_uart_data[]__initconst = { +#define imx53_imx_uart_data_entry(_id, _hwid) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\ + ? ? imx_imx_uart_1irq_data_entry(MX53, _id, _hwid, SZ_4K) + ? ? imx53_imx_uart_data_entry(0, 1), + ? ? imx53_imx_uart_data_entry(1, 2), + ? ? imx53_imx_uart_data_entry(2, 3), +}; +#endif /* ifdef CONFIG_SOC_IMX53 */ +?struct
platform_device*__initimx_add_imx_uart_3irq( ? ? ? ? ? ? ? const structimx_imx_uart_3irq_data*data, ? ? ? ? ? ? ? const structimxuart_platform_data*pdata)arch/arm/plat-mxc/include/mach/iomux-mx53.h +0
-0@@ -42,6 +42,26 @@ typedef enum iomux_config {?#define
NON_MUX_I? ?0x00
?#defineNON_PAD_I? ?0x00arch/arm/plat-mxc/include/mach/iomux-mx53.h +20
-0+#define MX53_UART_PAD_CTRL ? ? ? ? ? (PAD_CTL_PKE | PAD_CTL_PUE | ? ?\ + ? ? ? ? ? ? PAD_CTL_DSE_HIGH | PAD_CTL_SRE_FAST | PAD_CTL_HYS) +/* UART1 */ +#define MX53_PAD_CSI0_D10__UART1_TXD IOMUX_PAD(0x414, 0xE8, 2, 0x0, 0, MX53_UART_PAD_CTRL) +#define MX53_PAD_CSI0_D11__UART1_RXD IOMUX_PAD(0x418, 0xEC, 2, 0x878, 1, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_DIOW__UART1_TXD IOMUX_PAD(0x5F0, 0x270, 3, 0x0, 0, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_DMACK__UART1_RXD ? ? ? ?IOMUX_PAD(0x5F4, 0x274, 3, 0x880, 3, MX53_UART_PAD_CTRL) + +/* UART2 */ +#define MX53_PAD_ATA_BUFFER_EN__UART2_RXD ? ?IOMUX_PAD(0x5FC, 0x27C, 3, 0x880, 3, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_DMARQ__UART2_TXD ? ? ? ?IOMUX_PAD(0x5F8, 0x278, 3, 0x0, 0, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_DIOR__UART2_RTS IOMUX_PAD(0x604, 0x284, 3, 0x87C, 3, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_INTRQ__UART2_CTS ? ? ? ?IOMUX_PAD(0x600, 0x280, 3, 0x0, 0, MX53_UART_PAD_CTRL) + +/* UART3 */ +#define MX53_PAD_ATA_CS_0__UART3_TXD IOMUX_PAD(0x61C, 0x29C, 4, 0x0, 0, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_CS_1__UART3_RXD IOMUX_PAD(0x620, 0x2A0, 4, 0x888, 3, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_DA_1__UART3_CTS IOMUX_PAD(0x614, 0x294, 4, 0x0, 0, MX53_UART_PAD_CTRL) +#define MX53_PAD_ATA_DA_2__UART3_RTS IOMUX_PAD(0x618, 0x298, 4, 0x884, 5, MX53_UART_PAD_CTRL) +?#define
MX53_PAD_GPIO_19__GPIO_4_5? ? ? ? ?IOMUX_PAD(0x348, 0x20,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)?#defineMX53_PAD_KEY_COL0__GPIO_4_6? ? ? ? ?IOMUX_PAD(0x34C, 0x24,IOMUX_CONFIG_ALT1,0x0, 0,NO_PAD_CTRL) ?#defineMX53_PAD_KEY_ROW0__GPIO_4_7? ? ? ? ?IOMUX_PAD(0x350, 0x28,IOMUX_CONFIG_ALT1,0x0, 0,NO_PAD_CTRL)arch/arm/plat-mxc/include/mach/irqs.h +0
-0@@ -29,8 +29,10 @@ ?#define MXC_GPIO_IRQS ? ? ? ? ? ? ? ?(32 * 4)?#elif defined
CONFIG_ARCH_MX25
?#defineMXC_GPIO_IRQS? ? ? ? ? ? ? ?(32 * 4)arch/arm/plat-mxc/include/mach/irqs.h +1
-1-#elif definedCONFIG_ARCH_MX5 +#elif definedCONFIG_ARCH_MX51 ?#define
MXC_GPIO_IRQS? ? ? ? ? ? ? ?(32 * 4)arch/arm/plat-mxc/include/mach/irqs.h
Quoted 2 lines
arch/arm/plat-mxc/include/mach/irqs.h +2
-0+#elif definedCONFIG_ARCH_MX53 +#define MXC_GPIO_IRQS ? ? ? ? ? ? ? ?(32 * 7)You didn't read the comment before this block.
Quoted 17 lines
?#elif defined
CONFIG_ARCH_MXC91231
?#defineMXC_GPIO_IRQS? ? ? ? ? ? ? ?(32 * 4)
?#elif definedCONFIG_ARCH_MX3arch/arm/plat-mxc/include/mach/uncompress.h +0
-0@@ -63,6 +63,7 @@ static inline void flush(void)?#define
MX3X_UART1_BASE_ADDR0x43F90000
?#defineMX3X_UART2_BASE_ADDR0x43F94000
?#defineMX51_UART1_BASE_ADDR0x73fbc000
+#defineMX53_UART1_BASE_ADDR0x53fbc000?static
__inline__void__arch_decomp_setup(unsigned long arch_id)?{arch/arm/plat-mxc/include/mach/uncompress.h +0
-0@@ -102,6 +103,9 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)? ? ? case
MACH_TYPE_EUKREA_CPUIMX51SD:Quoted 8 lines
? ? ? ? ? ? ?
uart_base=MX51_UART1_BASE_ADDR;
? ? ? ? ? ? ? break;
+ ? ? caseMACH_TYPE_MX53_EVK:
+ ? ? ? ? ? ?uart_base=MX53_UART1_BASE_ADDR;
+ ? ? ? ? ? ? break;
? ? ? default:
? ? ? ? ? ? ? break;
? ? ? }Best regards
Uwe--
Pengutronix e.K. ? ? ? ? ? ? ? ? ? ? ? ? ? | Uwe Kleine-K?nig ? ? ? ? ? ?| Industrial Linux Solutions ? ? ? ? ? ? ? ? | http://www.pengutronix.de/ ?|
PATCH v2 2/2 ARM i.MX53: Make MX53 EVK bootable
In reply to Uwe Kleine-KönigQuoted 4 lines · Uwe Kleine-K?nig
Hello Yong,
Quoted 1 line · yong.shen at freescale.com
From: Yong Shen <[email protected]>
[...]
Quoted 6 lines
Quoted 6 lines
arch/arm/plat-mxc/include/mach/irqs.h +0
-0@@ -29,8 +29,10 @@#define MXC_GPIO_IRQS (32 * 4)
Quoted 9 lines
arch/arm/plat-mxc/include/mach/irqs.h line 35
Quoted 7 lines
arch/arm/plat-mxc/include/mach/irqs.h +3
-1#elif definedCONFIG_ARCH_MX25 #define MXC_GPIO_IRQS (32 * 4) -#elif definedCONFIG_ARCH_MX5 +#elif definedCONFIG_ARCH_MX51 #define MXC_GPIO_IRQS (32 * 4) +#elif definedCONFIG_ARCH_MX53 +#define MXC_GPIO_IRQS (32 * 7)You didn't read the comment before this block.
I did not read the comment either when I was trying to add mxs support into imx-single-zimage. But the error during the run-time forced me to go back and read the comment :)
Signature · 2 lines
Regards, Shawn