diff options
author | Bo Shen <voice.shen@atmel.com> | 2014-10-24 16:13:26 +0800 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-11-17 08:47:16 -0500 |
commit | da79fa4d7736601b1e484dc23838f6976b1d761b (patch) | |
tree | 5ef91a826517daea092a3375285e80f22c524f87 /arch | |
parent | a5f35d63f2ec0f95162da924d346922d5888aa38 (diff) | |
download | u-boot-imx-da79fa4d7736601b1e484dc23838f6976b1d761b.zip u-boot-imx-da79fa4d7736601b1e484dc23838f6976b1d761b.tar.gz u-boot-imx-da79fa4d7736601b1e484dc23838f6976b1d761b.tar.bz2 |
ARM: atmel: spl: make css field configurable
The clock source for master clock can be slow clock, main clock,
plla clock or upll clock. So, make the clock source selection
field in mckr can be configured.
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/cpu/at91-common/spl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/cpu/at91-common/spl.c b/arch/arm/cpu/at91-common/spl.c index 57fb041..81f5f53 100644 --- a/arch/arm/cpu/at91-common/spl.c +++ b/arch/arm/cpu/at91-common/spl.c @@ -76,10 +76,12 @@ void at91_mck_init(u32 mckr) u32 tmp; tmp = readl(&pmc->mckr); - tmp &= ~(AT91_PMC_MCKR_PRES_MASK | + tmp &= ~(AT91_PMC_MCKR_CSS_MASK | + AT91_PMC_MCKR_PRES_MASK | AT91_PMC_MCKR_MDIV_MASK | AT91_PMC_MCKR_PLLADIV_2); - tmp |= mckr & (AT91_PMC_MCKR_PRES_MASK | + tmp |= mckr & (AT91_PMC_MCKR_CSS_MASK | + AT91_PMC_MCKR_PRES_MASK | AT91_PMC_MCKR_MDIV_MASK | AT91_PMC_MCKR_PLLADIV_2); writel(tmp, &pmc->mckr); |