diff options
author | Bai Ping <b51503@freescale.com> | 2015-01-29 19:09:39 +0800 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2015-02-02 14:18:48 +0800 |
commit | 85eded68d0dfc7de2e43f0eda733bff30bdeb6cf (patch) | |
tree | ecd1b30197302c3a6fab91761bfb94c648ef3b70 | |
parent | 27d58f08dde556957afcbe3da0abe2bb81084b2b (diff) |
MLK-10175 arm: imx6: Skip gating QSPI2 clk when M4 is enabled
When the M4 core is enabled on i.MX6, the QSPI2 clk can't be gated,
otherwise, the M4 will hang. This patch add a check to make sure when
M4 is enabled, just skip the QSPI2 clk gating operations.
Signed-off-by: Bai Ping <b51503@freescale.com>
(cherry picked from commit e2f17323916eae636e63353d742c986227b72702)
(cherry picked from commit 60def702db2c083cc6c0486100a829d71dc74845)
-rw-r--r-- | arch/arm/mach-imx/clk-imx6sx.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/mach-imx/clk-imx6sx.c b/arch/arm/mach-imx/clk-imx6sx.c index d9fed28fe89a..89b7f462c0b3 100644 --- a/arch/arm/mach-imx/clk-imx6sx.c +++ b/arch/arm/mach-imx/clk-imx6sx.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014 Freescale Semiconductor, Inc. + * Copyright (C) 2014-2015 Freescale Semiconductor, Inc. * * The code contained herein is licensed under the GNU General Public * License. You may obtain a copy of the GNU General Public License @@ -551,9 +551,10 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node) * different gate, need explicitely gate the QSPI2 & GPMI_IO * during the clock init phase according to the SOC design. */ - writel_relaxed(readl_relaxed(base + 0x78) & ~(3 << CCM_CCGR_OFFSET(5)), base + 0x78); - writel_relaxed(readl_relaxed(base + 0x78) & ~(3 << CCM_CCGR_OFFSET(14)), base + 0x78); - + if (!imx_src_is_m4_enabled()) { + writel_relaxed(readl_relaxed(base + 0x78) & ~(3 << CCM_CCGR_OFFSET(5)), base + 0x78); + writel_relaxed(readl_relaxed(base + 0x78) & ~(3 << CCM_CCGR_OFFSET(14)), base + 0x78); + } clk_data.clks = clks; clk_data.clk_num = ARRAY_SIZE(clks); of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); |