From: Stephen Boyd <sboyd@codeaurora.org>
To: Ezequiel Garcia <ezequiel.garcia@imgtec.com>
Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org,
Mike Turquette <mturquette@linaro.org>,
Andrew Bresticker <abrestic@chromium.org>,
James Hartley <james.hartley@imgtec.com>,
James Hogan <james.hogan@imgtec.com>,
cernekee@chromium.org, Govindraj.Raja@imgtec.com,
Damien.Horsley@imgtec.com
Subject: Re: [PATCH 1/3] clk: pistachio: Add a pll_lock() helper for clarity
Date: Thu, 4 Jun 2015 12:44:22 -0700 [thread overview]
Message-ID: <20150604194422.GF676@codeaurora.org> (raw)
In-Reply-To: <1432677669-29581-2-git-send-email-ezequiel.garcia@imgtec.com>
On 05/26, Ezequiel Garcia wrote:
> This commit adds a pll_lock() helper making the code more readable.
> Cosmetic change only, no functionality changes.
>
> Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@imgtec.com>
> ---
Applied to clk-next.
> drivers/clk/pistachio/clk-pll.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/clk/pistachio/clk-pll.c b/drivers/clk/pistachio/clk-pll.c
> index de53756..9ce1be7 100644
> --- a/drivers/clk/pistachio/clk-pll.c
> +++ b/drivers/clk/pistachio/clk-pll.c
> @@ -67,6 +67,12 @@ static inline void pll_writel(struct pistachio_clk_pll *pll, u32 val, u32 reg)
> writel(val, pll->base + reg);
> }
>
> +static inline void pll_lock(struct pistachio_clk_pll *pll)
> +{
> + while (!(pll_readl(pll, PLL_STATUS) & PLL_STATUS_LOCK))
> + cpu_relax();
The patch is fine, but I wonder if we shouldn't have a timeout
here in case the PLL fails to lock.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2015-06-04 19:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-26 22:01 [PATCH 0/3] clk: pistachio: Assorted fixes Ezequiel Garcia
2015-05-26 22:01 ` Ezequiel Garcia
2015-05-26 22:01 ` [PATCH 1/3] clk: pistachio: Add a pll_lock() helper for clarity Ezequiel Garcia
2015-05-26 22:01 ` Ezequiel Garcia
2015-06-04 19:44 ` Stephen Boyd [this message]
2015-05-26 22:01 ` [PATCH 2/3] clk: pistachio: Lock the PLL when enabled upon rate change Ezequiel Garcia
2015-05-26 22:01 ` Ezequiel Garcia
2015-06-04 19:47 ` Stephen Boyd
2015-05-26 22:01 ` [PATCH 3/3] clk: pistachio: Add sanity checks on PLL configuration Ezequiel Garcia
2015-05-26 22:01 ` Ezequiel Garcia
2015-06-04 19:48 ` 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=20150604194422.GF676@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=Damien.Horsley@imgtec.com \
--cc=Govindraj.Raja@imgtec.com \
--cc=abrestic@chromium.org \
--cc=cernekee@chromium.org \
--cc=ezequiel.garcia@imgtec.com \
--cc=james.hartley@imgtec.com \
--cc=james.hogan@imgtec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=mturquette@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox