i2c: mediatek: Disable i2c start_en and clear intr_stat brfore reset
authorQii Wang <qii.wang@mediatek.com>
Thu, 27 May 2021 12:04:04 +0000 (20:04 +0800)
committerWolfram Sang <wsa@kernel.org>
Fri, 28 May 2021 08:13:07 +0000 (10:13 +0200)
commitfed1bd51a504eb96caa38b4f13ab138fc169ea75
tree2cc001ac183f789f2690ebd21eb4a9924db18f1d
parente4d8716c3dcec47f1557024add24e1f3c09eb24b
i2c: mediatek: Disable i2c start_en and clear intr_stat brfore reset

The i2c controller driver do dma reset after transfer timeout,
but sometimes dma reset will trigger an unexpected DMA_ERR irq.
It will cause the i2c controller to continuously send interrupts
to the system and cause soft lock-up. So we need to disable i2c
start_en and clear intr_stat to stop i2c controller before dma
reset when transfer timeout.

Fixes: aafced673c06("i2c: mediatek: move dma reset before i2c reset")
Signed-off-by: Qii Wang <qii.wang@mediatek.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-mt65xx.c