summaryrefslogtreecommitdiff
path: root/cpu/mcf52x2/speed.c
diff options
context:
space:
mode:
authorTsiChung Liew <tsicliew@gmail.com>2009-06-12 11:29:00 +0000
committerTsiChung Liew <Tsi-Chung.Liew@freescale.com>2009-07-14 09:27:17 -0500
commitbf9a521529e484b15e8fdb583a607cf7945d2f6b (patch)
treee7af9ed55c84ef664ab9b7d92e91a4fbdf9c800a /cpu/mcf52x2/speed.c
parent709b384b6493d9726dce20663ebe31bf7cab2925 (diff)
downloadu-boot-imx-bf9a521529e484b15e8fdb583a607cf7945d2f6b.zip
u-boot-imx-bf9a521529e484b15e8fdb583a607cf7945d2f6b.tar.gz
u-boot-imx-bf9a521529e484b15e8fdb583a607cf7945d2f6b.tar.bz2
ColdFire: Add M5208EVB and MCF520x CPU support
Signed-off-by: TsiChung Liew <tsicliew@gmail.com>
Diffstat (limited to 'cpu/mcf52x2/speed.c')
-rw-r--r--cpu/mcf52x2/speed.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/cpu/mcf52x2/speed.c b/cpu/mcf52x2/speed.c
index c93a518..b485e1c 100644
--- a/cpu/mcf52x2/speed.c
+++ b/cpu/mcf52x2/speed.c
@@ -30,11 +30,16 @@
DECLARE_GLOBAL_DATA_PTR;
-/*
- * get_clocks() fills in gd->cpu_clock and gd->bus_clk
- */
+/* get_clocks() fills in gd->cpu_clock and gd->bus_clk */
int get_clocks (void)
{
+#if defined(CONFIG_M5208)
+ volatile pll_t *pll = (pll_t *) MMAP_PLL;
+
+ pll->odr = CONFIG_SYS_PLL_ODR;
+ pll->fdr = CONFIG_SYS_PLL_FDR;
+#endif
+
#if defined(CONFIG_M5249) || defined(CONFIG_M5253)
volatile unsigned long cpll = mbar2_readLong(MCFSIM_PLLCR);
unsigned long pllcr;
@@ -77,7 +82,7 @@ int get_clocks (void)
#endif
gd->cpu_clk = CONFIG_SYS_CLK;
-#if defined(CONFIG_M5249) || defined(CONFIG_M5253) || \
+#if defined(CONFIG_M5208) || defined(CONFIG_M5249) || defined(CONFIG_M5253) || \
defined(CONFIG_M5271) || defined(CONFIG_M5275)
gd->bus_clk = gd->cpu_clk / 2;
#else