diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2013-07-18 08:42:28 +0200 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-08-22 17:29:34 +0200 |
commit | a94f8ecb2f778f92deb1d3633426a70e1fcf56db (patch) | |
tree | 1b4929211fe6512cf77808b151c9282f2d11177a /arch/arm/mach-imx/clk-imx6q.c | |
parent | ARM: dts: imx: use generic DMA bindings for SSI nodes (diff) | |
download | linux-a94f8ecb2f778f92deb1d3633426a70e1fcf56db.tar.xz linux-a94f8ecb2f778f92deb1d3633426a70e1fcf56db.zip |
ARM: imx6q: remove board specific CLKO setup
The CLKO is widely used by imx6q board designs to clock audio codec.
Since most codecs accept 24 MHz frequency, let's initially set up CLKO
with OSC24M (cko <-- cko2 <-- osc). Then those board specific CLKO
setup for audio codec can be removed.
The board dts files also need an update on cko reference in codec node.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx/clk-imx6q.c')
-rw-r--r-- | arch/arm/mach-imx/clk-imx6q.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index bbafa3ccacb5..9181a241d3a8 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c @@ -288,6 +288,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) struct device_node *np; void __iomem *base; int i, irq; + int ret; clk[dummy] = imx_clk_fixed("dummy", 0); clk[ckil] = imx_obtain_fixed_clock("ckil", 0); @@ -592,6 +593,16 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) clk_prepare_enable(clk[usbphy2_gate]); } + /* + * Let's initially set up CLKO with OSC24M, since this configuration + * is widely used by imx6q board designs to clock audio codec. + */ + ret = clk_set_parent(clk[cko2_sel], clk[osc]); + if (!ret) + ret = clk_set_parent(clk[cko], clk[cko2]); + if (ret) + pr_warn("failed to set up CLKO: %d\n", ret); + /* Set initial power mode */ imx6q_set_lpm(WAIT_CLOCKED); |