From: Jerome Brunet <jbrunet@baylibre.com>
To: Heiner Kallweit <hkallweit1@gmail.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Kevin Hilman <khilman@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Yu Tu <yu.tu@amlogic.com>, Jianxin Pan <jianxin.pan@amlogic.com>
Cc: "open list:ARM/Amlogic Meson..."
<linux-amlogic@lists.infradead.org>,
linux-clk@vger.kernel.org,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH RESEND] clk: meson: pll: copy retry workaround from vendor driver
Date: Mon, 29 Aug 2022 11:54:06 +0200 [thread overview]
Message-ID: <1jk06rtlrv.fsf@starbuckisacylon.baylibre.com> (raw)
In-Reply-To: <cc80cda0-4dda-2e3e-3fc8-afa97717479b@gmail.com>
On Sun 14 Aug 2022 at 23:25, Heiner Kallweit <hkallweit1@gmail.com> wrote:
> On a S905X4-based system this call fails randomly.
> The vendor driver has a retry mechanism and on my system
> the second attempt is successful always.
>
This reason looks a bit weak to me.
I'd like AML team to comment on this PLL problem as I suspect it might
relate to other PLL we have been seeing
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
> drivers/clk/meson/clk-pll.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/clk/meson/clk-pll.c b/drivers/clk/meson/clk-pll.c
> index 9e55617bc..daa025b6d 100644
> --- a/drivers/clk/meson/clk-pll.c
> +++ b/drivers/clk/meson/clk-pll.c
> @@ -320,12 +320,16 @@ static int meson_clk_pll_is_enabled(struct clk_hw *hw)
>
> static int meson_clk_pcie_pll_enable(struct clk_hw *hw)
> {
> - meson_clk_pll_init(hw);
> + int retries = 10;
>
> - if (meson_clk_pll_wait_lock(hw))
> - return -EIO;
> + do {
> + meson_clk_pll_init(hw);
> + if (!meson_clk_pll_wait_lock(hw))
> + return 0;
> + pr_info("Retry enabling PCIe PLL clock\n");
> + } while (--retries);
>
> - return 0;
> + return -EIO;
> }
>
> static int meson_clk_pll_enable(struct clk_hw *hw)
next prev parent reply other threads:[~2022-08-29 9:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-14 21:25 [PATCH RESEND] clk: meson: pll: copy retry workaround from vendor driver Heiner Kallweit
2022-08-29 9:54 ` Jerome Brunet [this message]
2022-08-30 6:33 ` Yu Tu
2022-09-06 15:21 ` Jerome Brunet
2022-09-06 18:29 ` Heiner Kallweit
2022-09-13 8:42 ` Jerome Brunet
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=1jk06rtlrv.fsf@starbuckisacylon.baylibre.com \
--to=jbrunet@baylibre.com \
--cc=hkallweit1@gmail.com \
--cc=jianxin.pan@amlogic.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=mturquette@baylibre.com \
--cc=narmstrong@baylibre.com \
--cc=sboyd@kernel.org \
--cc=yu.tu@amlogic.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox