* [U-Boot] [PATCH] arm, davinci: add PLL0 prediv to da850 lowlevel setup
@ 2012-01-16 17:43 Ben Gardiner
2012-01-17 6:37 ` Heiko Schocher
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ben Gardiner @ 2012-01-16 17:43 UTC (permalink / raw)
To: u-boot
The OMAP-L138 has a pre-divider available on PLL0.
Add support to da850_lowlevel.c for configuring PLL0's pre-divider. This is
to achieve certain OPP's -- e.g. the 372MHz OPP used also by Linux.
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Cc: Christian Riesch <christian.riesch@omicron.at>
CC: Heiko Schocher <hs@denx.de>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
Cc: Tom Rini <tom.rini@gmail.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
---
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c | 7 +++++++
arch/arm/include/asm/arch-davinci/pll_defs.h | 3 ++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c b/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c
index a532f8a..eec06bc 100644
--- a/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c
+++ b/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c
@@ -85,6 +85,13 @@ int da850_pll_init(struct davinci_pllc_regs *reg, unsigned long pllmult)
/* Enable the PLL from Disable Mode PLLDIS bit to 0 */
clrbits_le32(®->pllctl, PLLCTL_PLLDIS);
+#if defined(CONFIG_SYS_DA850_PLL0_PREDIV)
+ /* program the prediv */
+ if (reg == davinci_pllc0_regs && CONFIG_SYS_DA850_PLL0_PREDIV)
+ writel((PLL_DIVEN | CONFIG_SYS_DA850_PLL0_PREDIV),
+ ®->prediv);
+#endif
+
/* Program the required multiplier value in PLLM */
writel(pllmult, ®->pllm);
diff --git a/arch/arm/include/asm/arch-davinci/pll_defs.h b/arch/arm/include/asm/arch-davinci/pll_defs.h
index f1396e3..1c8d83f 100644
--- a/arch/arm/include/asm/arch-davinci/pll_defs.h
+++ b/arch/arm/include/asm/arch-davinci/pll_defs.h
@@ -68,7 +68,8 @@ struct dv_pll_regs {
#define PLLCTL_RES_9 (1 << 8)
#define PLLCTL_EXTCLKSRC (1 << 9)
-#define PLL_POSTDEN (1 << 15)
+#define PLL_DIVEN (1 << 15)
+#define PLL_POSTDEN PLL_DIVEN
#define PLL_SCSCFG3_DIV45PENA (1 << 2)
#define PLL_SCSCFG3_EMA_CLKSRC (1 << 1)
--
1.7.4.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] arm, davinci: add PLL0 prediv to da850 lowlevel setup
2012-01-16 17:43 [U-Boot] [PATCH] arm, davinci: add PLL0 prediv to da850 lowlevel setup Ben Gardiner
@ 2012-01-17 6:37 ` Heiko Schocher
2012-01-17 11:04 ` Christian Riesch
2012-01-17 22:33 ` Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Heiko Schocher @ 2012-01-17 6:37 UTC (permalink / raw)
To: u-boot
Hello Ben,
Ben Gardiner wrote:
> The OMAP-L138 has a pre-divider available on PLL0.
>
> Add support to da850_lowlevel.c for configuring PLL0's pre-divider. This is
> to achieve certain OPP's -- e.g. the 372MHz OPP used also by Linux.
>
> Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
> Cc: Christian Riesch <christian.riesch@omicron.at>
> CC: Heiko Schocher <hs@denx.de>
> Cc: Sandeep Paulraj <s-paulraj@ti.com>
> Cc: Tom Rini <tom.rini@gmail.com>
> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
> ---
> arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c | 7 +++++++
> arch/arm/include/asm/arch-davinci/pll_defs.h | 3 ++-
> 2 files changed, 9 insertions(+), 1 deletions(-)
Acked-by: Heiko Schocher <hs@denx.de>
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] arm, davinci: add PLL0 prediv to da850 lowlevel setup
2012-01-16 17:43 [U-Boot] [PATCH] arm, davinci: add PLL0 prediv to da850 lowlevel setup Ben Gardiner
2012-01-17 6:37 ` Heiko Schocher
@ 2012-01-17 11:04 ` Christian Riesch
2012-01-17 22:33 ` Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Christian Riesch @ 2012-01-17 11:04 UTC (permalink / raw)
To: u-boot
Hello Ben,
On Mon, Jan 16, 2012 at 6:43 PM, Ben Gardiner
<bengardiner@nanometrics.ca> wrote:
> The OMAP-L138 has a pre-divider available on PLL0.
>
> Add support to da850_lowlevel.c for configuring PLL0's pre-divider. This is
> to achieve certain OPP's -- e.g. the 372MHz OPP used also by Linux.
I noticed that that pre-divider configuration was missing while
working on the lowlevel setup, but then I forgot to add it (and I was
fine with the default)... Thank you for adding it!
Acked-by: Christian Riesch <christian.riesch@omicron.at>
Regards, Christian
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] arm, davinci: add PLL0 prediv to da850 lowlevel setup
2012-01-16 17:43 [U-Boot] [PATCH] arm, davinci: add PLL0 prediv to da850 lowlevel setup Ben Gardiner
2012-01-17 6:37 ` Heiko Schocher
2012-01-17 11:04 ` Christian Riesch
@ 2012-01-17 22:33 ` Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2012-01-17 22:33 UTC (permalink / raw)
To: u-boot
On Mon, Jan 16, 2012 at 10:43 AM, Ben Gardiner
<bengardiner@nanometrics.ca> wrote:
> The OMAP-L138 has a pre-divider available on PLL0.
>
> Add support to da850_lowlevel.c for configuring PLL0's pre-divider. This is
> to achieve certain OPP's -- e.g. the 372MHz OPP used also by Linux.
>
> Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
> Cc: Christian Riesch <christian.riesch@omicron.at>
> CC: Heiko Schocher <hs@denx.de>
> Cc: Sandeep Paulraj <s-paulraj@ti.com>
> Cc: Tom Rini <tom.rini@gmail.com>
> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Applied to u-boot-ti/master, thanks!
--
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-01-17 22:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-16 17:43 [U-Boot] [PATCH] arm, davinci: add PLL0 prediv to da850 lowlevel setup Ben Gardiner
2012-01-17 6:37 ` Heiko Schocher
2012-01-17 11:04 ` Christian Riesch
2012-01-17 22:33 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.