From: emilio@elopez.com.ar (Emilio López)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 02/14] clk: sunxi: factors: Implement clock min and max frequencies
Date: Thu, 17 Jul 2014 13:09:35 -0300 [thread overview]
Message-ID: <53C7F53F.9000902@elopez.com.ar> (raw)
In-Reply-To: <1405588134-2396-3-git-send-email-maxime.ripard@free-electrons.com>
Hi Maxime,
El 17/07/14 06:08, Maxime Ripard escribi?:
> In the A13, the out of reset frequency for the PLL6 is too high to be actually
> working.
>
> Hence, we need to be able to lower down its frequency whenever we need to use
> the clock to some acceptable frequency.
>
> This patch adds two new properties in the clock-nodes, clk-min-frequency and
> clk-max-frequency, to specify acceptable boundaries for proper clock
> operations.
This paragraph looks out of place
>
> It also adds supports in the sunxi factor clocks driver to use these
> boundaries, enforce them at prepare time to make sure that the drivers will
> have a decent frequency, even though it never called set_rate, but also make
> sure we never cross these boundaries.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
(...)
>
> @@ -123,6 +147,9 @@ static int clk_factors_set_rate(struct clk_hw *hw, unsigned long rate,
>
> factors->get_factors((u32 *)&rate, (u32)parent_rate, &n, &k, &m, &p);
>
> + if ((rate > factors->max_rate) || (rate < factors->min_rate))
> + return -EINVAL;
Printing an error message here may come in handy in the future, what do
you think?
Thanks for working on this!
Emilio
next prev parent reply other threads:[~2014-07-17 16:09 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-17 9:08 [PATCH 00/14] clk: sunxi: Improve MMC clocks support Maxime Ripard
2014-07-17 9:08 ` [PATCH 01/14] clk: Introduce new frequency boundaries properties Maxime Ripard
2014-07-17 9:08 ` [PATCH 02/14] clk: sunxi: factors: Implement clock min and max frequencies Maxime Ripard
2014-07-17 16:09 ` Emilio López [this message]
2014-07-17 9:08 ` [PATCH 03/14] ARM: sunxi: sun5i: Enforce max frequency on PLL6 Maxime Ripard
2014-07-17 16:19 ` Emilio López
2014-07-17 9:08 ` [PATCH 04/14] clk: introduce clk_set_phase function & callback Maxime Ripard
2014-07-17 9:08 ` [PATCH 05/14] clk: Add a function to retrieve phase Maxime Ripard
2014-07-17 9:08 ` [PATCH 06/14] clk: sunxi: factors: Invert the probing logic Maxime Ripard
2014-07-17 9:08 ` [PATCH 07/14] clk: sunxi: Introduce mbus compatible Maxime Ripard
2014-08-25 14:17 ` Chen-Yu Tsai
2014-08-25 15:18 ` Maxime Ripard
2014-07-17 9:08 ` [PATCH 08/14] ARM: sunxi: dt: Switch to the new " Maxime Ripard
2014-07-17 9:08 ` [PATCH 09/14] clk: sunxi: Move mod0 clock to a file of its own Maxime Ripard
2014-07-17 9:08 ` [PATCH 10/14] clk: sunxi: Move mbus to mod0 file Maxime Ripard
2014-07-17 9:08 ` [PATCH 11/14] ARM: sunxi: dt: Add sample and output mmc clocks Maxime Ripard
2014-07-17 9:08 ` [PATCH 12/14] clk: sunxi: mod0: Introduce MMC proper phase handling Maxime Ripard
2014-07-17 9:08 ` [PATCH 13/14] mmc: sunxi: Convert MMC driver to the standard clock phase API Maxime Ripard
2014-08-13 8:44 ` Ulf Hansson
2014-07-17 9:08 ` [PATCH 14/14] clk: sunxi: Remove custom phase function Maxime Ripard
2014-07-19 10:47 ` [PATCH 00/14] clk: sunxi: Improve MMC clocks support Hans de Goede
2014-07-24 11:20 ` Maxime Ripard
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=53C7F53F.9000902@elopez.com.ar \
--to=emilio@elopez.com.ar \
--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).