[PATCH v2] spi: spi-mtk-nor: Optimize timeout for dma read

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Mon Nov 14 03:32:31 PST 2022


Il 14/11/22 09:13, Bayi Cheng ha scritto:
> From: bayi cheng <bayi.cheng at mediatek.com>
> 
> The timeout value of the current dma read is unreasonable. For example,
> If the spi flash clock is 26Mhz, It will takes about 1.3ms to read a
> 4KB data in spi mode. But the actual measurement exceeds 50s when a
> dma read timeout is encountered.
> 
> In order to be more accurately, It is necessary to use usecs_to_jiffies,
> After modification, the measured timeout value is about 130ms.
> 
> Signed-off-by: bayi cheng <bayi.cheng at mediatek.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>





More information about the Linux-mediatek mailing list