summaryrefslogtreecommitdiff
path: root/arch/m68k/cpu/mcf523x/speed.c
diff options
context:
space:
mode:
authorAlison Wang <b18965@freescale.com>2012-03-26 21:49:06 +0000
committerjason <jason@jason-ThinkPad-T61.(none)>2012-09-20 20:39:27 +0800
commitc6d88630158af79f5700c8bbc37972f511e84500 (patch)
tree4e36b504a79945811e15fa46e0c1cc48b8ede41b /arch/m68k/cpu/mcf523x/speed.c
parentaa0d99fc285a0b4ca71245c0c3ba8c00f8b51983 (diff)
ColdFire: Clean up checkpatch warnings for MCF523x
Signed-off-by: Alison Wang <b18965@freescale.com>
Diffstat (limited to 'arch/m68k/cpu/mcf523x/speed.c')
-rw-r--r--arch/m68k/cpu/mcf523x/speed.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/m68k/cpu/mcf523x/speed.c b/arch/m68k/cpu/mcf523x/speed.c
index 6096ba4144..e2a6ae3a58 100644
--- a/arch/m68k/cpu/mcf523x/speed.c
+++ b/arch/m68k/cpu/mcf523x/speed.c
@@ -3,7 +3,7 @@
* (C) Copyright 2000-2003
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
- * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
+ * Copyright (C) 2004-2007, 2012 Freescale Semiconductor, Inc.
* TsiChung Liew (Tsi-Chung.Liew@freescale.com)
*
* See file CREDITS for list of people who contributed to this
@@ -29,6 +29,7 @@
#include <asm/processor.h>
#include <asm/immap.h>
+#include <asm/io.h>
DECLARE_GLOBAL_DATA_PTR;
/*
@@ -36,11 +37,12 @@ DECLARE_GLOBAL_DATA_PTR;
*/
int get_clocks(void)
{
- volatile pll_t *pll = (volatile pll_t *)(MMAP_PLL);
+ pll_t *pll = (pll_t *)(MMAP_PLL);
- pll->syncr = PLL_SYNCR_MFD(1);
+ out_be32(&pll->syncr, PLL_SYNCR_MFD(1));
- while (!(pll->synsr & PLL_SYNSR_LOCK));
+ while (!(in_be32(&pll->synsr) & PLL_SYNSR_LOCK))
+ ;
gd->bus_clk = CONFIG_SYS_CLK;
gd->cpu_clk = (gd->bus_clk * 2);