From: al@alarsen.net (Anders Larsen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] AT91 slow-clock resume: don't restore the PLL settings when the PLL was off
Date: Tue, 13 Apr 2010 10:46:50 +0200 [thread overview]
Message-ID: <1271148410l.25331l.4l@i-dmzi_al.realan.de> (raw)
In-Reply-To: <w2ocd73a99e1004130114g1e46ed2blbcfeef1c9cec0001@mail.gmail.com>
Hi Andrew,
On 2010-04-13 10:14:53, Andrew Victor wrote:
> > + ? ? ? tst ? ? r3, #(AT91_PMC_MUL & ?0xff0000)
> > + ? ? ? bne ? ? 1f
> > + ? ? ? tst ? ? r3, #(AT91_PMC_MUL & ~0xff0000)
> > + ? ? ? beq ? ? 2f
> > +1:
> > ? ? ? ?wait_pllblock
> > +2:
>
> AT91_PMC_MUL is 11 bits (so 0x7ff0000)
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)...
> Is the mask (0xff0000) correct in the above code?
> It looks like wait_pllblock will be skipped if the MUL field is set to
> 0x100, 0x200, 0x300, etc.
...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
prev parent reply other threads:[~2010-04-13 8:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-03 21:33 [PATCH 2/2] AT91 slow-clock resume: don't restore the PLL settings when the PLL was off Anders Larsen
2010-04-06 21:45 ` Andrew Victor
2010-04-08 10:56 ` Anders Larsen
2010-04-13 8:14 ` Andrew Victor
2010-04-13 8:46 ` Anders Larsen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1271148410l.25331l.4l@i-dmzi_al.realan.de \
--to=al@alarsen.net \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).