summaryrefslogtreecommitdiff
path: root/cpu/arm926ejs/at91
diff options
context:
space:
mode:
authorJens Scharsig <js_at_ng@scharsoft.de>2010-02-14 12:20:43 +0100
committerTom Rix <Tom.Rix@windriver.com>2010-03-07 12:36:36 -0600
commit7cedb29872069e782f9f97cef4ab1232736e4c85 (patch)
treee8b3284e4848002ca3da82daf4546eba7dac513f /cpu/arm926ejs/at91
parent637833c2d669f9a370706e275e7103454c3c83ec (diff)
downloadu-boot-imx-7cedb29872069e782f9f97cef4ab1232736e4c85.zip
u-boot-imx-7cedb29872069e782f9f97cef4ab1232736e4c85.tar.gz
u-boot-imx-7cedb29872069e782f9f97cef4ab1232736e4c85.tar.bz2
updates the at91 main_clock calculation
* updates the conditional main_clock calculation (if AT91_MAIN_CLOCK defined) to c structure SoC access * add need register flags Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de>
Diffstat (limited to 'cpu/arm926ejs/at91')
-rw-r--r--cpu/arm926ejs/at91/clock.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/cpu/arm926ejs/at91/clock.c b/cpu/arm926ejs/at91/clock.c
index 444d42d..b06d760 100644
--- a/cpu/arm926ejs/at91/clock.c
+++ b/cpu/arm926ejs/at91/clock.c
@@ -157,9 +157,10 @@ int at91_clock_init(unsigned long main_clock)
*/
if (!main_clock) {
do {
- tmp = at91_sys_read(AT91_CKGR_MCFR);
- } while (!(tmp & AT91_PMC_MAINRDY));
- main_clock = (tmp & AT91_PMC_MAINF) * (AT91_SLOW_CLOCK / 16);
+ tmp = readl(&pmc->mcfr);
+ } while (!(tmp & AT91_PMC_MCFR_MAINRDY));
+ tmp &= AT91_PMC_MCFR_MAINF_MASK;
+ main_clock = tmp * (AT91_SLOW_CLOCK / 16);
}
#endif
main_clk_rate_hz = main_clock;