Re: [PATCH 2/2] AT91 slow-clock resume: don't restore the PLL settings when the PLL was off

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Anders Larsen
Date: Tuesday, April 13, 2010 - 1:46 am

Hi Andrew,

On 2010-04-13 10:14:53, Andrew Victor wrote:

it's not possible to use that constant directly; there are too many bits
set (the ARM instruction set has room for an 8-bit constant and a shift
value)...


...so I made the test a two-step process; the first 'tst' checks if
the bits masked by (AT91_PMC_MUL & 0xff0000) = 0x00ff0000 are all zero,
the second 'tst' checks if the bits masked by
(AT91_PMC_MUL & ~0xff0000) = 0x07000000 are zero, so all 11 bits are
indeed tested.

There might well be an easier way to do this, but I didn't manage to
find it - the code isn't on a hot path anyway (it's executed _once_ upon
resume after suspend).

Cheers
Anders


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 2/2] AT91 slow-clock resume: don't restore the ..., Anders Larsen, (Tue Apr 13, 1:46 am)