summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-amd8111.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-02-07 14:24:09 +0530
committerWolfram Sang <wsa@the-dreams.de>2014-03-12 20:45:17 +0100
commit069a9502dd7c51cf2f9031cd86d88774c696101c (patch)
tree977b660ce1462272b49828ed4fdd89d36a3cd484 /drivers/i2c/busses/i2c-amd8111.c
parent5304032c9ebe5ed8a6dcac328bb399fb87c5c9af (diff)
downloadlinux-069a9502dd7c51cf2f9031cd86d88774c696101c.tar.bz2
i2c: s3c2410: Leave the bus disabled unless it is in use
There is a rather odd feature of the exynos i2c controller that if it is left enabled, it can lock itself up with the clk line held low. This makes the bus unusable. Unfortunately, the s3c24xx_i2c_set_master() function does not notice this, and reports a timeout. From then on the bus cannot be used until the AP is rebooted. The problem happens when any sort of interrupt occurs (e.g. due to a bus transition) when we are not in the middle of a transaction. We have seen many instances of this when U-Boot leaves the bus apparently happy, but Linux cannot access it. The current code is therefore pretty fragile. This fixes things by leaving the bus disabled unless we are actually in a transaction. We enable the bus at the start of the transaction and disable it at the end. That way we won't get interrupts and will not lock up the bus. It might be possible to clear pending interrupts on start-up, but this seems to be a more robust solution. We can't service interrupts when we are not in a transaction, and anyway would rather not lock up the bus while we try. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-amd8111.c')
0 files changed, 0 insertions, 0 deletions