]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c
arm, davinci: add PLL0 prediv to da850 lowlevel setup
[people/ms/u-boot.git] / arch / arm / cpu / arm926ejs / davinci / da850_lowlevel.c
index a532f8ab6063270c16aed1504b14fc5c94319159..eec06bc54d572f68f944a24b22fd933fb69860eb 100644 (file)
@@ -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);