
On Mon, 24 Aug 2009 12:15:39 +0200 Detlev Zundel dzu@denx.de wrote:
but I can do of course a:
- /* LCRR - Clock Ratio Register (10.3.1.14) */
- im->lbus.lcrr = (im->lbus.lcrr & ~LCRR_MASK) | \
(CONFIG_SYS_LCRR & LCRR_MASK);
Which way is prefered?
Personally I'd prefer the latter, as I expect a bitmask to specifiy which bits I'm allowed to _write_.
which is consistent with the rest of the assignment style in that file.
This really depends if and how this applies to the other members of the 83xx family.
they're all the same, really.
OK, if it is so ;-)
Then why not put this into mpc83xx.h?
that makes a lot of sense - I don't know why original code has multiple #ifdef configuration based sccr assignments in cpu_init.c.
And, by the way, we should _really_ be using accessor macros all around ;)
actually LCRR itself has specific instructions that say if written, it then should be read, and then an isync be issued.
Hmm.. actual code did not this! Where is this documented? And shouldn;t we update this in code?
Of course "we" should update this ;)
of course.
Heiko, I got tired of looking up all the errata docs for common parts of 83xx, so now I look at the latest device manuals. In this case, the source was "MPC8379E PowerQUICC II Pro Integrated Host Processor Family Reference Manual, Rev. 1", p. 10-34, in the description for the CLKDIV bitfield.
let's not duplicate existing bad code, and use the io accessor fns (e.g., out_be, etc.) for new code here please.
Thanks,
Kim