spi: mtd: Use split reads if multi-die flag is set
PATCH 7/30 spi: mtd: Use split reads if multi-die flag is set
From: T Karthik Reddy <[email protected]>
Some flash devices have multiple dies in it & has die cross over issue. When SPI_NOR_MULTI_DIE flag is set in flash id table use it to enable split reads to avoid above issue. Define SPI_NOR_MULTI_DIE new flag to flash id flags. Remove SPI_FLASH_SPLIT_READ config and related code from the zynq and zynqmp qspi drivers as it is redundant.
Signed-off-by T Karthik Reddy <[email protected]>
Signed-off-by Ashok Reddy Soma <[email protected]>
Signed-off-by Tejas Bhumkar <[email protected]>
--- drivers/mtd/spi/sf_internal.h | 1 + drivers/mtd/spi/spi-nor-core.c | 3 +++ 2 files changed, 4 insertions(+)
drivers/mtd/spi/sf_internal.h +1 -0
@@ -70,6 +70,7 @@ struct flash_info {#define SPI_NOR_OCTAL_READ BIT(16)/* Flash supports Octal Read */ #define SPI_NOR_OCTAL_DTR_READ BIT(17)/* Flash supports Octal DTR Read */ #define SPI_NOR_OCTAL_DTR_PP BIT(18)/* Flash supports Octal DTR page program */ +#define SPI_NOR_MULTI_DIE BIT(19)/* Flash has multi dies & need split reads*/ };extern const struct flash_info spi_nor_ids[];
drivers/mtd/spi/spi-nor-core.c +3 -0
@@ -4485,6 +4485,9 @@ int spi_nor_scan(struct spi_nor *nor)if (info->flags &SPI_NOR_NO_ERASE ) mtd->flags |=MTD_NO_ERASE ; +if (info->flags &SPI_NOR_MULTI_DIE ) + nor->spi->multi_die = true; + nor->page_size = params.page_size; mtd->writebufsize = nor->page_size;
Signature · 1 line
2.27.0