aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/system.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@linaro.org>2013-08-23 14:38:51 -0400
committerKevin Hilman <khilman@linaro.org>2013-08-23 14:38:51 -0400
commit579673ee1ad62604910c6b8f431aa2a0951589b6 (patch)
tree28af06d0be0d65e8d9306ea836115d43bb1ce07b /arch/arm/mach-imx/system.c
parent8bd6f53af54b7dbf13625479ae673e73f61ff46a (diff)
parentdc76a1adfa12ad11957bdeec565dbccf37205d04 (diff)
Merge tag 'imx-soc-3.12' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/soc
From Shawn Guo: It contains a bunch of imx soc updates for 3.12. - Add more ethernet phy fixups for imx6 boards - Add some missing imx6q clocks into clock driver - Add new clock types fixup mux and div to work around some ugly hardware defect - Consolidate L2 cache initialization function, so that it can be used on more i.MX SoCs - Replace magic numbers in mach-imx6q.c with well defined macros - Small fixes for imx6q and pllv3 clock drivers - Some random updates on imx defconfig files * tag 'imx-soc-3.12' of git://git.linaro.org/people/shawnguo/linux-2.6: (33 commits) phy: micrel: Add definitions for common Micrel PHY registers ARM: imx: Re-select CONFIG_SND_SOC_IMX_MC13783 option ARM: imx: Move anatop related from board file to anatop driver ARM: imx_v6_v7_defconfig: Enable wireless support ARM: imx_v4_v5_defconfig: Cleanup imx_v4_v5_defconfig ARM: imx_v6_v7_defconfig: Add SATA support ARM: imx_v6_v7_defconfig: Cleanup imx_v6_v7_defconfig ARM: mx53: Allow suspend/resume ARM: mach-imx: Select ARM_CPU_SUSPEND at ARCH_MXC level ARM: imx_v6_v7_defconfig: Select CONFIG_TOUCHSCREEN_EGALAX ARM: imx6q: add vdoa gate clock ARM: imx6q: add the missing cko output selection ARM: imx6q: add cko2 clocks ARM: imx6q: add spdif gate clock ARM: imx: clk-pllv3: improve the timeout waiting method ARM: imx6: change some clocks to fixup clocks ARM: imx: add common clock support for fixup mux ARM: imx: add common clock support for fixup div ARM: imx: Select MIGHT_HAVE_CACHE_L2X0 ARM: imx: fix imx_init_l2cache storage class ...
Diffstat (limited to 'arch/arm/mach-imx/system.c')
-rw-r--r--arch/arm/mach-imx/system.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c
index 6fe81bb4d3c9..64ff37ea72b1 100644
--- a/arch/arm/mach-imx/system.c
+++ b/arch/arm/mach-imx/system.c
@@ -27,6 +27,7 @@
27#include <asm/system_misc.h> 27#include <asm/system_misc.h>
28#include <asm/proc-fns.h> 28#include <asm/proc-fns.h>
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30#include <asm/hardware/cache-l2x0.h>
30 31
31#include "common.h" 32#include "common.h"
32#include "hardware.h" 33#include "hardware.h"
@@ -95,3 +96,35 @@ void __init mxc_arch_reset_init_dt(void)
95 96
96 clk_prepare(wdog_clk); 97 clk_prepare(wdog_clk);
97} 98}
99
100#ifdef CONFIG_CACHE_L2X0
101void __init imx_init_l2cache(void)
102{
103 void __iomem *l2x0_base;
104 struct device_node *np;
105 unsigned int val;
106
107 np = of_find_compatible_node(NULL, NULL, "arm,pl310-cache");
108 if (!np)
109 goto out;
110
111 l2x0_base = of_iomap(np, 0);
112 if (!l2x0_base) {
113 of_node_put(np);
114 goto out;
115 }
116
117 /* Configure the L2 PREFETCH and POWER registers */
118 val = readl_relaxed(l2x0_base + L2X0_PREFETCH_CTRL);
119 val |= 0x70800000;
120 writel_relaxed(val, l2x0_base + L2X0_PREFETCH_CTRL);
121 val = L2X0_DYNAMIC_CLK_GATING_EN | L2X0_STNDBY_MODE_EN;
122 writel_relaxed(val, l2x0_base + L2X0_POWER_CTRL);
123
124 iounmap(l2x0_base);
125 of_node_put(np);
126
127out:
128 l2x0_of_init(0, ~0UL);
129}
130#endif