[U-Boot] [PATCH v2 2/9] sunxi: initial sun7i pinmux and gpio support

Ian Campbell ijc at hellion.org.uk
Thu Mar 27 22:52:35 CET 2014


On Wed, 2014-03-26 at 10:01 +0100, Wolfgang Denk wrote:
> I'm not an expert for ARM, but this indeed looks suspiscious - thanks
> for reporting this.

FYI I made the change which prompted this and the resulting code was the
same see https://groups.google.com/forum/#!topic/linux-sunxi/REZ18q0wcDY
The barriers were only ever compile barrier() type, not cpu barriers.

So the open coded thing was effectively:
        v = read();
        barrier();
        v = fiddlebits(b)
        barrier();
        write(v);
        
Whereas the code using clrsetbits is basically:
        write(fiddlebits(read()))
        
Which I think is OK in this case at least. Not sure about the general
case.

Ian.



More information about the U-Boot mailing list