[U-Boot] WARNING: in gcc 4.5.0 and 4.5.1 volatile is ignored
Alexander Holler
holler at ahsoftware.de
Sat Jan 22 13:46:19 CET 2011
Hello,
because I've recently seen some other places where volatile is used to
access registers without using read?() or write?() and many people seem
to start using 4.5.1, I want to post this warning using a descriptive
subject.
The keyword volatile might not have any effect when reading when gcc
4.5.0 or 4.5.1 is used.
The appropriate bug seems to be that one:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45052
You might either change such code to use readb(), readw() or readl(), or
you have to use either an older version of gcc or a version >= 4.5.2 (it
is fixed in 4.5.2).
A patch for write?() and read?() is currently in the
u-boot-arm-repository (but not in the master and not in 2010.12):
http://lists.denx.de/pipermail/u-boot/2011-January/084885.html
Regards,
Alexander
More information about the U-Boot
mailing list