[U-Boot] [PATCH-OMAP3] OMAP3: Convert readl/writel and replace hardcoded values

Graeme Russ graeme.russ at gmail.com
Mon Nov 24 00:36:55 CET 2008


Wolfgang,

On Mon, Nov 24, 2008 at 10:04 AM, Wolfgang Denk <wd at denx.de> wrote:
> Dear Graeme,
>
> in message <d66caabb0811231324q5bcf3076p698840e2f73c0564 at mail.gmail.com> you wrote:
>>
>> Do you mean to instance the ecc_control struct at a specific memory
>> location and use writel(0x000, &ptr->ecc_config);? If so, why not
>
> Yes - this, and all other blocks of registers.
>
>> simply use ptr->ecc_config = 0x0000?
>
> mization  this  may  or may not be sufficient. Please see for example
> Documentation/volatile-considered-harmful.txt  in  the  Linux  kernel
> tree.

Have done

>
> The only clean and portable and thus reliable way is to use the (CPU
> specific) accessor macros or functions.

Will do :)

It seems to me that more and more of these 'style' issues are
cropping up. Should there be a document that covers them so we can
start to systematically improve the consistency of the code?

Thanks

Graeme


More information about the U-Boot mailing list