]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
I2C: Fix unhandled fault in i2c-omap controller
authorTony Lindgren <tony@atomide.com>
Mon, 18 Feb 2008 20:16:00 +0000 (12:16 -0800)
committerTony Lindgren <tony@atomide.com>
Thu, 21 Feb 2008 00:25:19 +0000 (16:25 -0800)
commitf8e5a643e37370ccbaadb07ff4d1dbb814bbb678
treec69abcfe087ed634bd04d6b6af9322c928906d99
parent31a8b2bc0aea39075193bd0a2e4874363341e3e7
I2C: Fix unhandled fault in i2c-omap controller

If an I2C interrupt happens between disabling interface clock
and functional clock, the interrupt handler will produce an
external abort on non-linefetch error when trying to access
driver registers while interface clock is disabled.

This patch fixes the problem by saving and disabling i2c-omap
interrupt before turning off the clocks. Also disable functional
clock before the interface clock as suggested by Paul Walmsley.

Patch also renames enable/disable_clocks functions to unidle/idle
functions. Note that the driver is currently not taking advantage
of the idle interrupts. To use the idle interrupts, driver would
have to enable interface clock based on the idle interrupt
and dev->idle flag.

Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/i2c/busses/i2c-omap.c