* [U-Boot] [PATCH] ARM: OMAP4+: Fix DPLL programming sequence
@ 2016-05-23 8:01 Lokesh Vutla
2016-05-23 15:24 ` Nishanth Menon
2016-05-30 18:06 ` [U-Boot] " Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Lokesh Vutla @ 2016-05-23 8:01 UTC (permalink / raw)
To: u-boot
All the output clock parameters of a DPLL needs to be programmed before
locking the DPLL. But it is being configured after locking the DPLL which
could potentially bypass DPLL. So fixing this sequence.
Reported-by: Richard Woodruff <r-woodruff2@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
arch/arm/cpu/armv7/omap-common/clocks-common.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/arm/cpu/armv7/omap-common/clocks-common.c b/arch/arm/cpu/armv7/omap-common/clocks-common.c
index ef2ac98..2de9935 100644
--- a/arch/arm/cpu/armv7/omap-common/clocks-common.c
+++ b/arch/arm/cpu/armv7/omap-common/clocks-common.c
@@ -236,6 +236,8 @@ static void do_setup_dpll(u32 const base, const struct dpll_params *params,
/* Dpll locked with ideal values for nominal opps. */
debug("\n %s Dpll already locked with ideal"
"nominal opp values", dpll);
+
+ bypass_dpll(base);
goto setup_post_dividers;
}
}
@@ -251,13 +253,13 @@ static void do_setup_dpll(u32 const base, const struct dpll_params *params,
writel(temp, &dpll_regs->cm_clksel_dpll);
+setup_post_dividers:
+ setup_post_dividers(base, params);
+
/* Lock */
if (lock)
do_lock_dpll(base);
-setup_post_dividers:
- setup_post_dividers(base, params);
-
/* Wait till the DPLL locks */
if (lock)
wait_for_lock(base);
--
2.8.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* [U-Boot] [PATCH] ARM: OMAP4+: Fix DPLL programming sequence
2016-05-23 8:01 [U-Boot] [PATCH] ARM: OMAP4+: Fix DPLL programming sequence Lokesh Vutla
@ 2016-05-23 15:24 ` Nishanth Menon
2016-05-30 18:06 ` [U-Boot] " Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Nishanth Menon @ 2016-05-23 15:24 UTC (permalink / raw)
To: u-boot
On 05/23/2016 03:01 AM, Lokesh Vutla wrote:
> All the output clock parameters of a DPLL needs to be programmed before
> locking the DPLL. But it is being configured after locking the DPLL which
> could potentially bypass DPLL. So fixing this sequence.
>
> Reported-by: Richard Woodruff <r-woodruff2@ti.com>
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> ---
> arch/arm/cpu/armv7/omap-common/clocks-common.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/cpu/armv7/omap-common/clocks-common.c b/arch/arm/cpu/armv7/omap-common/clocks-common.c
> index ef2ac98..2de9935 100644
> --- a/arch/arm/cpu/armv7/omap-common/clocks-common.c
> +++ b/arch/arm/cpu/armv7/omap-common/clocks-common.c
> @@ -236,6 +236,8 @@ static void do_setup_dpll(u32 const base, const struct dpll_params *params,
> /* Dpll locked with ideal values for nominal opps. */
> debug("\n %s Dpll already locked with ideal"
> "nominal opp values", dpll);
> +
> + bypass_dpll(base);
> goto setup_post_dividers;
> }
> }
> @@ -251,13 +253,13 @@ static void do_setup_dpll(u32 const base, const struct dpll_params *params,
>
> writel(temp, &dpll_regs->cm_clksel_dpll);
>
> +setup_post_dividers:
> + setup_post_dividers(base, params);
> +
> /* Lock */
> if (lock)
> do_lock_dpll(base);
>
> -setup_post_dividers:
> - setup_post_dividers(base, params);
> -
> /* Wait till the DPLL locks */
> if (lock)
> wait_for_lock(base);
>
LGTM
Reviewed-by: Nishanth Menon <nm@ti.com>
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 3+ messages in thread* [U-Boot] ARM: OMAP4+: Fix DPLL programming sequence
2016-05-23 8:01 [U-Boot] [PATCH] ARM: OMAP4+: Fix DPLL programming sequence Lokesh Vutla
2016-05-23 15:24 ` Nishanth Menon
@ 2016-05-30 18:06 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2016-05-30 18:06 UTC (permalink / raw)
To: u-boot
On Mon, May 23, 2016 at 01:31:19PM +0530, Lokesh Vutla wrote:
> All the output clock parameters of a DPLL needs to be programmed before
> locking the DPLL. But it is being configured after locking the DPLL which
> could potentially bypass DPLL. So fixing this sequence.
>
> Reported-by: Richard Woodruff <r-woodruff2@ti.com>
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> Reviewed-by: Nishanth Menon <nm@ti.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160530/068d4acb/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-30 18:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-23 8:01 [U-Boot] [PATCH] ARM: OMAP4+: Fix DPLL programming sequence Lokesh Vutla
2016-05-23 15:24 ` Nishanth Menon
2016-05-30 18:06 ` [U-Boot] " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox