From: Michal Simek <michal.simek@xilinx.com>
To: Jolly Shah <jolly.shah@xilinx.com>, <mturquette@baylibre.com>,
<sboyd@codeaurora.org>, <michal.simek@xilinx.com>,
<linux-clk@vger.kernel.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: Mon, 18 Mar 2019 13:48:52 +0100 [thread overview]
Message-ID: <15f0f82f-0607-4cf5-f5a5-5edd7c5321bc@xilinx.com> (raw)
In-Reply-To: <1551742066-10825-1-git-send-email-jollys@xilinx.com>
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?
Thanks,
Michal
next prev parent reply other threads:[~2019-03-18 12:49 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 [this message]
2019-03-18 19:42 ` Stephen Boyd
2019-03-19 7:19 ` Michal Simek
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=15f0f82f-0607-4cf5-f5a5-5edd7c5321bc@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 \
/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®