[PATCH] powerpc/mpc52xx/mtd: fix mtd-ram access for 16-bit Local Plus Bus

Albrecht Dreß albrecht.dress at arcor.de
Sun Jun 14 02:45:44 EST 2009


Am 11.06.09 18:27 schrieb(en) Grant Likely:
>> +               *(u16 *)buf = *((volatile u16 *)(vdest - 1));
>> +               buf[1] = *((u8 *)src);
>> +               *((volatile u16 *)(vdest - 1)) = *(u16 *)buf;
> 
> what is the purpose of volatile here?  If you need io barriers, then  
> use the in_/out_be16 macros.

Yes, you're right - should be completely superfluous here.  A result of  
copy & paste without thinking... :-(

> Blech.  ugly #ifdef and not really multiplatform safe (yeah, I know  
> it shouldn't break non-5200 platforms, but it does have an  
> undesirable impact).  There's got to be a better way.

Ouch, yes - I completely forgot the possibility of multi-platform  
builds.

Am 11.06.09 19:28 schrieb(en) Grant Likely:
> So; the solution to me seems to be on an MPC5200 platform replace the  
> offending hooks with MPC5200 specific variants at runtime.

Will re-work the patch that way!  BTW, a dumb question: what is the  
proper way to determine which cpu the system is running on?  Check the  
CPU node of the of tree?

Thanks, Albrecht.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20090613/de214df9/attachment.pgp>


More information about the Linuxppc-dev mailing list