[PATCH] first in a series to enhance microcode patches

Wolfgang Denk wd at denx.de
Wed Oct 6 06:20:12 EST 2004


In message <Pine.LNX.4.60.0410051543230.3549 at localhost.localdomain> you wrote:
> 
> that's definitely understandable.  it's just potentially confusing to 
> have a structure's reserved chunks declared as some combination of 
> uchar, ushort, uint and/or ulong, when it's obviously more 
> comprehensible to make each reserved chunk a standard array of char 
> whose size is obvious at a glance.

Actually this might not be confusing, but making the code  easier  to
read,  to  understand,  and  maybe  one day to extend - remember that
these struct definitions are direct translations of Motorola provided
documentation - and I tend to  believe  that  the  chip  manufacturer
knows  more about the internals of his chips than you or me. One day,
a "uint reserved_xxx;" may turn into a new, shiny 32 bit register.

>    now *that* kind of creeps me out.  why is reserved space being 
> declared as "volatile"?  yeesh.

It does not hurt, and it makes it easier to adapt the code  when  new
register definitions pop up in a later version of the chip?


Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Intel told us the Pentium would have "RISK" features...



More information about the Linuxppc-embedded mailing list