diff options
author | Robert Jarzmik <robert.jarzmik@free.fr> | 2014-10-06 19:07:57 -0400 |
---|---|---|
committer | Michael Turquette <mturquette@linaro.org> | 2014-11-17 14:25:29 -0500 |
commit | dcf3d458304aafda3d12413ade39fdf19740dbc3 (patch) | |
tree | f6ac3ddde17edac558d5ab760d2052831d131259 /drivers/clk/pxa/clk-pxa27x.c | |
parent | e6d5e7d90be92cee626d7ec16ca9b06f1eed710b (diff) |
clk: pxa: fix pxa27x CCCR bit usage
Trivial fix to check the A bit of CCCR for memory frequency
calculations, where the shift of the bit index was missing, triggering a
wrong calculation of memory frequency.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/pxa/clk-pxa27x.c')
-rw-r--r-- | drivers/clk/pxa/clk-pxa27x.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/pxa/clk-pxa27x.c b/drivers/clk/pxa/clk-pxa27x.c index b345cc791e5d..88b9fe13fa44 100644 --- a/drivers/clk/pxa/clk-pxa27x.c +++ b/drivers/clk/pxa/clk-pxa27x.c | |||
@@ -322,7 +322,7 @@ static unsigned long clk_pxa27x_memory_get_rate(struct clk_hw *hw, | |||
322 | unsigned long ccsr = CCSR; | 322 | unsigned long ccsr = CCSR; |
323 | 323 | ||
324 | osc_forced = ccsr & (1 << CCCR_CPDIS_BIT); | 324 | osc_forced = ccsr & (1 << CCCR_CPDIS_BIT); |
325 | a = cccr & CCCR_A_BIT; | 325 | a = cccr & (1 << CCCR_A_BIT); |
326 | l = ccsr & CCSR_L_MASK; | 326 | l = ccsr & CCSR_L_MASK; |
327 | 327 | ||
328 | if (osc_forced || a) | 328 | if (osc_forced || a) |
@@ -341,7 +341,7 @@ static u8 clk_pxa27x_memory_get_parent(struct clk_hw *hw) | |||
341 | unsigned long ccsr = CCSR; | 341 | unsigned long ccsr = CCSR; |
342 | 342 | ||
343 | osc_forced = ccsr & (1 << CCCR_CPDIS_BIT); | 343 | osc_forced = ccsr & (1 << CCCR_CPDIS_BIT); |
344 | a = cccr & CCCR_A_BIT; | 344 | a = cccr & (1 << CCCR_A_BIT); |
345 | if (osc_forced) | 345 | if (osc_forced) |
346 | return PXA_MEM_13Mhz; | 346 | return PXA_MEM_13Mhz; |
347 | if (a) | 347 | if (a) |