All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylvain Lemieux <slemieux.tyco@gmail.com>
To: Vladimir Zapolskiy <vz@mleia.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Michael Turquette <mturquette@baylibre.com>
Cc: Sylvain Lemieux <slemieux@tycoint.com>,
	linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] clk: lpc32xx: add a quirk for PWM and MS clock dividers
Date: Tue, 11 Oct 2016 12:01:15 -0400	[thread overview]
Message-ID: <1476201675.7075.24.camel@localhost> (raw)
In-Reply-To: <1475803015-4067-1-git-send-email-vz@mleia.com>

Hi Vladimir,

On Fri, 2016-10-07 at 04:16 +0300, Vladimir Zapolskiy wrote:
> In common clock framework CLK_DIVIDER_ONE_BASED or'ed with
> CLK_DIVIDER_ALLOW_ZERO flags indicates that
> 1) a divider clock may be set to zero value,
> 2) divider's zero value is interpreted as a non-divided clock.
> 
> On the LPC32xx platform clock dividers of PWM and memory card clocks
> comply with the first condition, but zero value means a gated clock,
> thus it may happen that the divider value is not updated when
> the clock is enabled and the clock remains gated.
> 
> The change adds one-shot quirks, which check for zero value of divider
> on initialization and set it to a non-zero value, therefore in runtime
> a gate clock will work as expected.
> 
> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>

This patch resolved the issue reported in the following post:
https://www.spinics.net/lists/arm-kernel/msg534048.html

Reviewed-by: Sylvain Lemieux <slemieux.tyco@gmail.com> 

> ---
>  drivers/clk/nxp/clk-lpc32xx.c | 32 ++++++++++++++++++++++++++++----
>  1 file changed, 28 insertions(+), 4 deletions(-)
> 
[...]

WARNING: multiple messages have this Message-ID (diff)
From: slemieux.tyco@gmail.com (Sylvain Lemieux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: lpc32xx: add a quirk for PWM and MS clock dividers
Date: Tue, 11 Oct 2016 12:01:15 -0400	[thread overview]
Message-ID: <1476201675.7075.24.camel@localhost> (raw)
In-Reply-To: <1475803015-4067-1-git-send-email-vz@mleia.com>

Hi Vladimir,

On Fri, 2016-10-07 at 04:16 +0300, Vladimir Zapolskiy wrote:
> In common clock framework CLK_DIVIDER_ONE_BASED or'ed with
> CLK_DIVIDER_ALLOW_ZERO flags indicates that
> 1) a divider clock may be set to zero value,
> 2) divider's zero value is interpreted as a non-divided clock.
> 
> On the LPC32xx platform clock dividers of PWM and memory card clocks
> comply with the first condition, but zero value means a gated clock,
> thus it may happen that the divider value is not updated when
> the clock is enabled and the clock remains gated.
> 
> The change adds one-shot quirks, which check for zero value of divider
> on initialization and set it to a non-zero value, therefore in runtime
> a gate clock will work as expected.
> 
> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>

This patch resolved the issue reported in the following post:
https://www.spinics.net/lists/arm-kernel/msg534048.html

Reviewed-by: Sylvain Lemieux <slemieux.tyco@gmail.com> 

> ---
>  drivers/clk/nxp/clk-lpc32xx.c | 32 ++++++++++++++++++++++++++++----
>  1 file changed, 28 insertions(+), 4 deletions(-)
> 
[...]

  reply	other threads:[~2016-10-11 16:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-07  1:16 [PATCH] clk: lpc32xx: add a quirk for PWM and MS clock dividers Vladimir Zapolskiy
2016-10-07  1:16 ` Vladimir Zapolskiy
2016-10-11 16:01 ` Sylvain Lemieux [this message]
2016-10-11 16:01   ` Sylvain Lemieux
2016-11-02  0:30 ` Stephen Boyd
2016-11-02  0:30   ` Stephen Boyd

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=1476201675.7075.24.camel@localhost \
    --to=slemieux.tyco@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@codeaurora.org \
    --cc=slemieux@tycoint.com \
    --cc=vz@mleia.com \
    /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.