Re: [PATCH v2 1/6] mtd: spi-nor: core: use 2 data bytes for template ops

From: Michael Walle
Date: Tue Jun 01 2021 - 08:36:34 EST


Am 2021-05-31 20:17, schrieb Pratyush Yadav:
The template ops used in spi_nor_spimem_check_pp() and
spi_nor_spimem_check_readop() currently set the data phase to 1 byte
long. This is problematic for 8D-8D-8D protocol where odd length data
phase is invalid since one cycle transfers 2 bytes and odd number of
bytes would mean half a cycle is left over. This could result in a
controller rejecting the op as "not supported" even though it actually
supports the protocol.

Change the data length to 2 bytes in these templates. One might argue
that this should only be done for 8D-8D-8D operations but when talking
about these templates, there is no functional difference between one and
two bytes, even in STR modes.

Signed-off-by: Pratyush Yadav <p.yadav@xxxxxx>
---

Reviewed-by: Michael Walle <michael@xxxxxxxx>