On Tue, Nov 20, 2012 at 05:45:55PM +0800, Daniel Kurtz wrote: > On Tue, Nov 20, 2012 at 1:57 PM, Mark Brown > > + spins = 3; > > + do { > > + cpu_relax(); > > + iicstat = readl(i2c->regs + S3C2410_IICSTAT); > > + } while ((iicstat & S3C2410_IICSTAT_START) && --spins); > Can you avoid one cpu_relax() by reading IICSTAT first, and switch to > while { } instead of do { } while ()? Of course. The CPUs that care about this are single core so the cpu_relax() has no effect on them anyway.
Attachment:
signature.asc
Description: Digital signature