using AT91_PMC_MCKR_MDIV_ instead of LEGACY one in at91/clock.c
authorAsen Dimov <dimov@ronetix.at>
Thu, 18 Mar 2010 11:46:45 +0000 (13:46 +0200)
committertrix <trix@windriver.com>
Sat, 3 Apr 2010 20:24:27 +0000 (15:24 -0500)
Signed-off-by: Asen Dimov <dimov@ronetix.at>
cpu/arm926ejs/at91/clock.c

index b06d7601b915aef15abf314236dde1baed57407a..ecf91f5187419871c9b375e8e9d34921a45d3b1b 100644 (file)
@@ -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