diff options
Diffstat (limited to 'arch/arm/mach-imx/clk-imx6q.c')
-rw-r--r-- | arch/arm/mach-imx/clk-imx6q.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index cab02d0a15d6..e1a17ac7b3b4 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c | |||
@@ -122,10 +122,6 @@ static const char *cko1_sels[] = { "pll3_usb_otg", "pll2_bus", "pll1_sys", "pll5 | |||
122 | "dummy", "axi", "enfc", "ipu1_di0", "ipu1_di1", "ipu2_di0", | 122 | "dummy", "axi", "enfc", "ipu1_di0", "ipu1_di1", "ipu2_di0", |
123 | "ipu2_di1", "ahb", "ipg", "ipg_per", "ckil", "pll4_audio", }; | 123 | "ipu2_di1", "ahb", "ipg", "ipg_per", "ckil", "pll4_audio", }; |
124 | 124 | ||
125 | static const char * const clks_init_on[] __initconst = { | ||
126 | "mmdc_ch0_axi", "mmdc_ch1_axi", "usboh3", | ||
127 | }; | ||
128 | |||
129 | enum mx6q_clks { | 125 | enum mx6q_clks { |
130 | dummy, ckil, ckih, osc, pll2_pfd0_352m, pll2_pfd1_594m, pll2_pfd2_396m, | 126 | dummy, ckil, ckih, osc, pll2_pfd0_352m, pll2_pfd1_594m, pll2_pfd2_396m, |
131 | pll3_pfd0_720m, pll3_pfd1_540m, pll3_pfd2_508m, pll3_pfd3_454m, | 127 | pll3_pfd0_720m, pll3_pfd1_540m, pll3_pfd2_508m, pll3_pfd3_454m, |
@@ -156,16 +152,20 @@ enum mx6q_clks { | |||
156 | ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3, | 152 | ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3, |
157 | usdhc4, vdo_axi, vpu_axi, cko1, pll1_sys, pll2_bus, pll3_usb_otg, | 153 | usdhc4, vdo_axi, vpu_axi, cko1, pll1_sys, pll2_bus, pll3_usb_otg, |
158 | pll4_audio, pll5_video, pll6_mlb, pll7_usb_host, pll8_enet, ssi1_ipg, | 154 | pll4_audio, pll5_video, pll6_mlb, pll7_usb_host, pll8_enet, ssi1_ipg, |
159 | ssi2_ipg, ssi3_ipg, clk_max | 155 | ssi2_ipg, ssi3_ipg, rom, |
156 | clk_max | ||
160 | }; | 157 | }; |
161 | 158 | ||
162 | static struct clk *clk[clk_max]; | 159 | static struct clk *clk[clk_max]; |
163 | 160 | ||
161 | static enum mx6q_clks const clks_init_on[] __initconst = { | ||
162 | mmdc_ch0_axi, rom, | ||
163 | }; | ||
164 | |||
164 | int __init mx6q_clocks_init(void) | 165 | int __init mx6q_clocks_init(void) |
165 | { | 166 | { |
166 | struct device_node *np; | 167 | struct device_node *np; |
167 | void __iomem *base; | 168 | void __iomem *base; |
168 | struct clk *c; | ||
169 | int i, irq; | 169 | int i, irq; |
170 | 170 | ||
171 | clk[dummy] = imx_clk_fixed("dummy", 0); | 171 | clk[dummy] = imx_clk_fixed("dummy", 0); |
@@ -365,6 +365,7 @@ int __init mx6q_clocks_init(void) | |||
365 | clk[gpmi_bch] = imx_clk_gate2("gpmi_bch", "usdhc4", base + 0x78, 26); | 365 | clk[gpmi_bch] = imx_clk_gate2("gpmi_bch", "usdhc4", base + 0x78, 26); |
366 | clk[gpmi_io] = imx_clk_gate2("gpmi_io", "enfc", base + 0x78, 28); | 366 | clk[gpmi_io] = imx_clk_gate2("gpmi_io", "enfc", base + 0x78, 28); |
367 | clk[gpmi_apb] = imx_clk_gate2("gpmi_apb", "usdhc3", base + 0x78, 30); | 367 | clk[gpmi_apb] = imx_clk_gate2("gpmi_apb", "usdhc3", base + 0x78, 30); |
368 | clk[rom] = imx_clk_gate2("rom", "ahb", base + 0x7c, 0); | ||
368 | clk[sata] = imx_clk_gate2("sata", "ipg", base + 0x7c, 4); | 369 | clk[sata] = imx_clk_gate2("sata", "ipg", base + 0x7c, 4); |
369 | clk[sdma] = imx_clk_gate2("sdma", "ahb", base + 0x7c, 6); | 370 | clk[sdma] = imx_clk_gate2("sdma", "ahb", base + 0x7c, 6); |
370 | clk[spba] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12); | 371 | clk[spba] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12); |
@@ -424,21 +425,14 @@ int __init mx6q_clocks_init(void) | |||
424 | clk_register_clkdev(clk[ahb], "ahb", NULL); | 425 | clk_register_clkdev(clk[ahb], "ahb", NULL); |
425 | clk_register_clkdev(clk[cko1], "cko1", NULL); | 426 | clk_register_clkdev(clk[cko1], "cko1", NULL); |
426 | 427 | ||
427 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) { | 428 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) |
428 | c = clk_get_sys(clks_init_on[i], NULL); | 429 | clk_prepare_enable(clk[clks_init_on[i]]); |
429 | if (IS_ERR(c)) { | ||
430 | pr_err("%s: failed to get clk %s", __func__, | ||
431 | clks_init_on[i]); | ||
432 | return PTR_ERR(c); | ||
433 | } | ||
434 | clk_prepare_enable(c); | ||
435 | } | ||
436 | 430 | ||
437 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt"); | 431 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt"); |
438 | base = of_iomap(np, 0); | 432 | base = of_iomap(np, 0); |
439 | WARN_ON(!base); | 433 | WARN_ON(!base); |
440 | irq = irq_of_parse_and_map(np, 0); | 434 | irq = irq_of_parse_and_map(np, 0); |
441 | mxc_timer_init(NULL, base, irq); | 435 | mxc_timer_init(base, irq); |
442 | 436 | ||
443 | return 0; | 437 | return 0; |
444 | } | 438 | } |