[U-Boot] Struct SoC access
Reinhard Meyer
u-boot at emk-elektronik.de
Sat Aug 14 21:40:06 CEST 2010
Dear Mike Frysinger,
> On Sat, Aug 14, 2010 at 3:30 PM, Reinhard Meyer wrote:
>> #define DBU_ADDR 0xsomething (in a SoC header file)
>>
>> dbu_t *dbu = (dbu_t *)DBU_ADDR; (in a function)
>
> needs to be volatile ...
> -mike
Why? The elements are used as parameters to readl/writel functions:
status = readl(&dbu->sr);
I am quite sure we are NOT supposed to directly access hardware:
status = dbu->sr;
Best Regards,
Reinhard
More information about the U-Boot
mailing list