Skip to content
Commit fdc20370 authored by Allen-KH Cheng's avatar Allen-KH Cheng Committed by Tudor Ambarus
Browse files

mtd: spi-nor: Fix the number of bytes for the dummy cycles

The number of bytes used by spi_nor_spimem_check_readop() may be
incorrect for the dummy cycles. Since nor->read_dummy is not initialized
before spi_nor_spimem_adjust_hwcaps().

We use both mode and wait state clock cycles instead of nor->read_dummy.

Fixes: 0e30f472

 ("mtd: spi-nor: add support for DTR protocol")
Co-developed-by: default avatarBayi Cheng <bayi.cheng@mediatek.com>
Signed-off-by: default avatarBayi Cheng <bayi.cheng@mediatek.com>
Signed-off-by: default avatarAllen-KH Cheng <allen-kh.cheng@mediatek.com>
Signed-off-by: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
Tested-by: default avatarDhruva Gole <d-gole@ti.com>
Tested-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: default avatarPratyush Yadav <pratyush@kernel.org>
Link: https://lore.kernel.org/r/20221031124633.13189-1-allen-kh.cheng@mediatek.com
parent 4dc49062
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment