All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Heiko Stuebner <heiko@sntech.de>
Cc: mturquette@baylibre.com, linux-clk@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	James Hogan <james.hogan@imgtec.com>,
	Zhang Qing <zhangqing@rock-chips.com>,
	Joachim Eastwood <manabian@gmail.com>
Subject: Re: [PATCH v3] clk-divider: make sure read-only dividers do not write to their register
Date: Fri, 29 Jan 2016 17:29:23 -0800	[thread overview]
Message-ID: <20160130012923.GF4848@codeaurora.org> (raw)
In-Reply-To: <4666170.lmsMJxAogk@phil>

On 01/21, Heiko Stuebner wrote:
> Commit e6d5e7d90be9 ("clk-divider: Fix READ_ONLY when divider > 1") removed
> the special ops struct for read-only clocks and instead opted to handle
> them inside the regular ops.
> 
> On the rk3368 this results in breakage as aclkm now gets set a value.
> While it is the same divider value, the A53 core still doesn't like it,
> which can result in the cpu ending up in a hang.
> The reason being that "ACLKENMasserts one clock cycle before the rising
> edge of ACLKM" and the clock should only be touched when STANDBYWFIL2
> is asserted.
> 
> To fix this, reintroduce the read-only ops but do include the round_rate
> callback. That way no writes that may be unsafe are done to the divider
> register in any case.
> 
> The Rockchip use of the clk_divider_ops is adapted to this split again,
> as is the nxp, lpc18xx-ccu driver that was included since the original
> commit. On lpc18xx-ccu the divider seems to always be read-only
> so only uses the new ops now.
> 
> Fixes: e6d5e7d90be9 ("clk-divider: Fix READ_ONLY when divider > 1")
> Reported-by: Zhang Qing <zhangqing@rock-chips.com>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---

Applied to clk-next

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

WARNING: multiple messages have this Message-ID (diff)
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3] clk-divider: make sure read-only dividers do not write to their register
Date: Fri, 29 Jan 2016 17:29:23 -0800	[thread overview]
Message-ID: <20160130012923.GF4848@codeaurora.org> (raw)
In-Reply-To: <4666170.lmsMJxAogk@phil>

On 01/21, Heiko Stuebner wrote:
> Commit e6d5e7d90be9 ("clk-divider: Fix READ_ONLY when divider > 1") removed
> the special ops struct for read-only clocks and instead opted to handle
> them inside the regular ops.
> 
> On the rk3368 this results in breakage as aclkm now gets set a value.
> While it is the same divider value, the A53 core still doesn't like it,
> which can result in the cpu ending up in a hang.
> The reason being that "ACLKENMasserts one clock cycle before the rising
> edge of ACLKM" and the clock should only be touched when STANDBYWFIL2
> is asserted.
> 
> To fix this, reintroduce the read-only ops but do include the round_rate
> callback. That way no writes that may be unsafe are done to the divider
> register in any case.
> 
> The Rockchip use of the clk_divider_ops is adapted to this split again,
> as is the nxp, lpc18xx-ccu driver that was included since the original
> commit. On lpc18xx-ccu the divider seems to always be read-only
> so only uses the new ops now.
> 
> Fixes: e6d5e7d90be9 ("clk-divider: Fix READ_ONLY when divider > 1")
> Reported-by: Zhang Qing <zhangqing@rock-chips.com>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---

Applied to clk-next

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2016-01-30  1:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-21 20:53 [PATCH v3] clk-divider: make sure read-only dividers do not write to their register Heiko Stuebner
2016-01-21 20:53 ` Heiko Stuebner
2016-01-30  1:29 ` Stephen Boyd [this message]
2016-01-30  1:29   ` 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=20160130012923.GF4848@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=heiko@sntech.de \
    --cc=james.hogan@imgtec.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=manabian@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=zhangqing@rock-chips.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.