On Wed, Jan 23, 2013 at 10:05:41PM +0200, Aaro Koskinen wrote: > On Wed, Jan 23, 2013 at 12:23:02PM +0200, Felipe Balbi wrote: > > Hi folks, > > > > it's now rebased on today's i2c-embedded/for-next. I boot tested with my > > Blaze board. > > > > Aaro, if you could verify it doesn't break N900, I'd be glad. > > It works, but it still introduces a ~4 second delay during the boot: > > [ 0.180847] usbcore: registered new device driver usb > [ 0.181518] musb-omap2430 musb-omap2430: invalid resource > [ 4.289093] twl 1-0048: PIH (irq 23) chaining IRQs 338..346 > [ 4.289276] twl 1-0048: power (irq 343) chaining IRQs 346..353 > [ 4.321228] twl4030_gpio twl4030_gpio: gpio (irq 338) chaining IRQs 354..371 > [ 4.446655] VUSB1V5: 1500 mV normal standby This delay is coming from omap_i2c_wait_for_bb(), with ARDY interrupt disabled we need to poll for BB bit longer, it seems for every transfer. Replacing msleep(1) with usleep_range(800, 1200) drops it half, and with just cpu_relax() the delay is gone - but obviously may increase the CPU time usage. BTW, with TWL RTC on OMAP boards you can quickly sanity check I2C throughput: while /bin/true; do cat /sys/class/rtc/rtc0/time ; done | uniq -c For these patches I get (ignoring the first line of the output): Before: 88 00:13:07 89 00:13:08 89 00:13:09 88 00:13:10 89 00:13:11 After: 26 00:00:30 26 00:00:31 26 00:00:32 26 00:00:33 26 00:00:34 After + omap_i2c_wait_for_bb() msleep() replaced with cpu_relax(): 91 00:04:59 90 00:05:00 91 00:05:01 90 00:05:02 91 00:05:03 A. -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html