diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2013-07-08 15:45:20 +0200 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-08-16 07:11:22 +0200 |
commit | e6a07569611daf4190c0fd2c2bb1e2189c0cb479 (patch) | |
tree | 26f52525e498ae233ca0a55a781541ab7aa8d539 /arch/arm/mach-imx/mach-imx6q.c | |
parent | ARM: imx_v4_v5_defconfig: Select CONFIG_MACH_IMX25_DT (diff) | |
download | linux-e6a07569611daf4190c0fd2c2bb1e2189c0cb479.tar.xz linux-e6a07569611daf4190c0fd2c2bb1e2189c0cb479.zip |
ARM: imx: let L2 initialization be a common function
Move imx6q L2 initialization function imx6q_init_l2cache() into
system.c, and rename it imx_init_l2cache(), so that other platforms
other than imx6q can also use the function.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
Diffstat (limited to 'arch/arm/mach-imx/mach-imx6q.c')
-rw-r--r-- | arch/arm/mach-imx/mach-imx6q.c | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 59218418fde3..9f06cc8789c6 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -32,7 +32,6 @@ #include <linux/micrel_phy.h> #include <linux/mfd/syscon.h> #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h> -#include <asm/hardware/cache-l2x0.h> #include <asm/mach/arch.h> #include <asm/mach/map.h> #include <asm/system_misc.h> @@ -352,44 +351,10 @@ static void __init imx6q_map_io(void) imx_scu_map_io(); } -#ifdef CONFIG_CACHE_L2X0 -static void __init imx6q_init_l2cache(void) -{ - void __iomem *l2x0_base; - struct device_node *np; - unsigned int val; - - np = of_find_compatible_node(NULL, NULL, "arm,pl310-cache"); - if (!np) - goto out; - - l2x0_base = of_iomap(np, 0); - if (!l2x0_base) { - of_node_put(np); - goto out; - } - - /* Configure the L2 PREFETCH and POWER registers */ - val = readl_relaxed(l2x0_base + L2X0_PREFETCH_CTRL); - val |= 0x70800000; - writel_relaxed(val, l2x0_base + L2X0_PREFETCH_CTRL); - val = L2X0_DYNAMIC_CLK_GATING_EN | L2X0_STNDBY_MODE_EN; - writel_relaxed(val, l2x0_base + L2X0_POWER_CTRL); - - iounmap(l2x0_base); - of_node_put(np); - -out: - l2x0_of_init(0, ~0UL); -} -#else -static inline void imx6q_init_l2cache(void) {} -#endif - static void __init imx6q_init_irq(void) { imx6q_init_revision(); - imx6q_init_l2cache(); + imx_init_l2cache(); imx_src_init(); imx_gpc_init(); irqchip_init(); |