diff options
author | Andreas Bießmann <andreas.devel@googlemail.com> | 2011-06-12 01:49:11 +0000 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2011-07-04 10:55:27 +0200 |
commit | c3a383f5bd26dfb429b68aa446d68f9d5bff21f9 (patch) | |
tree | 031b5024f5fb13c8e95705ebba46f7f9268f23a4 /arch/arm/cpu/arm926ejs | |
parent | 876ef43d2a5df2546fc30f50469135b4b335e72d (diff) |
arm920t/at91: add clock.c
This patch adds an copy of arm926ejs/at91/clock.c to arm920t/at91. The
arm926ejs specialities are removed from arm920t version and vice versa.
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Diffstat (limited to 'arch/arm/cpu/arm926ejs')
-rw-r--r-- | arch/arm/cpu/arm926ejs/at91/clock.c | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/arch/arm/cpu/arm926ejs/at91/clock.c b/arch/arm/cpu/arm926ejs/at91/clock.c index 608af2cf72..a7085deac0 100644 --- a/arch/arm/cpu/arm926ejs/at91/clock.c +++ b/arch/arm/cpu/arm926ejs/at91/clock.c @@ -23,36 +23,6 @@ DECLARE_GLOBAL_DATA_PTR; -unsigned long get_cpu_clk_rate(void) -{ - return gd->cpu_clk_rate_hz; -} - -unsigned long get_main_clk_rate(void) -{ - return gd->main_clk_rate_hz; -} - -unsigned long get_mck_clk_rate(void) -{ - return gd->mck_rate_hz; -} - -unsigned long get_plla_clk_rate(void) -{ - return gd->plla_rate_hz; -} - -unsigned long get_pllb_clk_rate(void) -{ - return gd->pllb_rate_hz; -} - -u32 get_pllb_init(void) -{ - return gd->at91_pllb_usb_init; -} - static unsigned long at91_css_to_rate(unsigned long css) { switch (css) { @@ -192,10 +162,7 @@ int at91_clock_init(unsigned long main_clock) freq = gd->mck_rate_hz; freq /= (1 << ((mckr & AT91_PMC_MCKR_PRES_MASK) >> 2)); /* prescale */ -#if defined(CONFIG_AT91RM9200) - /* mdiv */ - gd->mck_rate_hz = freq / (1 + ((mckr & AT91_PMC_MCKR_MDIV_MASK) >> 8)); -#elif defined(CONFIG_AT91SAM9G20) +#if defined(CONFIG_AT91SAM9G20) /* mdiv ; (x >> 7) = ((x >> 8) * 2) */ gd->mck_rate_hz = (mckr & AT91_PMC_MCKR_MDIV_MASK) ? freq / ((mckr & AT91_PMC_MCKR_MDIV_MASK) >> 7) : freq; |