summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBen Gardiner <bengardiner@nanometrics.ca>2012-01-16 07:43:15 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-02-12 10:11:22 +0100
commitd652a344a009854b72d7df97c11d2582b9e11c9a (patch)
tree41263d71b1480d01b453bde62b749650909c3a6d /arch
parentbd29cb05f2bd655a15ba32d96a0b4028b83be320 (diff)
downloadtalos-obmc-uboot-d652a344a009854b72d7df97c11d2582b9e11c9a.tar.gz
talos-obmc-uboot-d652a344a009854b72d7df97c11d2582b9e11c9a.zip
arm, davinci: add PLL0 prediv to da850 lowlevel setup
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> Acked-by: Heiko Schocher <hs@denx.de> Acked-by: Christian Riesch <christian.riesch@omicron.at>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c7
-rw-r--r--arch/arm/include/asm/arch-davinci/pll_defs.h3
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 a532f8ab60..eec06bc54d 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(&reg->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),
+ &reg->prediv);
+#endif
+
/* Program the required multiplier value in PLLM */
writel(pllmult, &reg->pllm);
diff --git a/arch/arm/include/asm/arch-davinci/pll_defs.h b/arch/arm/include/asm/arch-davinci/pll_defs.h
index f1396e3194..1c8d83fb5b 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)
OpenPOWER on IntegriCloud