* [PATCH] clk: tegra: Allow PLLE training to succeed
@ 2013-03-14 15:27 Thierry Reding
[not found] ` <1363274825-2439-1-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Thierry Reding @ 2013-03-14 15:27 UTC (permalink / raw)
To: Stephen Warren, Mike Turquette
Cc: Prashant Gaikwad, Peter De Schrijver,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
Under some circumstances the PLLE needs to be retrained, in which case
access to the PMC registers is required. Fix this by passing a pointer
to the PMC registers instead of NULL when registering the PLLE clock.
Signed-off-by: Thierry Reding <thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
---
drivers/clk/tegra/clk-tegra20.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c
index b92d48b..bf19400 100644
--- a/drivers/clk/tegra/clk-tegra20.c
+++ b/drivers/clk/tegra/clk-tegra20.c
@@ -703,7 +703,7 @@ static void tegra20_pll_init(void)
clks[pll_a_out0] = clk;
/* PLLE */
- clk = tegra_clk_register_plle("pll_e", "pll_ref", clk_base, NULL,
+ clk = tegra_clk_register_plle("pll_e", "pll_ref", clk_base, pmc_base,
0, 100000000, &pll_e_params,
0, pll_e_freq_table, NULL);
clk_register_clkdev(clk, "pll_e", NULL);
--
1.8.1.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] clk: tegra: Allow PLLE training to succeed
[not found] ` <1363274825-2439-1-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
@ 2013-03-15 9:28 ` Peter De Schrijver
2013-03-15 19:28 ` Stephen Warren
1 sibling, 0 replies; 6+ messages in thread
From: Peter De Schrijver @ 2013-03-15 9:28 UTC (permalink / raw)
To: Thierry Reding
Cc: Stephen Warren, Mike Turquette, Prashant Gaikwad,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On Thu, Mar 14, 2013 at 04:27:05PM +0100, Thierry Reding wrote:
> Under some circumstances the PLLE needs to be retrained, in which case
> access to the PMC registers is required. Fix this by passing a pointer
> to the PMC registers instead of NULL when registering the PLLE clock.
>
> Signed-off-by: Thierry Reding <thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
Acked-By: Peter De Schrijver <pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> drivers/clk/tegra/clk-tegra20.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c
> index b92d48b..bf19400 100644
> --- a/drivers/clk/tegra/clk-tegra20.c
> +++ b/drivers/clk/tegra/clk-tegra20.c
> @@ -703,7 +703,7 @@ static void tegra20_pll_init(void)
> clks[pll_a_out0] = clk;
>
> /* PLLE */
> - clk = tegra_clk_register_plle("pll_e", "pll_ref", clk_base, NULL,
> + clk = tegra_clk_register_plle("pll_e", "pll_ref", clk_base, pmc_base,
> 0, 100000000, &pll_e_params,
> 0, pll_e_freq_table, NULL);
> clk_register_clkdev(clk, "pll_e", NULL);
Cheers,
Peter.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] clk: tegra: Allow PLLE training to succeed
[not found] ` <1363274825-2439-1-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2013-03-15 9:28 ` Peter De Schrijver
@ 2013-03-15 19:28 ` Stephen Warren
[not found] ` <51437655.1030008-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
1 sibling, 1 reply; 6+ messages in thread
From: Stephen Warren @ 2013-03-15 19:28 UTC (permalink / raw)
To: Thierry Reding
Cc: Mike Turquette, Prashant Gaikwad, Peter De Schrijver,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
On 03/14/2013 09:27 AM, Thierry Reding wrote:
> Under some circumstances the PLLE needs to be retrained, in which case
> access to the PMC registers is required. Fix this by passing a pointer
> to the PMC registers instead of NULL when registering the PLLE clock.
Mike, I believe this patch is appropriate as a fix for v3.9. I assume
you'll take it through the clock tree? Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] clk: tegra: Allow PLLE training to succeed
[not found] ` <51437655.1030008-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
@ 2013-03-22 20:48 ` Mike Turquette
2013-03-25 18:53 ` Thierry Reding
0 siblings, 1 reply; 6+ messages in thread
From: Mike Turquette @ 2013-03-22 20:48 UTC (permalink / raw)
To: Stephen Warren, Thierry Reding
Cc: Prashant Gaikwad, Peter De Schrijver,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
Quoting Stephen Warren (2013-03-15 12:28:21)
> On 03/14/2013 09:27 AM, Thierry Reding wrote:
> > Under some circumstances the PLLE needs to be retrained, in which case
> > access to the PMC registers is required. Fix this by passing a pointer
> > to the PMC registers instead of NULL when registering the PLLE clock.
>
> Mike, I believe this patch is appropriate as a fix for v3.9. I assume
> you'll take it through the clock tree? Thanks.
Does this patch fix a crash or a documented failure? Linus is being
more strict about taking fixes in the -rc cycles these days and knowing
exactly what behavior this fixes would be beneficial.
Thanks,
Mike
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] clk: tegra: Allow PLLE training to succeed
2013-03-22 20:48 ` Mike Turquette
@ 2013-03-25 18:53 ` Thierry Reding
[not found] ` <20130325211304.4014.822@quantum>
0 siblings, 1 reply; 6+ messages in thread
From: Thierry Reding @ 2013-03-25 18:53 UTC (permalink / raw)
To: Mike Turquette
Cc: Stephen Warren, Prashant Gaikwad, Peter De Schrijver,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 1426 bytes --]
On Fri, Mar 22, 2013 at 01:48:22PM -0700, Mike Turquette wrote:
> Quoting Stephen Warren (2013-03-15 12:28:21)
> > On 03/14/2013 09:27 AM, Thierry Reding wrote:
> > > Under some circumstances the PLLE needs to be retrained, in which case
> > > access to the PMC registers is required. Fix this by passing a pointer
> > > to the PMC registers instead of NULL when registering the PLLE clock.
> >
> > Mike, I believe this patch is appropriate as a fix for v3.9. I assume
> > you'll take it through the clock tree? Thanks.
>
> Does this patch fix a crash or a documented failure? Linus is being
> more strict about taking fixes in the -rc cycles these days and knowing
> exactly what behavior this fixes would be beneficial.
This fixes a failure where the clock can't be retrained. Under some
circumstances the timing is such that retraining isn't required, in
which case the code runs normally. However I've seen in happen that
the PLL isn't stable in other cases, so the code tries to retrain.
But the current code doesn't allow retraining to happen because the
MC registers aren't accessible for the PLLE and therefore the
clk_plle_training() function immediately errors out with -ENOSYS.
Comparing to Tegra30 this is obviously just a typo when registering
the PLLE clock and the virtual address to the PMC registers can be
passed in at PLLE registration time to resolve this issue.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] clk: tegra: Allow PLLE training to succeed
[not found] ` <20130325211304.4014.822@quantum>
@ 2013-03-25 21:35 ` Thierry Reding
0 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2013-03-25 21:35 UTC (permalink / raw)
To: Mike Turquette
Cc: Stephen Warren, Prashant Gaikwad, Peter De Schrijver,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 2217 bytes --]
On Mon, Mar 25, 2013 at 02:13:04PM -0700, Mike Turquette wrote:
> Quoting Thierry Reding (2013-03-25 11:53:21)
> > On Fri, Mar 22, 2013 at 01:48:22PM -0700, Mike Turquette wrote:
> > > Quoting Stephen Warren (2013-03-15 12:28:21)
> > > > On 03/14/2013 09:27 AM, Thierry Reding wrote:
> > > > > Under some circumstances the PLLE needs to be retrained, in which case
> > > > > access to the PMC registers is required. Fix this by passing a pointer
> > > > > to the PMC registers instead of NULL when registering the PLLE clock.
> > > >
> > > > Mike, I believe this patch is appropriate as a fix for v3.9. I assume
> > > > you'll take it through the clock tree? Thanks.
> > >
> > > Does this patch fix a crash or a documented failure? Linus is being
> > > more strict about taking fixes in the -rc cycles these days and knowing
> > > exactly what behavior this fixes would be beneficial.
> >
> > This fixes a failure where the clock can't be retrained. Under some
> > circumstances the timing is such that retraining isn't required, in
> > which case the code runs normally. However I've seen in happen that
> > the PLL isn't stable in other cases, so the code tries to retrain.
> >
> > But the current code doesn't allow retraining to happen because the
> > MC registers aren't accessible for the PLLE and therefore the
> > clk_plle_training() function immediately errors out with -ENOSYS.
> >
> > Comparing to Tegra30 this is obviously just a typo when registering
> > the PLLE clock and the virtual address to the PMC registers can be
> > passed in at PLLE registration time to resolve this issue.
> >
>
> Hi Thierry,
>
> Let me rephrase. Does this really need to go into the current -rc's or
> can it go towards 3.10? What user-visible failure does this fix? For
> example, the board doesn't boot, or randomly crashes, or ethernet wasn't
> working but now it is. That sort of thing.
Without the patch, PCIe doesn't work reliably. So on some hardware this
indeed causes hardware like ethernet to not be properly initialized.
With this patch applied, training for the PLL can succeed and PCIe comes
up reliably.
So yes, I think this belongs in 3.9.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-03-25 21:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-14 15:27 [PATCH] clk: tegra: Allow PLLE training to succeed Thierry Reding
[not found] ` <1363274825-2439-1-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2013-03-15 9:28 ` Peter De Schrijver
2013-03-15 19:28 ` Stephen Warren
[not found] ` <51437655.1030008-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-03-22 20:48 ` Mike Turquette
2013-03-25 18:53 ` Thierry Reding
[not found] ` <20130325211304.4014.822@quantum>
2013-03-25 21:35 ` Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).