[PATCH] mtd: spinand: macronix: Add Quad support for serial NAND flash
Miquel Raynal
miquel.raynal at bootlin.com
Mon Aug 16 07:27:23 PDT 2021
On Mon, 2021-08-09 at 01:27:52 UTC, Jaime Liao wrote:
> Adding FLAG "SPINAND_HAS_QE_BIT" for Quad mode support on Macronix
> Serial Flash.
> Validated via normal(default) and QUAD mode by read, erase, read back,
> on Xilinx Zynq PicoZed FPGA board which included Macronix
> SPI Host(drivers/spi/spi-mxic.c).
> ---
> drivers/mtd/nand/spi/macronix.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/mtd/nand/spi/macronix.c b/drivers/mtd/nand/spi/macronix.c
> index a989035..3f31f13 100644
> --- a/drivers/mtd/nand/spi/macronix.c
> +++ b/drivers/mtd/nand/spi/macronix.c
> @@ -126,7 +126,7 @@ static int mx35lf1ge4ab_ecc_get_status(struct spinand_device *spinand,
> SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
> &write_cache_variants,
> &update_cache_variants),
> - 0,
> + SPINAND_HAS_QE_BIT,
> SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout,
> mx35lf1ge4ab_ecc_get_status)),
> SPINAND_INFO("MX35LF4GE4AD",
> @@ -136,7 +136,7 @@ static int mx35lf1ge4ab_ecc_get_status(struct spinand_device *spinand,
> SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
> &write_cache_variants,
> &update_cache_variants),
> - 0,
> + SPINAND_HAS_QE_BIT,
> SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout,
> mx35lf1ge4ab_ecc_get_status)),
> SPINAND_INFO("MX35LF1G24AD",
> @@ -146,16 +146,16 @@ static int mx35lf1ge4ab_ecc_get_status(struct spinand_device *spinand,
> SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
> &write_cache_variants,
> &update_cache_variants),
> - 0,
> + SPINAND_HAS_QE_BIT,
> SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, NULL)),
> SPINAND_INFO("MX35LF2G24AD",
> SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x24),
> - NAND_MEMORG(1, 2048, 128, 64, 2048, 40, 1, 1, 1),
> + NAND_MEMORG(1, 2048, 128, 64, 2048, 40, 2, 1, 1),
> NAND_ECCREQ(8, 512),
> SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
> &write_cache_variants,
> &update_cache_variants),
> - 0,
> + SPINAND_HAS_QE_BIT,
> SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, NULL)),
> SPINAND_INFO("MX35LF4G24AD",
> SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x35),
> @@ -164,7 +164,7 @@ static int mx35lf1ge4ab_ecc_get_status(struct spinand_device *spinand,
> SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
> &write_cache_variants,
> &update_cache_variants),
> - 0,
> + SPINAND_HAS_QE_BIT,
> SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, NULL)),
> SPINAND_INFO("MX31LF1GE4BC",
> SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x1e),
> @@ -173,7 +173,7 @@ static int mx35lf1ge4ab_ecc_get_status(struct spinand_device *spinand,
> SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
> &write_cache_variants,
> &update_cache_variants),
> - 0 /*SPINAND_HAS_QE_BIT*/,
> + SPINAND_HAS_QE_BIT,
> SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout,
> mx35lf1ge4ab_ecc_get_status)),
> SPINAND_INFO("MX31UF1GE4BC",
> @@ -183,7 +183,7 @@ static int mx35lf1ge4ab_ecc_get_status(struct spinand_device *spinand,
> SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
> &write_cache_variants,
> &update_cache_variants),
> - 0 /*SPINAND_HAS_QE_BIT*/,
> + SPINAND_HAS_QE_BIT,
> SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout,
> mx35lf1ge4ab_ecc_get_status)),
>
>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
More information about the linux-mtd
mailing list