aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnson Huang <b20788@freescale.com>2014-03-14 04:11:36 -0400
committerAnson Huang <b20788@freescale.com>2014-04-30 01:19:02 -0400
commita78761323fdb56af71226914bc722eb37f6c52ad (patch)
treefe5b6b09d63f5e19fa29f49a42d6d5423eeb0d9c
parentd50825b82b4d58a3b38ae280fc62e29222accb1a (diff)
ENGR00303665-2 ARM: imx: correct clock tree info on i.MX6SX
From reference manual, periph2_pre's parent list option 3 is pll4_audio_div, not pll2_198m. And periph2_clk2 's parent of option 1 should be osc, not pll2. Need to mask handshake of mmdc ch0. Signed-off-by: Anson Huang <b20788@freescale.com>
-rw-r--r--arch/arm/mach-imx/clk-imx6sx.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/clk-imx6sx.c b/arch/arm/mach-imx/clk-imx6sx.c
index ff43bb706280..0844e5ce2f32 100644
--- a/arch/arm/mach-imx/clk-imx6sx.c
+++ b/arch/arm/mach-imx/clk-imx6sx.c
@@ -25,12 +25,15 @@
25#include "hardware.h" 25#include "hardware.h"
26 26
27#define CCM_CCGR_OFFSET(index) (index * 2) 27#define CCM_CCGR_OFFSET(index) (index * 2)
28#define CCDR 0x4
29#define BM_CCM_CCDR_MMDC_CH0_MASK (0x2 << 16)
28 30
29static const char *step_sels[] = { "osc", "pll2_pfd2_396m", }; 31static const char *step_sels[] = { "osc", "pll2_pfd2_396m", };
30static const char *pll1_sw_sels[] = { "pll1_sys", "step", }; 32static const char *pll1_sw_sels[] = { "pll1_sys", "step", };
31static const char *periph_pre_sels[] = { "pll2_bus", "pll2_pfd2_396m", "pll2_pfd0_352m", "pll2_198m", }; 33static const char *periph_pre_sels[] = { "pll2_bus", "pll2_pfd2_396m", "pll2_pfd0_352m", "pll2_198m", };
34static const char *periph2_pre_sels[] = { "pll2_bus", "pll2_pfd2_396m", "pll2_pfd0_352m", "pll4_audio_div", };
32static const char *periph_clk2_sels[] = { "pll3_usb_otg", "osc", "osc", }; 35static const char *periph_clk2_sels[] = { "pll3_usb_otg", "osc", "osc", };
33static const char *periph2_clk2_sels[] = { "pll3_usb_otg", "pll2_bus", }; 36static const char *periph2_clk2_sels[] = { "pll3_usb_otg", "osc", };
34static const char *periph_sels[] = { "periph_pre", "periph_clk2", }; 37static const char *periph_sels[] = { "periph_pre", "periph_clk2", };
35static const char *periph2_sels[] = { "periph2_pre", "periph2_clk2", }; 38static const char *periph2_sels[] = { "periph2_pre", "periph2_clk2", };
36static const char *ocram_sels[] = { "periph", "pll2_pfd2_396m", "periph", "pll3_pfd1_540m", }; 39static const char *ocram_sels[] = { "periph", "pll2_pfd2_396m", "periph", "pll3_pfd1_540m", };
@@ -223,7 +226,7 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node)
223 clks[IMX6SX_CLK_PLL1_SW] = imx_clk_mux("pll1_sw", base + 0xc, 2, 1, pll1_sw_sels, ARRAY_SIZE(pll1_sw_sels)); 226 clks[IMX6SX_CLK_PLL1_SW] = imx_clk_mux("pll1_sw", base + 0xc, 2, 1, pll1_sw_sels, ARRAY_SIZE(pll1_sw_sels));
224 clks[IMX6SX_CLK_OCRAM_SEL] = imx_clk_mux("ocram_sel", base + 0x14, 6, 2, ocram_sels, ARRAY_SIZE(ocram_sels)); 227 clks[IMX6SX_CLK_OCRAM_SEL] = imx_clk_mux("ocram_sel", base + 0x14, 6, 2, ocram_sels, ARRAY_SIZE(ocram_sels));
225 clks[IMX6SX_CLK_PERIPH_PRE] = imx_clk_mux("periph_pre", base + 0x18, 18, 2, periph_pre_sels, ARRAY_SIZE(periph_pre_sels)); 228 clks[IMX6SX_CLK_PERIPH_PRE] = imx_clk_mux("periph_pre", base + 0x18, 18, 2, periph_pre_sels, ARRAY_SIZE(periph_pre_sels));
226 clks[IMX6SX_CLK_PERIPH2_PRE] = imx_clk_mux("periph2_pre", base + 0x18, 21, 2, periph_pre_sels, ARRAY_SIZE(periph_pre_sels)); 229 clks[IMX6SX_CLK_PERIPH2_PRE] = imx_clk_mux("periph2_pre", base + 0x18, 21, 2, periph2_pre_sels, ARRAY_SIZE(periph2_pre_sels));
227 clks[IMX6SX_CLK_PERIPH_CLK2_SEL] = imx_clk_mux("periph_clk2_sel", base + 0x18, 12, 2, periph_clk2_sels, ARRAY_SIZE(periph_clk2_sels)); 230 clks[IMX6SX_CLK_PERIPH_CLK2_SEL] = imx_clk_mux("periph_clk2_sel", base + 0x18, 12, 2, periph_clk2_sels, ARRAY_SIZE(periph_clk2_sels));
228 clks[IMX6SX_CLK_PERIPH2_CLK2_SEL] = imx_clk_mux("periph2_clk2_sel", base + 0x18, 20, 1, periph2_clk2_sels, ARRAY_SIZE(periph2_clk2_sels)); 231 clks[IMX6SX_CLK_PERIPH2_CLK2_SEL] = imx_clk_mux("periph2_clk2_sel", base + 0x18, 20, 1, periph2_clk2_sels, ARRAY_SIZE(periph2_clk2_sels));
229 clks[IMX6SX_CLK_PCIE_AXI_SEL] = imx_clk_mux("pcie_axi_sel", base + 0x18, 10, 1, pcie_axi_sels, ARRAY_SIZE(pcie_axi_sels)); 232 clks[IMX6SX_CLK_PCIE_AXI_SEL] = imx_clk_mux("pcie_axi_sel", base + 0x18, 10, 1, pcie_axi_sels, ARRAY_SIZE(pcie_axi_sels));
@@ -436,6 +439,9 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node)
436 clks[IMX6SX_CLK_CKO1] = imx_clk_gate("cko1", "cko1_podf", base + 0x60, 7); 439 clks[IMX6SX_CLK_CKO1] = imx_clk_gate("cko1", "cko1_podf", base + 0x60, 7);
437 clks[IMX6SX_CLK_CKO2] = imx_clk_gate("cko2", "cko2_podf", base + 0x60, 24); 440 clks[IMX6SX_CLK_CKO2] = imx_clk_gate("cko2", "cko2_podf", base + 0x60, 24);
438 441
442 /* mask handshake of mmdc */
443 writel_relaxed(BM_CCM_CCDR_MMDC_CH0_MASK, base + CCDR);
444
439 for (i = 0; i < ARRAY_SIZE(clks); i++) 445 for (i = 0; i < ARRAY_SIZE(clks); i++)
440 if (IS_ERR(clks[i])) 446 if (IS_ERR(clks[i]))
441 pr_err("i.MX6sx clk %d: register failed with %ld\n", i, PTR_ERR(clks[i])); 447 pr_err("i.MX6sx clk %d: register failed with %ld\n", i, PTR_ERR(clks[i]));