diff options
author | Yogesh Narayan Gaur <yogeshnarayan.gaur@nxp.com> | 2019-01-15 13:05:22 +0300 |
---|---|---|
committer | Boris Brezillon <bbrezillon@kernel.org> | 2019-01-17 10:43:14 +0300 |
commit | 0837ae46ff003fed44bfead23c590e7105f47623 (patch) | |
tree | b9ffb928586fae3a1898b538915e14d5ed8702bd /drivers/mtd/devices | |
parent | 2bda2f811b36cb7e569ca384e2dfcf74740a8279 (diff) | |
download | linux-0837ae46ff003fed44bfead23c590e7105f47623.tar.xz |
mtd: m25p80: add support of octal mode I/O transfer
Add support for octal mode I/O data transfer based on the controller (spi)
mode.
Assign hw-capability mask bits for octal transfer.
Signed-off-by: Yogesh Narayan Gaur <yogeshnarayan.gaur@nxp.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Boris Brezillon <bbrezillon@kernel.org>
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r-- | drivers/mtd/devices/m25p80.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index c4a1d04b8c80..651bab6d4e31 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -195,7 +195,14 @@ static int m25p_probe(struct spi_mem *spimem) spi_mem_set_drvdata(spimem, flash); flash->spimem = spimem; - if (spi->mode & SPI_RX_QUAD) { + if (spi->mode & SPI_RX_OCTAL) { + hwcaps.mask |= SNOR_HWCAPS_READ_1_1_8; + + if (spi->mode & SPI_TX_OCTAL) + hwcaps.mask |= (SNOR_HWCAPS_READ_1_8_8 | + SNOR_HWCAPS_PP_1_1_8 | + SNOR_HWCAPS_PP_1_8_8); + } else if (spi->mode & SPI_RX_QUAD) { hwcaps.mask |= SNOR_HWCAPS_READ_1_1_4; if (spi->mode & SPI_TX_QUAD) |