All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Emilio López" <emilio@elopez.com.ar>
To: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Mike Turquette <mturquette@linaro.org>,
	Hans de Goede <hdegoede@redhat.com>,
	chris@printf.net, david.lanzendoerfer@o2s.ch,
	ulf.hansson@linaro.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org
Subject: Re: [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

WARNING: multiple messages have this Message-ID (diff)
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

  reply	other threads:[~2014-07-17 16:09 UTC|newest]

Thread overview: 44+ 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 ` Maxime Ripard
2014-07-17  9:08 ` [PATCH 01/14] clk: Introduce new frequency boundaries properties Maxime Ripard
2014-07-17  9:08   ` Maxime Ripard
2014-07-17  9:08 ` [PATCH 02/14] clk: sunxi: factors: Implement clock min and max frequencies Maxime Ripard
2014-07-17  9:08   ` Maxime Ripard
2014-07-17 16:09   ` Emilio López [this message]
2014-07-17 16:09     ` 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   ` Maxime Ripard
2014-07-17  9:08 ` [PATCH 05/14] clk: Add a function to retrieve phase Maxime Ripard
2014-07-17  9:08   ` Maxime Ripard
2014-07-17  9:08 ` [PATCH 08/14] ARM: sunxi: dt: Switch to the new mbus compatible Maxime Ripard
2014-07-17  9:08   ` 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   ` 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   ` Maxime Ripard
2014-07-17  9:08 ` [PATCH 13/14] mmc: sunxi: Convert MMC driver to the standard clock phase API Maxime Ripard
2014-07-17  9:08   ` Maxime Ripard
2014-08-13  8:44   ` Ulf Hansson
2014-08-13  8:44     ` Ulf Hansson
     [not found] ` <1405588134-2396-1-git-send-email-maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-07-17  9:08   ` [PATCH 03/14] ARM: sunxi: sun5i: Enforce max frequency on PLL6 Maxime Ripard
2014-07-17  9:08     ` Maxime Ripard
2014-07-17 16:19     ` Emilio López
2014-07-17 16:19       ` Emilio López
2014-07-17  9:08   ` [PATCH 06/14] clk: sunxi: factors: Invert the probing logic Maxime Ripard
2014-07-17  9:08     ` Maxime Ripard
2014-07-17  9:08   ` [PATCH 07/14] clk: sunxi: Introduce mbus compatible Maxime Ripard
2014-07-17  9:08     ` Maxime Ripard
2014-08-25 14:17     ` Chen-Yu Tsai
2014-08-25 14:17       ` Chen-Yu Tsai
2014-08-25 15:18       ` Maxime Ripard
2014-08-25 15:18         ` Maxime Ripard
2014-07-17  9:08   ` [PATCH 10/14] clk: sunxi: Move mbus to mod0 file Maxime Ripard
2014-07-17  9:08     ` 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     ` Maxime Ripard
2014-07-17  9:08   ` [PATCH 14/14] clk: sunxi: Remove custom phase function Maxime Ripard
2014-07-17  9:08     ` Maxime Ripard
2014-07-19 10:47 ` [PATCH 00/14] clk: sunxi: Improve MMC clocks support Hans de Goede
2014-07-19 10:47   ` Hans de Goede
2014-07-24 11:20   ` Maxime Ripard
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=chris@printf.net \
    --cc=david.lanzendoerfer@o2s.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=maxime.ripard@free-electrons.com \
    --cc=mturquette@linaro.org \
    --cc=ulf.hansson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.