aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/clk-imx6q.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-09-21 00:16:43 -0400
committerOlof Johansson <olof@lixom.net>2012-09-21 00:16:43 -0400
commitea832c41dacbc4a5f3888d9ef7c38213914aba2a (patch)
treebee97817d9a55f000e2bec5fa5d62d325050e6a6 /arch/arm/mach-imx/clk-imx6q.c
parentb74aae9a2074e1caa2e40bf119f3a633f77c94e4 (diff)
parent84bae6c379e362aa017efd417199f51d5c2273ac (diff)
Merge branch 'next/dt' into next/multiplatform
* next/dt: (182 commits) ARM: tegra: Add Avionic Design Tamonten Evaluation Carrier support ARM: tegra: Add Avionic Design Medcom-Wide support ARM: tegra: Add Avionic Design Plutux support ARM: tegra: Add Avionic Design Tamonten support ARM: tegra: dts: Add pwm label ARM: dt: tegra: whistler: configure power off ARM: mxs: m28evk: Disable OCOTP OUI loading ARM: imx6q: use pll2_pfd2_396m as the enfc_sel's parent ARM: dts: imx6q-sabrelite: add usbotg pinctrl support ARM: dts: imx23-olinuxino: Add USB host support ARM: dts: imx6q-sabrelite: add usbmisc device ARM: dts: mx23: Add USB resources ARM: dts: mxs: Add ethernetX to macX aliases ARM: msm: Remove non-DT targets from 8960 ARM: msm: Add DT support for 8960 ARM: msm: Move io mapping prototypes to common.h ARM: msm: Rename board-msm8x60 to signify its DT only status ARM: msm: Make 8660 a DT only target ARM: msm: Move 8660 to DT timer ARM: msm: Add DT support to msm_timer ...
Diffstat (limited to 'arch/arm/mach-imx/clk-imx6q.c')
-rw-r--r--arch/arm/mach-imx/clk-imx6q.c51
1 files changed, 12 insertions, 39 deletions
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
index 4233d9e3531d..3ec242f3341e 100644
--- a/arch/arm/mach-imx/clk-imx6q.c
+++ b/arch/arm/mach-imx/clk-imx6q.c
@@ -157,6 +157,7 @@ enum mx6q_clks {
157}; 157};
158 158
159static struct clk *clk[clk_max]; 159static struct clk *clk[clk_max];
160static struct clk_onecell_data clk_data;
160 161
161static enum mx6q_clks const clks_init_on[] __initconst = { 162static enum mx6q_clks const clks_init_on[] __initconst = {
162 mmdc_ch0_axi, rom, 163 mmdc_ch0_axi, rom,
@@ -394,52 +395,24 @@ int __init mx6q_clocks_init(void)
394 pr_err("i.MX6q clk %d: register failed with %ld\n", 395 pr_err("i.MX6q clk %d: register failed with %ld\n",
395 i, PTR_ERR(clk[i])); 396 i, PTR_ERR(clk[i]));
396 397
398 clk_data.clks = clk;
399 clk_data.clk_num = ARRAY_SIZE(clk);
400 of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
401
397 clk_register_clkdev(clk[gpt_ipg], "ipg", "imx-gpt.0"); 402 clk_register_clkdev(clk[gpt_ipg], "ipg", "imx-gpt.0");
398 clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0"); 403 clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0");
399 clk_register_clkdev(clk[twd], NULL, "smp_twd"); 404 clk_register_clkdev(clk[twd], NULL, "smp_twd");
400 clk_register_clkdev(clk[apbh_dma], NULL, "110000.dma-apbh");
401 clk_register_clkdev(clk[per1_bch], "per1_bch", "112000.gpmi-nand");
402 clk_register_clkdev(clk[gpmi_bch_apb], "gpmi_bch_apb", "112000.gpmi-nand");
403 clk_register_clkdev(clk[gpmi_bch], "gpmi_bch", "112000.gpmi-nand");
404 clk_register_clkdev(clk[gpmi_apb], "gpmi_apb", "112000.gpmi-nand");
405 clk_register_clkdev(clk[gpmi_io], "gpmi_io", "112000.gpmi-nand");
406 clk_register_clkdev(clk[usboh3], NULL, "2184000.usb");
407 clk_register_clkdev(clk[usboh3], NULL, "2184200.usb");
408 clk_register_clkdev(clk[usboh3], NULL, "2184400.usb");
409 clk_register_clkdev(clk[usboh3], NULL, "2184600.usb");
410 clk_register_clkdev(clk[usbphy1], NULL, "20c9000.usbphy");
411 clk_register_clkdev(clk[usbphy2], NULL, "20ca000.usbphy");
412 clk_register_clkdev(clk[uart_serial], "per", "2020000.serial");
413 clk_register_clkdev(clk[uart_ipg], "ipg", "2020000.serial");
414 clk_register_clkdev(clk[uart_serial], "per", "21e8000.serial");
415 clk_register_clkdev(clk[uart_ipg], "ipg", "21e8000.serial");
416 clk_register_clkdev(clk[uart_serial], "per", "21ec000.serial");
417 clk_register_clkdev(clk[uart_ipg], "ipg", "21ec000.serial");
418 clk_register_clkdev(clk[uart_serial], "per", "21f0000.serial");
419 clk_register_clkdev(clk[uart_ipg], "ipg", "21f0000.serial");
420 clk_register_clkdev(clk[uart_serial], "per", "21f4000.serial");
421 clk_register_clkdev(clk[uart_ipg], "ipg", "21f4000.serial");
422 clk_register_clkdev(clk[enet], NULL, "2188000.ethernet");
423 clk_register_clkdev(clk[usdhc1], NULL, "2190000.usdhc");
424 clk_register_clkdev(clk[usdhc2], NULL, "2194000.usdhc");
425 clk_register_clkdev(clk[usdhc3], NULL, "2198000.usdhc");
426 clk_register_clkdev(clk[usdhc4], NULL, "219c000.usdhc");
427 clk_register_clkdev(clk[i2c1], NULL, "21a0000.i2c");
428 clk_register_clkdev(clk[i2c2], NULL, "21a4000.i2c");
429 clk_register_clkdev(clk[i2c3], NULL, "21a8000.i2c");
430 clk_register_clkdev(clk[ecspi1], NULL, "2008000.ecspi");
431 clk_register_clkdev(clk[ecspi2], NULL, "200c000.ecspi");
432 clk_register_clkdev(clk[ecspi3], NULL, "2010000.ecspi");
433 clk_register_clkdev(clk[ecspi4], NULL, "2014000.ecspi");
434 clk_register_clkdev(clk[ecspi5], NULL, "2018000.ecspi");
435 clk_register_clkdev(clk[sdma], NULL, "20ec000.sdma");
436 clk_register_clkdev(clk[dummy], NULL, "20bc000.wdog");
437 clk_register_clkdev(clk[dummy], NULL, "20c0000.wdog");
438 clk_register_clkdev(clk[ssi1_ipg], NULL, "2028000.ssi");
439 clk_register_clkdev(clk[cko1_sel], "cko1_sel", NULL); 405 clk_register_clkdev(clk[cko1_sel], "cko1_sel", NULL);
440 clk_register_clkdev(clk[ahb], "ahb", NULL); 406 clk_register_clkdev(clk[ahb], "ahb", NULL);
441 clk_register_clkdev(clk[cko1], "cko1", NULL); 407 clk_register_clkdev(clk[cko1], "cko1", NULL);
442 408
409 /*
410 * The gpmi needs 100MHz frequency in the EDO/Sync mode,
411 * We can not get the 100MHz from the pll2_pfd0_352m.
412 * So choose pll2_pfd2_396m as enfc_sel's parent.
413 */
414 clk_set_parent(clk[enfc_sel], clk[pll2_pfd2_396m]);
415
443 for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) 416 for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
444 clk_prepare_enable(clk[clks_init_on[i]]); 417 clk_prepare_enable(clk[clks_init_on[i]]);
445 418