Re: [PATCH v2] spi: spi-mtk-nor: Add recovery mechanism for dma read timeout

From: AngeloGioacchino Del Regno
Date: Wed Dec 07 2022 - 08:22:09 EST


Il 07/12/22 06:54, Bayi Cheng ha scritto:
From: bayi cheng <bayi.cheng@xxxxxxxxxxxx>

The state machine of MTK spi nor controller may be disturbed by some
glitch signals from the relevant BUS during dma read, Although the
possibility of causing the dma read to fail is next to nothing,
However, if error-handling is not implemented, which makes the feature
somewhat risky.

Add an error-handling mechanism here, reset the state machine and
re-read the data when an error occurs.

Signed-off-by: bayi cheng <bayi.cheng@xxxxxxxxxxxx>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>