Paul Walmsley 3831f15441 i2c-omap: fix I2C timeouts due to recursive omap_i2c_{un,}idle()
omap_i2c_unidle() and omap_i2c_idle() are called recursively during
omap_i2c_probe().  This is evidently unexpected and will wipe
out the I2C interrupt enable register the second time that
omap_i2c_idle() is called consecutively.  Any I2C transactions
following a probe of a bus with at least one device on it will then
time out.

Fix by moving omap_i2c_idle() further up in omap_i2c_probe().  Ensure
the I2C controller is marked as idle before the probe starts.  Also
attempt to catch future reappearances of this bug early in development
by warning in omap_i2c_{un,}idle() when they are called recursively.

Problem reported by David Brownell <david-b@pacbell.net>.

Tested on 3430SDP and 2430SDP.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Richard Woodruff <r-woodruff2@ti.com>
Acked-by; Steve Sakoman <steve@sakoman.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2008-11-21 13:39:47 -08:00
..
2008-11-19 18:50:00 -08:00
2008-10-28 17:46:02 +09:00
2008-11-07 08:25:43 -08:00
2008-11-14 14:10:01 +01:00
2008-11-01 09:49:46 -07:00
2008-11-01 09:50:12 -07:00
2008-10-21 07:48:33 -04:00
2008-11-19 18:49:57 -08:00
2008-10-16 11:21:30 -07:00
2008-10-27 19:15:41 +01:00
2008-11-04 08:18:19 -08:00
2008-11-04 08:18:19 -08:00
2008-11-10 13:50:17 -08:00
2008-11-01 09:49:46 -07:00
2008-11-19 22:01:35 -08:00
2008-11-19 18:50:00 -08:00
2008-11-17 19:11:26 +01:00
2008-10-28 21:47:17 +00:00