On Wednesday, March 26, 2014 at 09:30:38 AM, Ian Campbell wrote: > On Mon, 2014-03-24 at 21:54 +0100, Marek Vasut wrote: > > > + cfg = readl(&pio->cfg[0] + index); > > > + cfg &= ~(0xf << offset); > > > + cfg |= val << offset; > > > + > > > + writel(cfg, &pio->cfg[0] + index); > > > > clrsetbits_le32() here. > > I looked at this transform in a few different contexts and one concern I > had was that readl and writel have barriers in them (after the read and > before the write respectively) while clrsetbits and friends do not. I > don't think this will matter for the read/modify/write bit twiddling > itself (since there are register dependencies) but I was slightly > concerned that the barriers were hiding the lack of explicit barriers > which would be required between the various reads/writes. > > But I think I am probably being overly cautious here and the obvious > transformation can be made. Anyone got any thoughts?
+CC Tom, Albert . Best regards, Marek Vasut -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.