diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2013-03-29 02:04:07 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-04-01 08:42:21 -0400 |
commit | 39490ab0ff49138c8613d95ea13b79c8159f306f (patch) | |
tree | 0d31068ff3e4f92fd09987e00557961576011788 /arch/arm/mach-mxs | |
parent | 3cb7825bdc84d1d6c81ac9a2be201fe5bea5de05 (diff) |
ARM: mxs: merge imx23 and imx28 into one machine_desc
Most of the function hooks are same between imx23 and imx28
machine_desc, so merge them into one.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-mxs')
-rw-r--r-- | arch/arm/mach-mxs/mach-mxs.c | 43 |
1 files changed, 13 insertions, 30 deletions
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index fc762579d30f..a6e1ccb05066 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c | |||
@@ -171,18 +171,6 @@ static struct of_dev_auxdata mxs_auxdata_lookup[] __initdata = { | |||
171 | { /* sentinel */ } | 171 | { /* sentinel */ } |
172 | }; | 172 | }; |
173 | 173 | ||
174 | static void __init imx23_timer_init(void) | ||
175 | { | ||
176 | mx23_clocks_init(); | ||
177 | clocksource_of_init(); | ||
178 | } | ||
179 | |||
180 | static void __init imx28_timer_init(void) | ||
181 | { | ||
182 | mx28_clocks_init(); | ||
183 | clocksource_of_init(); | ||
184 | } | ||
185 | |||
186 | #define OCOTP_WORD_OFFSET 0x20 | 174 | #define OCOTP_WORD_OFFSET 0x20 |
187 | #define OCOTP_WORD_COUNT 0x20 | 175 | #define OCOTP_WORD_COUNT 0x20 |
188 | 176 | ||
@@ -573,32 +561,27 @@ soft: | |||
573 | soft_restart(0); | 561 | soft_restart(0); |
574 | } | 562 | } |
575 | 563 | ||
576 | static const char *imx23_dt_compat[] __initdata = { | 564 | static void __init mxs_timer_init(void) |
577 | "fsl,imx23", | 565 | { |
578 | NULL, | 566 | if (of_machine_is_compatible("fsl,imx23")) |
579 | }; | 567 | mx23_clocks_init(); |
568 | else | ||
569 | mx28_clocks_init(); | ||
570 | clocksource_of_init(); | ||
571 | } | ||
580 | 572 | ||
581 | static const char *imx28_dt_compat[] __initdata = { | 573 | static const char *mxs_dt_compat[] __initdata = { |
582 | "fsl,imx28", | 574 | "fsl,imx28", |
575 | "fsl,imx23", | ||
583 | NULL, | 576 | NULL, |
584 | }; | 577 | }; |
585 | 578 | ||
586 | DT_MACHINE_START(IMX23, "Freescale i.MX23 (Device Tree)") | 579 | DT_MACHINE_START(MXS, "Freescale MXS (Device Tree)") |
587 | .map_io = debug_ll_io_init, | ||
588 | .init_irq = irqchip_init, | ||
589 | .handle_irq = icoll_handle_irq, | ||
590 | .init_time = imx23_timer_init, | ||
591 | .init_machine = mxs_machine_init, | ||
592 | .dt_compat = imx23_dt_compat, | ||
593 | .restart = mxs_restart, | ||
594 | MACHINE_END | ||
595 | |||
596 | DT_MACHINE_START(IMX28, "Freescale i.MX28 (Device Tree)") | ||
597 | .map_io = debug_ll_io_init, | 580 | .map_io = debug_ll_io_init, |
598 | .init_irq = irqchip_init, | 581 | .init_irq = irqchip_init, |
599 | .handle_irq = icoll_handle_irq, | 582 | .handle_irq = icoll_handle_irq, |
600 | .init_time = imx28_timer_init, | 583 | .init_time = mxs_timer_init, |
601 | .init_machine = mxs_machine_init, | 584 | .init_machine = mxs_machine_init, |
602 | .dt_compat = imx28_dt_compat, | 585 | .dt_compat = mxs_dt_compat, |
603 | .restart = mxs_restart, | 586 | .restart = mxs_restart, |
604 | MACHINE_END | 587 | MACHINE_END |