OMAP2/3: hwmod: fix the i2c-reset timeout during bootup
authorAvinash.H.M <avinashhm@ti.com>
Fri, 20 May 2011 15:46:24 +0000 (21:16 +0530)
committerGrazvydas Ignotas <notasas@gmail.com>
Fri, 3 Jun 2011 11:49:35 +0000 (14:49 +0300)
commitbd452efc0ad93316609e5cf14c41da327fb13829
treecbe51f0841aa813594dc0c79fe82584d3e4db3e4
parent4ff36d3f4a2ecb6b3f73b2d4e8e52a47be7cb6eb
OMAP2/3: hwmod: fix the i2c-reset timeout during bootup

The sequence of _ocp_softreset doesn't work for i2c. The i2c module has a
special sequence to reset the module. The sequence is
 - Disable the I2C.
 - Write to SOFTRESET bit.
 - Enable the I2C.
 - Poll on the RESETDONE bit.
The sequence is implemented as a function and the i2c_class is updated with
the correct 'reset' pointer.  omap_hwmod_softreset function is implemented
which triggers the softreset by writing into sysconfig register. On following
this sequence, i2c module resets properly and timeouts are not seen.

Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Avinash.H.M <avinashhm@ti.com>
arch/arm/mach-omap2/i2c.c
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/omap_hwmod_2420_data.c
arch/arm/mach-omap2/omap_hwmod_2430_data.c
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
arch/arm/plat-omap/include/plat/i2c.h
arch/arm/plat-omap/include/plat/omap_hwmod.h