diff options
author | Richard Zhao <richard.zhao@freescale.com> | 2012-05-14 01:04:47 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-05-16 06:46:23 -0400 |
commit | b0286f20c36d0c1e7537489daddaf574abf403dd (patch) | |
tree | cf6385941d2bfec372b1d4067c0386167a70c62c /arch/arm/mach-imx/clk-imx6q.c | |
parent | 2cfb45188a997ba4c3348e98a999b36663a4646f (diff) |
ARM: imx6q: prepare and enable init on clks directly instead of clk_get first
This also removes the usboh3 clk from the initially turned on
clocks which leaked in from an internal development tree.
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx/clk-imx6q.c')
-rw-r--r-- | arch/arm/mach-imx/clk-imx6q.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index 24324f2dac95..7b4751dbe749 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, |
@@ -160,11 +156,14 @@ enum mx6q_clks { | |||
160 | 156 | ||
161 | static struct clk *clk[clk_max]; | 157 | static struct clk *clk[clk_max]; |
162 | 158 | ||
159 | static enum mx6q_clks const clks_init_on[] __initconst = { | ||
160 | mmdc_ch0_axi, mmdc_ch1_axi, | ||
161 | }; | ||
162 | |||
163 | int __init mx6q_clocks_init(void) | 163 | int __init mx6q_clocks_init(void) |
164 | { | 164 | { |
165 | struct device_node *np; | 165 | struct device_node *np; |
166 | void __iomem *base; | 166 | void __iomem *base; |
167 | struct clk *c; | ||
168 | int i, irq; | 167 | int i, irq; |
169 | 168 | ||
170 | clk[dummy] = imx_clk_fixed("dummy", 0); | 169 | clk[dummy] = imx_clk_fixed("dummy", 0); |
@@ -419,15 +418,8 @@ int __init mx6q_clocks_init(void) | |||
419 | clk_register_clkdev(clk[dummy], NULL, "20bc000.wdog"); | 418 | clk_register_clkdev(clk[dummy], NULL, "20bc000.wdog"); |
420 | clk_register_clkdev(clk[dummy], NULL, "20c0000.wdog"); | 419 | clk_register_clkdev(clk[dummy], NULL, "20c0000.wdog"); |
421 | 420 | ||
422 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) { | 421 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) |
423 | c = clk_get_sys(clks_init_on[i], NULL); | 422 | clk_prepare_enable(clk[clks_init_on[i]]); |
424 | if (IS_ERR(c)) { | ||
425 | pr_err("%s: failed to get clk %s", __func__, | ||
426 | clks_init_on[i]); | ||
427 | return PTR_ERR(c); | ||
428 | } | ||
429 | clk_prepare_enable(c); | ||
430 | } | ||
431 | 423 | ||
432 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt"); | 424 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt"); |
433 | base = of_iomap(np, 0); | 425 | base = of_iomap(np, 0); |