From: Michal Simek <michal.simek@xilinx.com>
To: Stephen Boyd <sboyd@kernel.org>,
Jolly Shah <jolly.shah@xilinx.com>, <linux-clk@vger.kernel.org>,
<michal.simek@xilinx.com>, <mturquette@baylibre.com>,
<sboyd@codeaurora.org>
Cc: <rajanv@xilinx.com>, <linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
Rajan Vaja <rajan.vaja@xilinx.com>,
Jolly Shah <jollys@xilinx.com>
Subject: Re: [PATCH] drivers: clk: zynqmp: Allow zero divisor value
Date: Tue, 19 Mar 2019 08:19:51 +0100 [thread overview]
Message-ID: <c9f01ef3-a692-6f15-46d8-8ce4226161bf@xilinx.com> (raw)
In-Reply-To: <155293817691.20095.7275560826051843640@swboyd.mtv.corp.google.com>
On 18. 03. 19 20:42, Stephen Boyd wrote:
> Quoting Michal Simek (2019-03-18 05:48:52)
>> On 05. 03. 19 0:27, Jolly Shah wrote:
>>> From: Rajan Vaja <rajan.vaja@xilinx.com>
>>>
>>> Zero divider is valid and default for some of ZynqMP
>>> clocks. Allow zero divisor when CLK_DIVIDER_ALLOW_ZERO
>>> for the clock is set.
>>>
>>> Signed-off-by: Rajan Vaja <rajanv@xilinx.com>
>>> Signed-off-by: Jolly Shah <jollys@xilinx.com>
>>> ---
>>> drivers/clk/zynqmp/divider.c | 7 +++++++
>>> 1 file changed, 7 insertions(+)
>>>
>>> diff --git a/drivers/clk/zynqmp/divider.c b/drivers/clk/zynqmp/divider.c
>>> index a371c66..e146b6f 100644
>>> --- a/drivers/clk/zynqmp/divider.c
>>> +++ b/drivers/clk/zynqmp/divider.c
>>> @@ -76,6 +76,13 @@ static unsigned long zynqmp_clk_divider_recalc_rate(struct clk_hw *hw,
>>> else
>>> value = div >> 16;
>>>
>>> + if (!value) {
>>> + WARN(!(divider->flags & CLK_DIVIDER_ALLOW_ZERO),
>>> + "%s: Zero divisor and CLK_DIVIDER_ALLOW_ZERO not set\n",
>>> + clk_name);
>>> + return parent_rate;
>>> + }
>>> +
>>> return DIV_ROUND_UP_ULL(parent_rate, value);
>>> }
>>>
>>>
>>
>> Stephen: Do you want to take it via your tree?
>>
>
> Sure.
ok. Then your turn with that two patches when you have time.
Thanks,
Michal
next prev parent reply other threads:[~2019-03-19 7:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-04 23:27 Jolly Shah
2019-03-18 12:48 ` Michal Simek
2019-03-18 19:42 ` Stephen Boyd
2019-03-19 7:19 ` Michal Simek [this message]
2019-04-11 18:32 ` 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=c9f01ef3-a692-6f15-46d8-8ce4226161bf@xilinx.com \
--to=michal.simek@xilinx.com \
--cc=jolly.shah@xilinx.com \
--cc=jollys@xilinx.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=rajan.vaja@xilinx.com \
--cc=rajanv@xilinx.com \
--cc=sboyd@codeaurora.org \
--cc=sboyd@kernel.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
all inboxes | Powered by JetHome®