summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/clk-imx6sx.c
diff options
context:
space:
mode:
authorAnson Huang <b20788@freescale.com>2014-09-01 16:19:17 +0800
committerNitin Garg <nitin.garg@freescale.com>2015-04-14 13:59:35 -0500
commitec846b4aa456d01b75d05b1889f978750306a585 (patch)
tree9f02d136bfe5226712788e1fe0e879aa85796e07 /arch/arm/mach-imx/clk-imx6sx.c
parentfd376a56fd459dd928c091913d42c220ae0a9945 (diff)
ENGR00329475-5 ARM: imx: make sure OCOTP clk is enabled in MSL
As some modules need to access ocotp in MSL, so we need to make sure it is enabled during MSL, after kernel boot up, clk dirver will disable it in late init. Signed-off-by: Anson Huang <b20788@freescale.com>
Diffstat (limited to 'arch/arm/mach-imx/clk-imx6sx.c')
-rw-r--r--arch/arm/mach-imx/clk-imx6sx.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/clk-imx6sx.c b/arch/arm/mach-imx/clk-imx6sx.c
index 6711736043ff..0223c5f57703 100644
--- a/arch/arm/mach-imx/clk-imx6sx.c
+++ b/arch/arm/mach-imx/clk-imx6sx.c
@@ -459,6 +459,15 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node)
clk_data.clk_num = ARRAY_SIZE(clks);
of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
+ /*
+ * As some of the modules need to access ocotp in MSL,
+ * need to make sure ocotp clk(CCM_CCGR2_CG6) is enabled
+ * during MSL, as on i.MX6SX, accessing OCOTP registers
+ * needs its clk on, it will be disabled by clk late
+ * init and managed by ocotp driver.
+ */
+ writel_relaxed(readl_relaxed(base + 0x70) | 1 << 12, base + 0x70);
+
clk_register_clkdev(clks[IMX6SX_CLK_GPT_BUS], "ipg", "imx-gpt.0");
clk_register_clkdev(clks[IMX6SX_CLK_GPT_SERIAL], "per", "imx-gpt.0");