diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2016-06-18 21:09:31 -0400 |
---|---|---|
committer | Shawn Guo <shawnguo@kernel.org> | 2016-06-21 08:40:47 -0400 |
commit | 510aca642040cfb05e392218f6540ea35af51916 (patch) | |
tree | bf4b1a9670ba0437c83e0703b5a93fe9140f4367 | |
parent | 1d9e94779956b765d316924cc39af2165ad631fb (diff) |
ARM: i.MX: Do not explicitly call l2x0_of_init()
There's no need to explicitly call l2x0_of_init() since it will be
called as a part of init_IRQ() (see arch/arm/kernel/irq.c for
details). This way we can simplify imx_init_l2cache() and ditch the call
to it on i.MX35 (which does not claim compatibility with
"arm,pl310-cache") alltogether.
Acked-by: Arnd Bergmann <arnd@arndb.de>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
-rw-r--r-- | arch/arm/mach-imx/imx35-dt.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx6q.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx6sl.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx6sx.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/system.c | 12 |
5 files changed, 13 insertions, 15 deletions
diff --git a/arch/arm/mach-imx/imx35-dt.c b/arch/arm/mach-imx/imx35-dt.c index e9396037235d..99bb63dedb87 100644 --- a/arch/arm/mach-imx/imx35-dt.c +++ b/arch/arm/mach-imx/imx35-dt.c | |||
@@ -20,20 +20,16 @@ | |||
20 | #include "common.h" | 20 | #include "common.h" |
21 | #include "mx35.h" | 21 | #include "mx35.h" |
22 | 22 | ||
23 | static void __init imx35_irq_init(void) | ||
24 | { | ||
25 | imx_init_l2cache(); | ||
26 | mx35_init_irq(); | ||
27 | } | ||
28 | |||
29 | static const char * const imx35_dt_board_compat[] __initconst = { | 23 | static const char * const imx35_dt_board_compat[] __initconst = { |
30 | "fsl,imx35", | 24 | "fsl,imx35", |
31 | NULL | 25 | NULL |
32 | }; | 26 | }; |
33 | 27 | ||
34 | DT_MACHINE_START(IMX35_DT, "Freescale i.MX35 (Device Tree Support)") | 28 | DT_MACHINE_START(IMX35_DT, "Freescale i.MX35 (Device Tree Support)") |
29 | .l2c_aux_val = 0, | ||
30 | .l2c_aux_mask = ~0, | ||
35 | .map_io = mx35_map_io, | 31 | .map_io = mx35_map_io, |
36 | .init_early = imx35_init_early, | 32 | .init_early = imx35_init_early, |
37 | .init_irq = imx35_irq_init, | 33 | .init_irq = mx35_init_irq, |
38 | .dt_compat = imx35_dt_board_compat, | 34 | .dt_compat = imx35_dt_board_compat, |
39 | MACHINE_END | 35 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index cb27d566d5ab..b31890f1e4a4 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -407,6 +407,8 @@ static const char * const imx6q_dt_compat[] __initconst = { | |||
407 | }; | 407 | }; |
408 | 408 | ||
409 | DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad/DualLite (Device Tree)") | 409 | DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad/DualLite (Device Tree)") |
410 | .l2c_aux_val = 0, | ||
411 | .l2c_aux_mask = ~0, | ||
410 | .smp = smp_ops(imx_smp_ops), | 412 | .smp = smp_ops(imx_smp_ops), |
411 | .map_io = imx6q_map_io, | 413 | .map_io = imx6q_map_io, |
412 | .init_irq = imx6q_init_irq, | 414 | .init_irq = imx6q_init_irq, |
diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c index 300326373166..f9a9a362a88a 100644 --- a/arch/arm/mach-imx/mach-imx6sl.c +++ b/arch/arm/mach-imx/mach-imx6sl.c | |||
@@ -75,6 +75,8 @@ static const char * const imx6sl_dt_compat[] __initconst = { | |||
75 | }; | 75 | }; |
76 | 76 | ||
77 | DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)") | 77 | DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)") |
78 | .l2c_aux_val = 0, | ||
79 | .l2c_aux_mask = ~0, | ||
78 | .init_irq = imx6sl_init_irq, | 80 | .init_irq = imx6sl_init_irq, |
79 | .init_machine = imx6sl_init_machine, | 81 | .init_machine = imx6sl_init_machine, |
80 | .init_late = imx6sl_init_late, | 82 | .init_late = imx6sl_init_late, |
diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c index 6a0b0614de29..07a3a340f151 100644 --- a/arch/arm/mach-imx/mach-imx6sx.c +++ b/arch/arm/mach-imx/mach-imx6sx.c | |||
@@ -103,6 +103,8 @@ static const char * const imx6sx_dt_compat[] __initconst = { | |||
103 | }; | 103 | }; |
104 | 104 | ||
105 | DT_MACHINE_START(IMX6SX, "Freescale i.MX6 SoloX (Device Tree)") | 105 | DT_MACHINE_START(IMX6SX, "Freescale i.MX6 SoloX (Device Tree)") |
106 | .l2c_aux_val = 0, | ||
107 | .l2c_aux_mask = ~0, | ||
106 | .init_irq = imx6sx_init_irq, | 108 | .init_irq = imx6sx_init_irq, |
107 | .init_machine = imx6sx_init_machine, | 109 | .init_machine = imx6sx_init_machine, |
108 | .dt_compat = imx6sx_dt_compat, | 110 | .dt_compat = imx6sx_dt_compat, |
diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c index bf7ab779d5bf..e442ed7f7ff5 100644 --- a/arch/arm/mach-imx/system.c +++ b/arch/arm/mach-imx/system.c | |||
@@ -98,13 +98,11 @@ void __init imx_init_l2cache(void) | |||
98 | 98 | ||
99 | np = of_find_compatible_node(NULL, NULL, "arm,pl310-cache"); | 99 | np = of_find_compatible_node(NULL, NULL, "arm,pl310-cache"); |
100 | if (!np) | 100 | if (!np) |
101 | goto out; | 101 | return; |
102 | 102 | ||
103 | l2x0_base = of_iomap(np, 0); | 103 | l2x0_base = of_iomap(np, 0); |
104 | if (!l2x0_base) { | 104 | if (!l2x0_base) |
105 | of_node_put(np); | 105 | goto put_node; |
106 | goto out; | ||
107 | } | ||
108 | 106 | ||
109 | if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { | 107 | if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { |
110 | /* Configure the L2 PREFETCH and POWER registers */ | 108 | /* Configure the L2 PREFETCH and POWER registers */ |
@@ -121,9 +119,7 @@ void __init imx_init_l2cache(void) | |||
121 | } | 119 | } |
122 | 120 | ||
123 | iounmap(l2x0_base); | 121 | iounmap(l2x0_base); |
122 | put_node: | ||
124 | of_node_put(np); | 123 | of_node_put(np); |
125 | |||
126 | out: | ||
127 | l2x0_of_init(0, ~0); | ||
128 | } | 124 | } |
129 | #endif | 125 | #endif |