Dear Graeme Russ, In message <4df9e409.1060...@gmail.com> you wrote: > > is equivalent except that, as already pointed out, clrsetbits and friends: > > a) Are not portable because only ARM and PPC define them which makes > them, by definition, non-standard
They should be added to _any_ arch/<arch>/include/asm/io.h that doesn't use them yet. > b) Each invocation results in a read barrier plus a write barrier ...which is intentionally (actually mandatory) when accessing I/O memory, and negligable overhead on plain memory. > c) If the hardware register is sensitive to partial updates (i.e. requires > all bit-fields to be updated in on operation) this requires a read into > a local variable, calls to clrsetbits against that variable and finally > a write-back - Lots of memory barriers Wrong. The macro does this automatically. There is only a single read and a single write per call. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Ernest asks Frank how long he has been working for the company. "Ever since they threatened to fire me." _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot