diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2014-05-13 12:04:21 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@freescale.com> | 2014-05-16 03:39:02 -0400 |
commit | 402e4a4c532e0f6fe39dcc120285ed4b7d75aa43 (patch) | |
tree | 4d70dfa2bc7fbe4fa92a7b9a2595be398f297663 /arch/arm/mach-imx | |
parent | d9654dceb315ccdabf4a5494109a4cc0fb2408a4 (diff) |
ARM: i.MX1 clk: Add missing clocks
This patch adds missing clocks for mpll_gate, spll_gate, uart3_gate,
ssi2_gate and brom_gate. As an additional this fixes incorrect bit
position for dma_gate clock.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/clk-imx1.c | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/arch/arm/mach-imx/clk-imx1.c b/arch/arm/mach-imx/clk-imx1.c index 15f9d223cf0b..602b30a53bf9 100644 --- a/arch/arm/mach-imx/clk-imx1.c +++ b/arch/arm/mach-imx/clk-imx1.c | |||
@@ -40,12 +40,14 @@ | |||
40 | #define SCM_GCCR IO_ADDR_SCM(0xc) | 40 | #define SCM_GCCR IO_ADDR_SCM(0xc) |
41 | 41 | ||
42 | static const char *prem_sel_clks[] = { "clk32_premult", "clk16m", }; | 42 | static const char *prem_sel_clks[] = { "clk32_premult", "clk16m", }; |
43 | static const char *clko_sel_clks[] = { "per1", "hclk", "clk48m", "clk16m", "prem", | 43 | static const char *clko_sel_clks[] = { "per1", "hclk", "clk48m", "clk16m", |
44 | "fclk", }; | 44 | "prem", "fclk", }; |
45 | |||
45 | enum imx1_clks { | 46 | enum imx1_clks { |
46 | dummy, clk32, clk16m_ext, clk16m, clk32_premult, prem, mpll, spll, mcu, | 47 | dummy, clk32, clk16m_ext, clk16m, clk32_premult, prem, mpll, mpll_gate, |
47 | fclk, hclk, clk48m, per1, per2, per3, clko, dma_gate, csi_gate, | 48 | spll, spll_gate, mcu, fclk, hclk, clk48m, per1, per2, per3, clko, |
48 | mma_gate, usbd_gate, clk_max | 49 | uart3_gate, ssi2_gate, brom_gate, dma_gate, csi_gate, mma_gate, |
50 | usbd_gate, clk_max | ||
49 | }; | 51 | }; |
50 | 52 | ||
51 | static struct clk *clk[clk_max]; | 53 | static struct clk *clk[clk_max]; |
@@ -62,17 +64,22 @@ int __init mx1_clocks_init(unsigned long fref) | |||
62 | clk[prem] = imx_clk_mux("prem", CCM_CSCR, 16, 1, prem_sel_clks, | 64 | clk[prem] = imx_clk_mux("prem", CCM_CSCR, 16, 1, prem_sel_clks, |
63 | ARRAY_SIZE(prem_sel_clks)); | 65 | ARRAY_SIZE(prem_sel_clks)); |
64 | clk[mpll] = imx_clk_pllv1("mpll", "clk32_premult", CCM_MPCTL0); | 66 | clk[mpll] = imx_clk_pllv1("mpll", "clk32_premult", CCM_MPCTL0); |
67 | clk[mpll_gate] = imx_clk_gate("mpll_gate", "mpll", CCM_CSCR, 0); | ||
65 | clk[spll] = imx_clk_pllv1("spll", "prem", CCM_SPCTL0); | 68 | clk[spll] = imx_clk_pllv1("spll", "prem", CCM_SPCTL0); |
69 | clk[spll_gate] = imx_clk_gate("spll_gate", "spll", CCM_CSCR, 1); | ||
66 | clk[mcu] = imx_clk_divider("mcu", "clk32_premult", CCM_CSCR, 15, 1); | 70 | clk[mcu] = imx_clk_divider("mcu", "clk32_premult", CCM_CSCR, 15, 1); |
67 | clk[fclk] = imx_clk_divider("fclk", "mpll", CCM_CSCR, 15, 1); | 71 | clk[fclk] = imx_clk_divider("fclk", "mpll_gate", CCM_CSCR, 15, 1); |
68 | clk[hclk] = imx_clk_divider("hclk", "spll", CCM_CSCR, 10, 4); | 72 | clk[hclk] = imx_clk_divider("hclk", "spll_gate", CCM_CSCR, 10, 4); |
69 | clk[clk48m] = imx_clk_divider("clk48m", "spll", CCM_CSCR, 26, 3); | 73 | clk[clk48m] = imx_clk_divider("clk48m", "spll_gate", CCM_CSCR, 26, 3); |
70 | clk[per1] = imx_clk_divider("per1", "spll", CCM_PCDR, 0, 4); | 74 | clk[per1] = imx_clk_divider("per1", "spll_gate", CCM_PCDR, 0, 4); |
71 | clk[per2] = imx_clk_divider("per2", "spll", CCM_PCDR, 4, 4); | 75 | clk[per2] = imx_clk_divider("per2", "spll_gate", CCM_PCDR, 4, 4); |
72 | clk[per3] = imx_clk_divider("per3", "spll", CCM_PCDR, 16, 7); | 76 | clk[per3] = imx_clk_divider("per3", "spll_gate", CCM_PCDR, 16, 7); |
73 | clk[clko] = imx_clk_mux("clko", CCM_CSCR, 29, 3, clko_sel_clks, | 77 | clk[clko] = imx_clk_mux("clko", CCM_CSCR, 29, 3, clko_sel_clks, |
74 | ARRAY_SIZE(clko_sel_clks)); | 78 | ARRAY_SIZE(clko_sel_clks)); |
75 | clk[dma_gate] = imx_clk_gate("dma_gate", "hclk", SCM_GCCR, 4); | 79 | clk[uart3_gate] = imx_clk_gate("uart3_gate", "hclk", SCM_GCCR, 6); |
80 | clk[ssi2_gate] = imx_clk_gate("ssi2_gate", "hclk", SCM_GCCR, 5); | ||
81 | clk[brom_gate] = imx_clk_gate("brom_gate", "hclk", SCM_GCCR, 4); | ||
82 | clk[dma_gate] = imx_clk_gate("dma_gate", "hclk", SCM_GCCR, 3); | ||
76 | clk[csi_gate] = imx_clk_gate("csi_gate", "hclk", SCM_GCCR, 2); | 83 | clk[csi_gate] = imx_clk_gate("csi_gate", "hclk", SCM_GCCR, 2); |
77 | clk[mma_gate] = imx_clk_gate("mma_gate", "hclk", SCM_GCCR, 1); | 84 | clk[mma_gate] = imx_clk_gate("mma_gate", "hclk", SCM_GCCR, 1); |
78 | clk[usbd_gate] = imx_clk_gate("usbd_gate", "clk48m", SCM_GCCR, 0); | 85 | clk[usbd_gate] = imx_clk_gate("usbd_gate", "clk48m", SCM_GCCR, 0); |
@@ -94,7 +101,7 @@ int __init mx1_clocks_init(unsigned long fref) | |||
94 | clk_register_clkdev(clk[per1], "per", "imx1-uart.1"); | 101 | clk_register_clkdev(clk[per1], "per", "imx1-uart.1"); |
95 | clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.1"); | 102 | clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.1"); |
96 | clk_register_clkdev(clk[per1], "per", "imx1-uart.2"); | 103 | clk_register_clkdev(clk[per1], "per", "imx1-uart.2"); |
97 | clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.2"); | 104 | clk_register_clkdev(clk[uart3_gate], "ipg", "imx1-uart.2"); |
98 | clk_register_clkdev(clk[hclk], NULL, "imx1-i2c.0"); | 105 | clk_register_clkdev(clk[hclk], NULL, "imx1-i2c.0"); |
99 | clk_register_clkdev(clk[per2], "per", "imx1-cspi.0"); | 106 | clk_register_clkdev(clk[per2], "per", "imx1-cspi.0"); |
100 | clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.0"); | 107 | clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.0"); |