mtd: spi-nor: sfdp: Get the 8D-8D-8D byte order from BFPT
authorTudor Ambarus <tudor.ambarus@linaro.org>
Thu, 26 Sep 2024 14:19:54 +0000 (22:19 +0800)
committerTudor Ambarus <tudor.ambarus@linaro.org>
Wed, 2 Oct 2024 07:28:40 +0000 (10:28 +0300)
commit46b6256a68b49d6400ceb43696a01a3203c11688
treebb07eafe13e30bb9d0f89d57f8333f3aa5957415
parent6a42bc97ccda237a54c4ec27aed5fa9c51517d40
mtd: spi-nor: sfdp: Get the 8D-8D-8D byte order from BFPT

Parse BFPT in order to retrieve the byte order in 8D-8D-8D mode.

This info flag will be used as a basis to determine whether
there is byte swapping of data for SPI NOR flash in octal
DTR mode.

The controller driver will check whether byte swapping is supported
to determine whether the corresponding operation are supported,
thus avoiding the generation of unexpected data order.

Merge Tudor's patch and add modifications for suiting newer version
of Linux kernel.

Reviewed-by: Michael Walle <mwalle@kernel.org>
Signed-off-by: JaimeLiao <jaimeliao@mxic.com.tw>
Signed-off-by: AlvinZhou <alvinzhou@mxic.com.tw>
Link: https://lore.kernel.org/r/20240926141956.2386374-5-alvinzhou.tw@gmail.com
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
drivers/mtd/spi-nor/sfdp.c
drivers/mtd/spi-nor/sfdp.h