]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: atmel: clock: make it possible to configure HMX32
authorBo Shen <voice.shen@atmel.com>
Mon, 15 Dec 2014 05:24:27 +0000 (13:24 +0800)
committerAndreas Bießmann <andreas.devel@googlemail.com>
Sat, 7 Feb 2015 22:42:40 +0000 (23:42 +0100)
Signed-off-by: Bo Shen <voice.shen@atmel.com>
arch/arm/cpu/armv7/at91/clock.c

index 2cdddb25048964364d1155dc6a76e762890be707..0bf453eff57c93145fce07967319946f549977ad 100644 (file)
@@ -130,10 +130,18 @@ void at91_mck_init(u32 mckr)
                 AT91_PMC_MCKR_PRES_MASK |
                 AT91_PMC_MCKR_MDIV_MASK |
                 AT91_PMC_MCKR_PLLADIV_2);
+#ifdef CPU_HAS_H32MXDIV
+       tmp &= ~AT91_PMC_MCKR_H32MXDIV;
+#endif
+
        tmp |= mckr & (AT91_PMC_MCKR_CSS_MASK  |
                       AT91_PMC_MCKR_PRES_MASK |
                       AT91_PMC_MCKR_MDIV_MASK |
                       AT91_PMC_MCKR_PLLADIV_2);
+#ifdef CPU_HAS_H32MXDIV
+       tmp |= mckr & AT91_PMC_MCKR_H32MXDIV;
+#endif
+
        writel(tmp, &pmc->mckr);
 
        while (!(readl(&pmc->sr) & AT91_PMC_MCKRDY))