Commit 08ae9646468c636098f689a72194778b15c9d94a
Committed by
Shawn Guo
1 parent
f144c7ec0d
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
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>
Showing 13 changed files with 0 additions and 79 deletions Side-by-side Diff
- arch/arm/mach-imx/common.h
- arch/arm/mach-imx/imx25-dt.c
- arch/arm/mach-imx/imx27-dt.c
- arch/arm/mach-imx/imx31-dt.c
- arch/arm/mach-imx/imx35-dt.c
- arch/arm/mach-imx/mach-imx50.c
- arch/arm/mach-imx/mach-imx51.c
- arch/arm/mach-imx/mach-imx53.c
- arch/arm/mach-imx/mach-imx6q.c
- arch/arm/mach-imx/mach-imx6sl.c
- arch/arm/mach-imx/mach-imx6sx.c
- arch/arm/mach-imx/mach-vf610.c
- arch/arm/mach-imx/system.c
arch/arm/mach-imx/common.h
... | ... | @@ -61,7 +61,6 @@ |
61 | 61 | void mxc_set_cpu_type(unsigned int type); |
62 | 62 | void mxc_restart(enum reboot_mode, const char *); |
63 | 63 | void mxc_arch_reset_init(void __iomem *); |
64 | -void mxc_arch_reset_init_dt(void); | |
65 | 64 | int mx51_revision(void); |
66 | 65 | int mx53_revision(void); |
67 | 66 | void imx_set_aips(void __iomem *); |
arch/arm/mach-imx/imx25-dt.c
... | ... | @@ -17,13 +17,6 @@ |
17 | 17 | #include "common.h" |
18 | 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 | 20 | static const char * const imx25_dt_board_compat[] __initconst = { |
28 | 21 | "fsl,imx25", |
29 | 22 | NULL |
30 | 23 | |
... | ... | @@ -33,8 +26,6 @@ |
33 | 26 | .map_io = mx25_map_io, |
34 | 27 | .init_early = imx25_init_early, |
35 | 28 | .init_irq = mx25_init_irq, |
36 | - .init_machine = imx25_dt_init, | |
37 | 29 | .dt_compat = imx25_dt_board_compat, |
38 | - .restart = mxc_restart, | |
39 | 30 | MACHINE_END |
arch/arm/mach-imx/imx27-dt.c
... | ... | @@ -22,8 +22,6 @@ |
22 | 22 | { |
23 | 23 | struct platform_device_info devinfo = { .name = "cpufreq-dt", }; |
24 | 24 | |
25 | - mxc_arch_reset_init_dt(); | |
26 | - | |
27 | 25 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
28 | 26 | |
29 | 27 | platform_device_register_full(&devinfo); |
... | ... | @@ -40,6 +38,5 @@ |
40 | 38 | .init_irq = mx27_init_irq, |
41 | 39 | .init_machine = imx27_dt_init, |
42 | 40 | .dt_compat = imx27_dt_board_compat, |
43 | - .restart = mxc_restart, | |
44 | 41 | MACHINE_END |
arch/arm/mach-imx/imx31-dt.c
... | ... | @@ -18,13 +18,6 @@ |
18 | 18 | #include "common.h" |
19 | 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 | 21 | static const char * const imx31_dt_board_compat[] __initconst = { |
29 | 22 | "fsl,imx31", |
30 | 23 | NULL |
31 | 24 | |
... | ... | @@ -40,8 +33,6 @@ |
40 | 33 | .init_early = imx31_init_early, |
41 | 34 | .init_irq = mx31_init_irq, |
42 | 35 | .init_time = imx31_dt_timer_init, |
43 | - .init_machine = imx31_dt_init, | |
44 | 36 | .dt_compat = imx31_dt_board_compat, |
45 | - .restart = mxc_restart, | |
46 | 37 | MACHINE_END |
arch/arm/mach-imx/imx35-dt.c
... | ... | @@ -20,14 +20,6 @@ |
20 | 20 | #include "common.h" |
21 | 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 | 23 | static void __init imx35_irq_init(void) |
32 | 24 | { |
33 | 25 | imx_init_l2cache(); |
34 | 26 | |
... | ... | @@ -43,8 +35,6 @@ |
43 | 35 | .map_io = mx35_map_io, |
44 | 36 | .init_early = imx35_init_early, |
45 | 37 | .init_irq = imx35_irq_init, |
46 | - .init_machine = imx35_dt_init, | |
47 | 38 | .dt_compat = imx35_dt_board_compat, |
48 | - .restart = mxc_restart, | |
49 | 39 | MACHINE_END |
arch/arm/mach-imx/mach-imx50.c
... | ... | @@ -16,13 +16,6 @@ |
16 | 16 | |
17 | 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 | 19 | static const char * const imx50_dt_board_compat[] __initconst = { |
27 | 20 | "fsl,imx50", |
28 | 21 | NULL |
29 | 22 | |
... | ... | @@ -30,8 +23,6 @@ |
30 | 23 | |
31 | 24 | DT_MACHINE_START(IMX50_DT, "Freescale i.MX50 (Device Tree Support)") |
32 | 25 | .init_irq = tzic_init_irq, |
33 | - .init_machine = imx50_dt_init, | |
34 | 26 | .dt_compat = imx50_dt_board_compat, |
35 | - .restart = mxc_restart, | |
36 | 27 | MACHINE_END |
arch/arm/mach-imx/mach-imx51.c
... | ... | @@ -53,7 +53,6 @@ |
53 | 53 | { |
54 | 54 | struct platform_device_info devinfo = { .name = "cpufreq-dt", }; |
55 | 55 | |
56 | - mxc_arch_reset_init_dt(); | |
57 | 56 | imx51_ipu_mipi_setup(); |
58 | 57 | imx_src_init(); |
59 | 58 | |
... | ... | @@ -78,6 +77,5 @@ |
78 | 77 | .init_machine = imx51_dt_init, |
79 | 78 | .init_late = imx51_init_late, |
80 | 79 | .dt_compat = imx51_dt_board_compat, |
81 | - .restart = mxc_restart, | |
82 | 80 | MACHINE_END |
arch/arm/mach-imx/mach-imx53.c
... | ... | @@ -30,7 +30,6 @@ |
30 | 30 | |
31 | 31 | static void __init imx53_dt_init(void) |
32 | 32 | { |
33 | - mxc_arch_reset_init_dt(); | |
34 | 33 | imx_src_init(); |
35 | 34 | |
36 | 35 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
... | ... | @@ -54,6 +53,5 @@ |
54 | 53 | .init_machine = imx53_dt_init, |
55 | 54 | .init_late = imx53_init_late, |
56 | 55 | .dt_compat = imx53_dt_board_compat, |
57 | - .restart = mxc_restart, | |
58 | 56 | MACHINE_END |
arch/arm/mach-imx/mach-imx6q.c
... | ... | @@ -268,8 +268,6 @@ |
268 | 268 | imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q", |
269 | 269 | imx_get_soc_revision()); |
270 | 270 | |
271 | - mxc_arch_reset_init_dt(); | |
272 | - | |
273 | 271 | parent = imx_soc_device_init(); |
274 | 272 | if (parent == NULL) |
275 | 273 | pr_warn("failed to initialize soc device\n"); |
... | ... | @@ -409,6 +407,5 @@ |
409 | 407 | .init_machine = imx6q_init_machine, |
410 | 408 | .init_late = imx6q_init_late, |
411 | 409 | .dt_compat = imx6q_dt_compat, |
412 | - .restart = mxc_restart, | |
413 | 410 | MACHINE_END |
arch/arm/mach-imx/mach-imx6sl.c
... | ... | @@ -48,8 +48,6 @@ |
48 | 48 | { |
49 | 49 | struct device *parent; |
50 | 50 | |
51 | - mxc_arch_reset_init_dt(); | |
52 | - | |
53 | 51 | parent = imx_soc_device_init(); |
54 | 52 | if (parent == NULL) |
55 | 53 | pr_warn("failed to initialize soc device\n"); |
... | ... | @@ -81,6 +79,5 @@ |
81 | 79 | .init_machine = imx6sl_init_machine, |
82 | 80 | .init_late = imx6sl_init_late, |
83 | 81 | .dt_compat = imx6sl_dt_compat, |
84 | - .restart = mxc_restart, | |
85 | 82 | MACHINE_END |
arch/arm/mach-imx/mach-imx6sx.c
... | ... | @@ -18,8 +18,6 @@ |
18 | 18 | { |
19 | 19 | struct device *parent; |
20 | 20 | |
21 | - mxc_arch_reset_init_dt(); | |
22 | - | |
23 | 21 | parent = imx_soc_device_init(); |
24 | 22 | if (parent == NULL) |
25 | 23 | pr_warn("failed to initialize soc device\n"); |
... | ... | @@ -58,6 +56,5 @@ |
58 | 56 | .init_machine = imx6sx_init_machine, |
59 | 57 | .dt_compat = imx6sx_dt_compat, |
60 | 58 | .init_late = imx6sx_init_late, |
61 | - .restart = mxc_restart, | |
62 | 59 | MACHINE_END |
arch/arm/mach-imx/mach-vf610.c
... | ... | @@ -12,14 +12,6 @@ |
12 | 12 | #include <asm/mach/arch.h> |
13 | 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 | 15 | static const char * const vf610_dt_compat[] __initconst = { |
24 | 16 | "fsl,vf610", |
25 | 17 | NULL, |
26 | 18 | |
... | ... | @@ -28,8 +20,6 @@ |
28 | 20 | DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF610 (Device Tree)") |
29 | 21 | .l2c_aux_val = 0, |
30 | 22 | .l2c_aux_mask = ~0, |
31 | - .init_machine = vf610_init_machine, | |
32 | 23 | .dt_compat = vf610_dt_compat, |
33 | - .restart = mxc_restart, | |
34 | 24 | MACHINE_END |
arch/arm/mach-imx/system.c
... | ... | @@ -89,21 +89,6 @@ |
89 | 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 | 92 | #ifdef CONFIG_CACHE_L2X0 |
108 | 93 | void __init imx_init_l2cache(void) |
109 | 94 | { |