i2c: mediatek: Fix wrong dma sync flag
authorQii Wang <qii.wang@mediatek.com>
Sat, 17 Apr 2021 06:46:51 +0000 (14:46 +0800)
committerWolfram Sang <wsa@kernel.org>
Sat, 17 Apr 2021 20:06:24 +0000 (22:06 +0200)
The right flag is apdma_sync when apdma remove hand-shake signel.

Fixes: 05f6f7271a38 ("i2c: mediatek: Fix apdma and i2c hand-shake timeout")
Signed-off-by: Qii Wang <qii.wang@mediatek.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-mt65xx.c

index 3e34261..bf25acb 100644 (file)
@@ -479,7 +479,7 @@ static void mtk_i2c_init_hw(struct mtk_i2c *i2c)
 {
        u16 control_reg;
 
-       if (i2c->dev_comp->dma_sync) {
+       if (i2c->dev_comp->apdma_sync) {
                writel(I2C_DMA_WARM_RST, i2c->pdmabase + OFFSET_RST);
                udelay(10);
                writel(I2C_DMA_CLR_FLAG, i2c->pdmabase + OFFSET_RST);