diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2013-07-18 01:16:40 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-08-22 11:20:38 -0400 |
commit | 6526bb3cc537c1ec4d686ec182406ac01abbe0f6 (patch) | |
tree | 1a1492745298486fb2082ecddb3ed6d9ba211fe6 /arch/arm/mach-imx | |
parent | 1fa5007b3a71ebf8e9ebc9fd039da5339bd8c3f8 (diff) |
ARM: imx6q: add cko2 clocks
It adds the missing cko2 clocks, including multiplexer, divider and
gate.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/clk-imx6q.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index d739df196a15..924ed84cb3d4 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c | |||
@@ -206,6 +206,16 @@ static const char *vpu_axi_sels[] = { "axi", "pll2_pfd2_396m", "pll2_pfd0_352m", | |||
206 | static const char *cko1_sels[] = { "pll3_usb_otg", "pll2_bus", "pll1_sys", "pll5_video_div", | 206 | static const char *cko1_sels[] = { "pll3_usb_otg", "pll2_bus", "pll1_sys", "pll5_video_div", |
207 | "dummy", "axi", "enfc", "ipu1_di0", "ipu1_di1", "ipu2_di0", | 207 | "dummy", "axi", "enfc", "ipu1_di0", "ipu1_di1", "ipu2_di0", |
208 | "ipu2_di1", "ahb", "ipg", "ipg_per", "ckil", "pll4_post_div", }; | 208 | "ipu2_di1", "ahb", "ipg", "ipg_per", "ckil", "pll4_post_div", }; |
209 | static const char *cko2_sels[] = { | ||
210 | "mmdc_ch0_axi", "mmdc_ch1_axi", "usdhc4", "usdhc1", | ||
211 | "gpu2d_axi", "dummy", "ecspi_root", "gpu3d_axi", | ||
212 | "usdhc3", "dummy", "arm", "ipu1", | ||
213 | "ipu2", "vdo_axi", "osc", "gpu2d_core", | ||
214 | "gpu3d_core", "usdhc2", "ssi1", "ssi2", | ||
215 | "ssi3", "gpu3d_shader", "vpu_axi", "can_root", | ||
216 | "ldb_di0", "ldb_di1", "esai", "eim_slow", | ||
217 | "uart_serial", "spdif", "asrc", "hsi_tx", | ||
218 | }; | ||
209 | 219 | ||
210 | enum mx6q_clks { | 220 | enum mx6q_clks { |
211 | dummy, ckil, ckih, osc, pll2_pfd0_352m, pll2_pfd1_594m, pll2_pfd2_396m, | 221 | dummy, ckil, ckih, osc, pll2_pfd0_352m, pll2_pfd1_594m, pll2_pfd2_396m, |
@@ -240,7 +250,7 @@ enum mx6q_clks { | |||
240 | ssi2_ipg, ssi3_ipg, rom, usbphy1, usbphy2, ldb_di0_div_3_5, ldb_di1_div_3_5, | 250 | ssi2_ipg, ssi3_ipg, rom, usbphy1, usbphy2, ldb_di0_div_3_5, ldb_di1_div_3_5, |
241 | sata_ref, sata_ref_100m, pcie_ref, pcie_ref_125m, enet_ref, usbphy1_gate, | 251 | sata_ref, sata_ref_100m, pcie_ref, pcie_ref_125m, enet_ref, usbphy1_gate, |
242 | usbphy2_gate, pll4_post_div, pll5_post_div, pll5_video_div, eim_slow, | 252 | usbphy2_gate, pll4_post_div, pll5_post_div, pll5_video_div, eim_slow, |
243 | spdif, clk_max | 253 | spdif, cko2_sel, cko2_podf, cko2, clk_max |
244 | }; | 254 | }; |
245 | 255 | ||
246 | static struct clk *clk[clk_max]; | 256 | static struct clk *clk[clk_max]; |
@@ -398,6 +408,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
398 | clk[vdo_axi_sel] = imx_clk_mux("vdo_axi_sel", base + 0x18, 11, 1, vdo_axi_sels, ARRAY_SIZE(vdo_axi_sels)); | 408 | clk[vdo_axi_sel] = imx_clk_mux("vdo_axi_sel", base + 0x18, 11, 1, vdo_axi_sels, ARRAY_SIZE(vdo_axi_sels)); |
399 | clk[vpu_axi_sel] = imx_clk_mux("vpu_axi_sel", base + 0x18, 14, 2, vpu_axi_sels, ARRAY_SIZE(vpu_axi_sels)); | 409 | clk[vpu_axi_sel] = imx_clk_mux("vpu_axi_sel", base + 0x18, 14, 2, vpu_axi_sels, ARRAY_SIZE(vpu_axi_sels)); |
400 | clk[cko1_sel] = imx_clk_mux("cko1_sel", base + 0x60, 0, 4, cko1_sels, ARRAY_SIZE(cko1_sels)); | 410 | clk[cko1_sel] = imx_clk_mux("cko1_sel", base + 0x60, 0, 4, cko1_sels, ARRAY_SIZE(cko1_sels)); |
411 | clk[cko2_sel] = imx_clk_mux("cko2_sel", base + 0x60, 16, 5, cko2_sels, ARRAY_SIZE(cko2_sels)); | ||
401 | 412 | ||
402 | /* name reg shift width busy: reg, shift parent_names num_parents */ | 413 | /* name reg shift width busy: reg, shift parent_names num_parents */ |
403 | clk[periph] = imx_clk_busy_mux("periph", base + 0x14, 25, 1, base + 0x48, 5, periph_sels, ARRAY_SIZE(periph_sels)); | 414 | clk[periph] = imx_clk_busy_mux("periph", base + 0x14, 25, 1, base + 0x48, 5, periph_sels, ARRAY_SIZE(periph_sels)); |
@@ -447,6 +458,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
447 | clk[emi_slow_podf] = imx_clk_fixup_divider("emi_slow_podf", "emi_slow_sel", base + 0x1c, 23, 3, imx_cscmr1_fixup); | 458 | clk[emi_slow_podf] = imx_clk_fixup_divider("emi_slow_podf", "emi_slow_sel", base + 0x1c, 23, 3, imx_cscmr1_fixup); |
448 | clk[vpu_axi_podf] = imx_clk_divider("vpu_axi_podf", "vpu_axi_sel", base + 0x24, 25, 3); | 459 | clk[vpu_axi_podf] = imx_clk_divider("vpu_axi_podf", "vpu_axi_sel", base + 0x24, 25, 3); |
449 | clk[cko1_podf] = imx_clk_divider("cko1_podf", "cko1_sel", base + 0x60, 4, 3); | 460 | clk[cko1_podf] = imx_clk_divider("cko1_podf", "cko1_sel", base + 0x60, 4, 3); |
461 | clk[cko2_podf] = imx_clk_divider("cko2_podf", "cko2_sel", base + 0x60, 21, 3); | ||
450 | 462 | ||
451 | /* name parent_name reg shift width busy: reg, shift */ | 463 | /* name parent_name reg shift width busy: reg, shift */ |
452 | clk[axi] = imx_clk_busy_divider("axi", "axi_sel", base + 0x14, 16, 3, base + 0x48, 0); | 464 | clk[axi] = imx_clk_busy_divider("axi", "axi_sel", base + 0x14, 16, 3, base + 0x48, 0); |
@@ -537,6 +549,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
537 | clk[vdo_axi] = imx_clk_gate2("vdo_axi", "vdo_axi_sel", base + 0x80, 12); | 549 | clk[vdo_axi] = imx_clk_gate2("vdo_axi", "vdo_axi_sel", base + 0x80, 12); |
538 | clk[vpu_axi] = imx_clk_gate2("vpu_axi", "vpu_axi_podf", base + 0x80, 14); | 550 | clk[vpu_axi] = imx_clk_gate2("vpu_axi", "vpu_axi_podf", base + 0x80, 14); |
539 | clk[cko1] = imx_clk_gate("cko1", "cko1_podf", base + 0x60, 7); | 551 | clk[cko1] = imx_clk_gate("cko1", "cko1_podf", base + 0x60, 7); |
552 | clk[cko2] = imx_clk_gate("cko2", "cko2_podf", base + 0x60, 24); | ||
540 | 553 | ||
541 | for (i = 0; i < ARRAY_SIZE(clk); i++) | 554 | for (i = 0; i < ARRAY_SIZE(clk); i++) |
542 | if (IS_ERR(clk[i])) | 555 | if (IS_ERR(clk[i])) |