]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARM: i.MX: Do not explicitly call l2x0_of_init()
authorAndrey Smirnov <andrew.smirnov@gmail.com>
Sun, 19 Jun 2016 01:09:31 +0000 (18:09 -0700)
committerShawn Guo <shawnguo@kernel.org>
Tue, 21 Jun 2016 12:40:47 +0000 (20:40 +0800)
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>
arch/arm/mach-imx/imx35-dt.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/system.c

index e9396037235dace2db93079ebd5ea0f61c1cfd76..99bb63dedb874f1fb5fecb77b7a6c69e12710e4b 100644 (file)
 #include "common.h"
 #include "mx35.h"
 
-static void __init imx35_irq_init(void)
-{
-       imx_init_l2cache();
-       mx35_init_irq();
-}
-
 static const char * const imx35_dt_board_compat[] __initconst = {
        "fsl,imx35",
        NULL
 };
 
 DT_MACHINE_START(IMX35_DT, "Freescale i.MX35 (Device Tree Support)")
+       .l2c_aux_val    = 0,
+       .l2c_aux_mask   = ~0,
        .map_io         = mx35_map_io,
        .init_early     = imx35_init_early,
-       .init_irq       = imx35_irq_init,
+       .init_irq       = mx35_init_irq,
        .dt_compat      = imx35_dt_board_compat,
 MACHINE_END
index cb27d566d5abab3865fd6e0689832c933b6a8993..b31890f1e4a43b55f549f22a818a53fdce3388cd 100644 (file)
@@ -407,6 +407,8 @@ static const char * const imx6q_dt_compat[] __initconst = {
 };
 
 DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad/DualLite (Device Tree)")
+       .l2c_aux_val    = 0,
+       .l2c_aux_mask   = ~0,
        .smp            = smp_ops(imx_smp_ops),
        .map_io         = imx6q_map_io,
        .init_irq       = imx6q_init_irq,
index 300326373166bc85c84470b6939ba0180fef1358..f9a9a362a88afb89423804db64fd002f3a9401ce 100644 (file)
@@ -75,6 +75,8 @@ static const char * const imx6sl_dt_compat[] __initconst = {
 };
 
 DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)")
+       .l2c_aux_val    = 0,
+       .l2c_aux_mask   = ~0,
        .init_irq       = imx6sl_init_irq,
        .init_machine   = imx6sl_init_machine,
        .init_late      = imx6sl_init_late,
index 6a0b0614de293b197742c613587d3fd0593ccae1..07a3a340f151a2d57fe3b17273b18b17f166ddd1 100644 (file)
@@ -103,6 +103,8 @@ static const char * const imx6sx_dt_compat[] __initconst = {
 };
 
 DT_MACHINE_START(IMX6SX, "Freescale i.MX6 SoloX (Device Tree)")
+       .l2c_aux_val    = 0,
+       .l2c_aux_mask   = ~0,
        .init_irq       = imx6sx_init_irq,
        .init_machine   = imx6sx_init_machine,
        .dt_compat      = imx6sx_dt_compat,
index bf7ab779d5bfa460f30160b829a30bf0ea6eac9a..e442ed7f7ff50fc8fb7db22942c12892fe0a619c 100644 (file)
@@ -98,13 +98,11 @@ void __init imx_init_l2cache(void)
 
        np = of_find_compatible_node(NULL, NULL, "arm,pl310-cache");
        if (!np)
-               goto out;
+               return;
 
        l2x0_base = of_iomap(np, 0);
-       if (!l2x0_base) {
-               of_node_put(np);
-               goto out;
-       }
+       if (!l2x0_base)
+               goto put_node;
 
        if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) {
                /* Configure the L2 PREFETCH and POWER registers */
@@ -121,9 +119,7 @@ void __init imx_init_l2cache(void)
        }
 
        iounmap(l2x0_base);
+put_node:
        of_node_put(np);
-
-out:
-       l2x0_of_init(0, ~0);
 }
 #endif