linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] ARM: imx6q: remove board specific CLKO setup
Date: Thu, 18 Jul 2013 10:36:03 +0200	[thread overview]
Message-ID: <20130718083603.GK10380@pengutronix.de> (raw)
In-Reply-To: <1374132670-791-5-git-send-email-shawn.guo@linaro.org>

On Thu, Jul 18, 2013 at 03:31:10PM +0800, Shawn Guo wrote:
> 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.
> 
> +	/*
> +	 * 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);


I don't really like that the clock setup code fiddles with clocks it has
no knowledge about just because it happens to be correct for several
boards.

I currently have no example where this bites me, so I think I can live
with it for now. I just wonder what I should do when this clock is used
for something vital to the system (clocking an FPGA for example?).

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2013-07-18  8:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-18  7:31 [PATCH 0/4] ARM: imx6q: clean up board specific CLKO setup Shawn Guo
2013-07-18  7:31 ` [PATCH 1/4] ARM: imx6q: add spdif gate clock Shawn Guo
2013-07-18  7:31 ` [PATCH 2/4] ARM: imx6q: add cko2 clocks Shawn Guo
2013-07-18  7:31 ` [PATCH 3/4] ARM: imx6q: add the missing cko output selection Shawn Guo
2013-07-18  7:31 ` [PATCH 4/4] ARM: imx6q: remove board specific CLKO setup Shawn Guo
2013-07-18  8:36   ` Sascha Hauer [this message]
2013-07-18 11:55     ` Shawn Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130718083603.GK10380@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).