[PATCH 3/9] powerpc/ppc32: Update mpc52xx_psc structure with B revision changes

Sylvain Munaut tnt at 246tNt.com
Mon May 14 15:27:53 EST 2007


Matt Sealey wrote:
> Would a note next to these new fields be worth it? "5200B only" or
> "reserved on 5200" or even create a new PSC structure for the old
> processor and recast it in drivers that really want to support both
> revisions of the CPU?
>   
A comment next to them yes, that looks a good idea.
A new structure certainly not.
> Real nitpick:
>
> Setting the CCR on the MPC5200 (not B) now means you need to left
> shift your required CCR values by 16 bits before applying them into
> the field for the desired effect.
>
> If you were being lazy and just wanted to set some low-order bits
> in the CCR on the 5200, with the old structure that's fine. With
> the new structure, it will be writing into previously reserved
> space on the 5200. The 5200B might work fine, unless it's a driver
> someone missed, and is programming a value that should be in the
> upper 16 bits of the new CCR, in which case now you have to left
> shift by 16 bits.. :)
I know about the ccr that's annoying.
I guess I could make ccr a union and have it contains ccr16 and ccr32.

Note that old driver will still work ... then most likely do
out_be16(&psc->ccr, ...) and the &psc->ccr address didn't change. They
will just have a warning because ccr is a u32 so &psc->ccr is a u32* and
they give it to out_be16 ...


    Sylvain



More information about the Linuxppc-dev mailing list