diff options
author | Jingchang Lu <jingchang.lu@freescale.com> | 2014-10-31 05:39:53 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2014-11-21 18:39:36 -0500 |
commit | 08ae9646468c636098f689a72194778b15c9d94a (patch) | |
tree | 1a7318b7a4c73061f86cea07f7ccfb28857037fb /arch/arm/mach-imx | |
parent | f144c7ec0dfe2f53c3c57538560a11bdc94d0cd1 (diff) |
ARM: imx: clean up machine mxc_arch_reset_init_dt reset init
System restart mechanism has been changed with the introduction
of "kernel restart handler call chain support". The imx2 watchdog
based restart handler has been moved to the driver, and these
restart can be removed from the machine layer.
This patch cleans up the device tree version machine reset init with
mxc_arch_reset_init_dt and removes corresponding .restart handler,
for the .init_machine that can be handled by system default after
removing the mxc_arch_reset_init_dt, the .init_machine is also removed.
Signed-off-by: Jingchang Lu <jingchang.lu@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-imx/imx25-dt.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-imx/imx27-dt.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-imx/imx31-dt.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-imx/imx35-dt.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx50.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx51.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx53.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx6q.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx6sl.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx6sx.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-vf610.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-imx/system.c | 15 |
13 files changed, 0 insertions, 79 deletions
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index 1dabf435c592..a6147f9fce7f 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h | |||
@@ -61,7 +61,6 @@ struct platform_device *mxc_register_gpio(char *name, int id, | |||
61 | void mxc_set_cpu_type(unsigned int type); | 61 | void mxc_set_cpu_type(unsigned int type); |
62 | void mxc_restart(enum reboot_mode, const char *); | 62 | void mxc_restart(enum reboot_mode, const char *); |
63 | void mxc_arch_reset_init(void __iomem *); | 63 | void mxc_arch_reset_init(void __iomem *); |
64 | void mxc_arch_reset_init_dt(void); | ||
65 | int mx51_revision(void); | 64 | int mx51_revision(void); |
66 | int mx53_revision(void); | 65 | int mx53_revision(void); |
67 | void imx_set_aips(void __iomem *); | 66 | void imx_set_aips(void __iomem *); |
diff --git a/arch/arm/mach-imx/imx25-dt.c b/arch/arm/mach-imx/imx25-dt.c index cf8032bae277..25defbdb06c4 100644 --- a/arch/arm/mach-imx/imx25-dt.c +++ b/arch/arm/mach-imx/imx25-dt.c | |||
@@ -17,13 +17,6 @@ | |||
17 | #include "common.h" | 17 | #include "common.h" |
18 | #include "mx25.h" | 18 | #include "mx25.h" |
19 | 19 | ||
20 | static void __init imx25_dt_init(void) | ||
21 | { | ||
22 | mxc_arch_reset_init_dt(); | ||
23 | |||
24 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
25 | } | ||
26 | |||
27 | static const char * const imx25_dt_board_compat[] __initconst = { | 20 | static const char * const imx25_dt_board_compat[] __initconst = { |
28 | "fsl,imx25", | 21 | "fsl,imx25", |
29 | NULL | 22 | NULL |
@@ -33,7 +26,5 @@ DT_MACHINE_START(IMX25_DT, "Freescale i.MX25 (Device Tree Support)") | |||
33 | .map_io = mx25_map_io, | 26 | .map_io = mx25_map_io, |
34 | .init_early = imx25_init_early, | 27 | .init_early = imx25_init_early, |
35 | .init_irq = mx25_init_irq, | 28 | .init_irq = mx25_init_irq, |
36 | .init_machine = imx25_dt_init, | ||
37 | .dt_compat = imx25_dt_board_compat, | 29 | .dt_compat = imx25_dt_board_compat, |
38 | .restart = mxc_restart, | ||
39 | MACHINE_END | 30 | MACHINE_END |
diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c index dc8f1a6f45f2..bd42d1bd10af 100644 --- a/arch/arm/mach-imx/imx27-dt.c +++ b/arch/arm/mach-imx/imx27-dt.c | |||
@@ -22,8 +22,6 @@ static void __init imx27_dt_init(void) | |||
22 | { | 22 | { |
23 | struct platform_device_info devinfo = { .name = "cpufreq-dt", }; | 23 | struct platform_device_info devinfo = { .name = "cpufreq-dt", }; |
24 | 24 | ||
25 | mxc_arch_reset_init_dt(); | ||
26 | |||
27 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 25 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
28 | 26 | ||
29 | platform_device_register_full(&devinfo); | 27 | platform_device_register_full(&devinfo); |
@@ -40,5 +38,4 @@ DT_MACHINE_START(IMX27_DT, "Freescale i.MX27 (Device Tree Support)") | |||
40 | .init_irq = mx27_init_irq, | 38 | .init_irq = mx27_init_irq, |
41 | .init_machine = imx27_dt_init, | 39 | .init_machine = imx27_dt_init, |
42 | .dt_compat = imx27_dt_board_compat, | 40 | .dt_compat = imx27_dt_board_compat, |
43 | .restart = mxc_restart, | ||
44 | MACHINE_END | 41 | MACHINE_END |
diff --git a/arch/arm/mach-imx/imx31-dt.c b/arch/arm/mach-imx/imx31-dt.c index 418dbc82adc4..32100222a017 100644 --- a/arch/arm/mach-imx/imx31-dt.c +++ b/arch/arm/mach-imx/imx31-dt.c | |||
@@ -18,13 +18,6 @@ | |||
18 | #include "common.h" | 18 | #include "common.h" |
19 | #include "mx31.h" | 19 | #include "mx31.h" |
20 | 20 | ||
21 | static void __init imx31_dt_init(void) | ||
22 | { | ||
23 | mxc_arch_reset_init_dt(); | ||
24 | |||
25 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
26 | } | ||
27 | |||
28 | static const char * const imx31_dt_board_compat[] __initconst = { | 21 | static const char * const imx31_dt_board_compat[] __initconst = { |
29 | "fsl,imx31", | 22 | "fsl,imx31", |
30 | NULL | 23 | NULL |
@@ -40,7 +33,5 @@ DT_MACHINE_START(IMX31_DT, "Freescale i.MX31 (Device Tree Support)") | |||
40 | .init_early = imx31_init_early, | 33 | .init_early = imx31_init_early, |
41 | .init_irq = mx31_init_irq, | 34 | .init_irq = mx31_init_irq, |
42 | .init_time = imx31_dt_timer_init, | 35 | .init_time = imx31_dt_timer_init, |
43 | .init_machine = imx31_dt_init, | ||
44 | .dt_compat = imx31_dt_board_compat, | 36 | .dt_compat = imx31_dt_board_compat, |
45 | .restart = mxc_restart, | ||
46 | MACHINE_END | 37 | MACHINE_END |
diff --git a/arch/arm/mach-imx/imx35-dt.c b/arch/arm/mach-imx/imx35-dt.c index 584fbe105579..e9396037235d 100644 --- a/arch/arm/mach-imx/imx35-dt.c +++ b/arch/arm/mach-imx/imx35-dt.c | |||
@@ -20,14 +20,6 @@ | |||
20 | #include "common.h" | 20 | #include "common.h" |
21 | #include "mx35.h" | 21 | #include "mx35.h" |
22 | 22 | ||
23 | static void __init imx35_dt_init(void) | ||
24 | { | ||
25 | mxc_arch_reset_init_dt(); | ||
26 | |||
27 | of_platform_populate(NULL, of_default_bus_match_table, | ||
28 | NULL, NULL); | ||
29 | } | ||
30 | |||
31 | static void __init imx35_irq_init(void) | 23 | static void __init imx35_irq_init(void) |
32 | { | 24 | { |
33 | imx_init_l2cache(); | 25 | imx_init_l2cache(); |
@@ -43,7 +35,5 @@ DT_MACHINE_START(IMX35_DT, "Freescale i.MX35 (Device Tree Support)") | |||
43 | .map_io = mx35_map_io, | 35 | .map_io = mx35_map_io, |
44 | .init_early = imx35_init_early, | 36 | .init_early = imx35_init_early, |
45 | .init_irq = imx35_irq_init, | 37 | .init_irq = imx35_irq_init, |
46 | .init_machine = imx35_dt_init, | ||
47 | .dt_compat = imx35_dt_board_compat, | 38 | .dt_compat = imx35_dt_board_compat, |
48 | .restart = mxc_restart, | ||
49 | MACHINE_END | 39 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-imx50.c b/arch/arm/mach-imx/mach-imx50.c index b1e56a94a382..ecf58b9e974b 100644 --- a/arch/arm/mach-imx/mach-imx50.c +++ b/arch/arm/mach-imx/mach-imx50.c | |||
@@ -16,13 +16,6 @@ | |||
16 | 16 | ||
17 | #include "common.h" | 17 | #include "common.h" |
18 | 18 | ||
19 | static void __init imx50_dt_init(void) | ||
20 | { | ||
21 | mxc_arch_reset_init_dt(); | ||
22 | |||
23 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
24 | } | ||
25 | |||
26 | static const char * const imx50_dt_board_compat[] __initconst = { | 19 | static const char * const imx50_dt_board_compat[] __initconst = { |
27 | "fsl,imx50", | 20 | "fsl,imx50", |
28 | NULL | 21 | NULL |
@@ -30,7 +23,5 @@ static const char * const imx50_dt_board_compat[] __initconst = { | |||
30 | 23 | ||
31 | DT_MACHINE_START(IMX50_DT, "Freescale i.MX50 (Device Tree Support)") | 24 | DT_MACHINE_START(IMX50_DT, "Freescale i.MX50 (Device Tree Support)") |
32 | .init_irq = tzic_init_irq, | 25 | .init_irq = tzic_init_irq, |
33 | .init_machine = imx50_dt_init, | ||
34 | .dt_compat = imx50_dt_board_compat, | 26 | .dt_compat = imx50_dt_board_compat, |
35 | .restart = mxc_restart, | ||
36 | MACHINE_END | 27 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-imx51.c b/arch/arm/mach-imx/mach-imx51.c index 2c5fcaf8675b..b015129e4045 100644 --- a/arch/arm/mach-imx/mach-imx51.c +++ b/arch/arm/mach-imx/mach-imx51.c | |||
@@ -53,7 +53,6 @@ static void __init imx51_dt_init(void) | |||
53 | { | 53 | { |
54 | struct platform_device_info devinfo = { .name = "cpufreq-dt", }; | 54 | struct platform_device_info devinfo = { .name = "cpufreq-dt", }; |
55 | 55 | ||
56 | mxc_arch_reset_init_dt(); | ||
57 | imx51_ipu_mipi_setup(); | 56 | imx51_ipu_mipi_setup(); |
58 | imx_src_init(); | 57 | imx_src_init(); |
59 | 58 | ||
@@ -78,5 +77,4 @@ DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)") | |||
78 | .init_machine = imx51_dt_init, | 77 | .init_machine = imx51_dt_init, |
79 | .init_late = imx51_init_late, | 78 | .init_late = imx51_init_late, |
80 | .dt_compat = imx51_dt_board_compat, | 79 | .dt_compat = imx51_dt_board_compat, |
81 | .restart = mxc_restart, | ||
82 | MACHINE_END | 80 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c index 03dd6ea13acc..18b5c5c136db 100644 --- a/arch/arm/mach-imx/mach-imx53.c +++ b/arch/arm/mach-imx/mach-imx53.c | |||
@@ -30,7 +30,6 @@ static void __init imx53_init_early(void) | |||
30 | 30 | ||
31 | static void __init imx53_dt_init(void) | 31 | static void __init imx53_dt_init(void) |
32 | { | 32 | { |
33 | mxc_arch_reset_init_dt(); | ||
34 | imx_src_init(); | 33 | imx_src_init(); |
35 | 34 | ||
36 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 35 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
@@ -54,5 +53,4 @@ DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)") | |||
54 | .init_machine = imx53_dt_init, | 53 | .init_machine = imx53_dt_init, |
55 | .init_late = imx53_init_late, | 54 | .init_late = imx53_init_late, |
56 | .dt_compat = imx53_dt_board_compat, | 55 | .dt_compat = imx53_dt_board_compat, |
57 | .restart = mxc_restart, | ||
58 | MACHINE_END | 56 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index d51c6e99a2e9..5057d61298b7 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -268,8 +268,6 @@ static void __init imx6q_init_machine(void) | |||
268 | imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q", | 268 | imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q", |
269 | imx_get_soc_revision()); | 269 | imx_get_soc_revision()); |
270 | 270 | ||
271 | mxc_arch_reset_init_dt(); | ||
272 | |||
273 | parent = imx_soc_device_init(); | 271 | parent = imx_soc_device_init(); |
274 | if (parent == NULL) | 272 | if (parent == NULL) |
275 | pr_warn("failed to initialize soc device\n"); | 273 | pr_warn("failed to initialize soc device\n"); |
@@ -409,5 +407,4 @@ DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad/DualLite (Device Tree)") | |||
409 | .init_machine = imx6q_init_machine, | 407 | .init_machine = imx6q_init_machine, |
410 | .init_late = imx6q_init_late, | 408 | .init_late = imx6q_init_late, |
411 | .dt_compat = imx6q_dt_compat, | 409 | .dt_compat = imx6q_dt_compat, |
412 | .restart = mxc_restart, | ||
413 | MACHINE_END | 410 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c index ed263a21d928..65f4b0df9b0a 100644 --- a/arch/arm/mach-imx/mach-imx6sl.c +++ b/arch/arm/mach-imx/mach-imx6sl.c | |||
@@ -48,8 +48,6 @@ static void __init imx6sl_init_machine(void) | |||
48 | { | 48 | { |
49 | struct device *parent; | 49 | struct device *parent; |
50 | 50 | ||
51 | mxc_arch_reset_init_dt(); | ||
52 | |||
53 | parent = imx_soc_device_init(); | 51 | parent = imx_soc_device_init(); |
54 | if (parent == NULL) | 52 | if (parent == NULL) |
55 | pr_warn("failed to initialize soc device\n"); | 53 | pr_warn("failed to initialize soc device\n"); |
@@ -81,5 +79,4 @@ DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)") | |||
81 | .init_machine = imx6sl_init_machine, | 79 | .init_machine = imx6sl_init_machine, |
82 | .init_late = imx6sl_init_late, | 80 | .init_late = imx6sl_init_late, |
83 | .dt_compat = imx6sl_dt_compat, | 81 | .dt_compat = imx6sl_dt_compat, |
84 | .restart = mxc_restart, | ||
85 | MACHINE_END | 82 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c index 3de3b7369aef..ccee19cf825d 100644 --- a/arch/arm/mach-imx/mach-imx6sx.c +++ b/arch/arm/mach-imx/mach-imx6sx.c | |||
@@ -18,8 +18,6 @@ static void __init imx6sx_init_machine(void) | |||
18 | { | 18 | { |
19 | struct device *parent; | 19 | struct device *parent; |
20 | 20 | ||
21 | mxc_arch_reset_init_dt(); | ||
22 | |||
23 | parent = imx_soc_device_init(); | 21 | parent = imx_soc_device_init(); |
24 | if (parent == NULL) | 22 | if (parent == NULL) |
25 | pr_warn("failed to initialize soc device\n"); | 23 | pr_warn("failed to initialize soc device\n"); |
@@ -58,5 +56,4 @@ DT_MACHINE_START(IMX6SX, "Freescale i.MX6 SoloX (Device Tree)") | |||
58 | .init_machine = imx6sx_init_machine, | 56 | .init_machine = imx6sx_init_machine, |
59 | .dt_compat = imx6sx_dt_compat, | 57 | .dt_compat = imx6sx_dt_compat, |
60 | .init_late = imx6sx_init_late, | 58 | .init_late = imx6sx_init_late, |
61 | .restart = mxc_restart, | ||
62 | MACHINE_END | 59 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-vf610.c b/arch/arm/mach-imx/mach-vf610.c index ee7e57b752a7..c11ab6a1dc87 100644 --- a/arch/arm/mach-imx/mach-vf610.c +++ b/arch/arm/mach-imx/mach-vf610.c | |||
@@ -12,14 +12,6 @@ | |||
12 | #include <asm/mach/arch.h> | 12 | #include <asm/mach/arch.h> |
13 | #include <asm/hardware/cache-l2x0.h> | 13 | #include <asm/hardware/cache-l2x0.h> |
14 | 14 | ||
15 | #include "common.h" | ||
16 | |||
17 | static void __init vf610_init_machine(void) | ||
18 | { | ||
19 | mxc_arch_reset_init_dt(); | ||
20 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
21 | } | ||
22 | |||
23 | static const char * const vf610_dt_compat[] __initconst = { | 15 | static const char * const vf610_dt_compat[] __initconst = { |
24 | "fsl,vf610", | 16 | "fsl,vf610", |
25 | NULL, | 17 | NULL, |
@@ -28,7 +20,5 @@ static const char * const vf610_dt_compat[] __initconst = { | |||
28 | DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF610 (Device Tree)") | 20 | DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF610 (Device Tree)") |
29 | .l2c_aux_val = 0, | 21 | .l2c_aux_val = 0, |
30 | .l2c_aux_mask = ~0, | 22 | .l2c_aux_mask = ~0, |
31 | .init_machine = vf610_init_machine, | ||
32 | .dt_compat = vf610_dt_compat, | 23 | .dt_compat = vf610_dt_compat, |
33 | .restart = mxc_restart, | ||
34 | MACHINE_END | 24 | MACHINE_END |
diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c index d14c33fd6b03..51c35013b673 100644 --- a/arch/arm/mach-imx/system.c +++ b/arch/arm/mach-imx/system.c | |||
@@ -89,21 +89,6 @@ void __init mxc_arch_reset_init(void __iomem *base) | |||
89 | clk_prepare(wdog_clk); | 89 | clk_prepare(wdog_clk); |
90 | } | 90 | } |
91 | 91 | ||
92 | void __init mxc_arch_reset_init_dt(void) | ||
93 | { | ||
94 | struct device_node *np; | ||
95 | |||
96 | np = of_find_compatible_node(NULL, NULL, "fsl,imx21-wdt"); | ||
97 | wdog_base = of_iomap(np, 0); | ||
98 | WARN_ON(!wdog_base); | ||
99 | |||
100 | wdog_clk = of_clk_get(np, 0); | ||
101 | if (IS_ERR(wdog_clk)) | ||
102 | pr_warn("%s: failed to get wdog clock\n", __func__); | ||
103 | else | ||
104 | clk_prepare(wdog_clk); | ||
105 | } | ||
106 | |||
107 | #ifdef CONFIG_CACHE_L2X0 | 92 | #ifdef CONFIG_CACHE_L2X0 |
108 | void __init imx_init_l2cache(void) | 93 | void __init imx_init_l2cache(void) |
109 | { | 94 | { |