summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBo Shen <voice.shen@atmel.com>2014-12-15 13:24:27 +0800
committerAndreas Bießmann <andreas.devel@googlemail.com>2015-02-07 23:42:40 +0100
commit05084443f02ecc3b74f6604edb69f199c804ffb9 (patch)
tree31fb1857a54b5a87dabce957225faa6545de94ff
parent7f641d53bbb3a426a3bfb132d8346153e86a9d08 (diff)
downloadu-boot-imx-05084443f02ecc3b74f6604edb69f199c804ffb9.zip
u-boot-imx-05084443f02ecc3b74f6604edb69f199c804ffb9.tar.gz
u-boot-imx-05084443f02ecc3b74f6604edb69f199c804ffb9.tar.bz2
ARM: atmel: clock: make it possible to configure HMX32
Signed-off-by: Bo Shen <voice.shen@atmel.com>
-rw-r--r--arch/arm/cpu/armv7/at91/clock.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/at91/clock.c b/arch/arm/cpu/armv7/at91/clock.c
index 2cdddb2..0bf453e 100644
--- a/arch/arm/cpu/armv7/at91/clock.c
+++ b/arch/arm/cpu/armv7/at91/clock.c
@@ -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))