On Tue, Sep 21, 2010 at 09:43:28, Jon Povey wrote: > When setting up to transmit, a race exists between the ISR and > i2c_davinci_xfer_msg() trying to load the first byte and adjust counters. > This is mostly visible for transmits > 1 byte long. > > The hardware starts sending immediately that MDR.STT is set. IMR trickery > doesn't work because if we start sending, finish the first byte and an > XRDY event occurs before we load IMR to unmask it, we never get an > interrupt, and we timeout. > > Sudhakar Rajashekhara explains that at least OMAP-L138 requires MDR mode > settings before DXR for correct behaviour, so load MDR first with > STT cleared and later load again with STT set. > > Tested on DM355 connected to Techwell TW2836 and Wolfson WM8985 > > Signed-off-by: Jon Povey <jon.po...@racelogic.co.uk> > CC: Sudhakar Rajashekhara <sudhakar....@ti.com> > CC: Troy Kisky <troy.ki...@boundarydevices.com> > ---
Tested-by: Sudhakar Rajashekhara <sudhakar....@ti.com> Tested with audio loopback on OMAP-L138, OMAP-L137 and DM365. Also tested with i2cdetect function which probes all the devices on the i2c bus. Thanks, Sudhakar _______________________________________________ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source