diff options
author | Enrico Scholz <enrico.scholz@sigma-chemnitz.de> | 2008-07-25 15:54:44 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2008-08-22 10:47:48 +0200 |
commit | bb4187c44809ca6e15adb2005cf30b47e124f19d (patch) | |
tree | 2d800b1c353ac791f147b27d86d6141379054ca2 /arch | |
parent | fc9eea9b34452caef5d756126a1554971edfdd18 (diff) | |
download | barebox-bb4187c44809ca6e15adb2005cf30b47e124f19d.tar.gz barebox-bb4187c44809ca6e15adb2005cf30b47e124f19d.tar.xz |
PCM038: re-write SPCTL0 after reading it
There seems to be a bug in the i.MX27 used on .0 and .1 module
revisions which breaks SPCTL0 setup. There, SPCTL0 is reset to
0 after reading it causing e.g. a bad USB clock. Hence, this
patch writes back the read value.
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-imx/speed-imx27.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/speed-imx27.c b/arch/arm/mach-imx/speed-imx27.c index fa62bbf360..50cfaf187a 100644 --- a/arch/arm/mach-imx/speed-imx27.c +++ b/arch/arm/mach-imx/speed-imx27.c @@ -93,6 +93,7 @@ ulong imx_get_ipgclk(void) ulong imx_get_spllclk(void) { ulong cscr = CSCR; + ulong spctl0; ulong fref; if (cscr & CSCR_SP_SEL) @@ -100,7 +101,9 @@ ulong imx_get_spllclk(void) else fref = clk_in_32k(); - return imx_decode_pll(SPCTL0, fref); + spctl0 = SPCTL0; + SPCTL0 = spctl0; + return imx_decode_pll(spctl0, fref); } static ulong imx_decode_perclk(ulong div) |