[PATCH v6 5/7] spi: mxic: Add support for swapping byte
Jaime Liao
jaimeliao.tw at gmail.com
Thu Nov 30 00:38:52 PST 2023
From: JaimeLiao <jaimeliao at mxic.com.tw>
Some SPI-NOR flash swap the bytes on a 16-bit boundary when
configured in Octal DTR mode. It means data format D0 D1 D2 D3
would be swapped to D1 D0 D3 D2. So that whether controller
support swapping bytes should be checked before enable Octal
DTR mode. Add swap byte support on a 16-bit boundary when
configured in Octal DTR mode for Macronix xSPI host controller
dirver.
Signed-off-by: JaimeLiao <jaimeliao at mxic.com.tw>
---
drivers/spi/spi-mxic.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/spi/spi-mxic.c b/drivers/spi/spi-mxic.c
index 60c9f3048ac9..085c9037d6f5 100644
--- a/drivers/spi/spi-mxic.c
+++ b/drivers/spi/spi-mxic.c
@@ -572,6 +572,7 @@ static const struct spi_controller_mem_ops mxic_spi_mem_ops = {
static const struct spi_controller_mem_caps mxic_spi_mem_caps = {
.dtr = true,
+ .dtr_swab16 = true,
.ecc = true,
};
--
2.25.1
More information about the linux-mtd
mailing list