From e99056e3877d1f04a36991aa48f1c690547f5ab9 Mon Sep 17 00:00:00 2001 From: Asen Dimov Date: Thu, 18 Mar 2010 13:46:45 +0200 Subject: [PATCH] using AT91_PMC_MCKR_MDIV_ instead of LEGACY one in at91/clock.c Signed-off-by: Asen Dimov --- cpu/arm926ejs/at91/clock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpu/arm926ejs/at91/clock.c b/cpu/arm926ejs/at91/clock.c index b06d7601b9..ecf91f5187 100644 --- a/cpu/arm926ejs/at91/clock.c +++ b/cpu/arm926ejs/at91/clock.c @@ -203,7 +203,8 @@ int at91_clock_init(unsigned long main_clock) if (mckr & AT91_PMC_MCKR_MDIV_MASK) freq /= 2; /* processor clock division */ #elif defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45) - mck_rate_hz = (mckr & AT91_PMC_MCKR_MDIV_MASK) == AT91SAM9_PMC_MDIV_3 + mck_rate_hz = (mckr & AT91_PMC_MCKR_MDIV_MASK) == + (AT91_PMC_MCKR_MDIV_2 | AT91_PMC_MCKR_MDIV_4) ? freq / 3 : freq / (1 << ((mckr & AT91_PMC_MCKR_MDIV_MASK) >> 8)); #else -- 2.25.1