]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
i2c-omap: Fix unhandled fault
authorTony Lindgren <tony@atomide.com>
Sun, 23 Mar 2008 19:28:20 +0000 (20:28 +0100)
committerJean Delvare <khali@hyperion.delvare>
Sun, 23 Mar 2008 19:28:20 +0000 (20:28 +0100)
commitf08ac4e79424c266aed8282939649104b37f53b4
treecf41c7a0e3f388a91c39d77a0ce43bad5333b902
parent70849251147c3499afb8d7500d0fba240da73456
i2c-omap: Fix unhandled fault

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.

This patch has been tested in linux-omap tree with various omaps.

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