diff options
| author | Miquel Raynal <miquel.raynal@bootlin.com> | 2026-03-26 19:47:16 +0300 |
|---|---|---|
| committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2026-05-04 16:27:03 +0300 |
| commit | 7845161edef8008710230efea3839757d0b03d25 (patch) | |
| tree | fbfd1d4e14ea0b9c7a52764879326aa15fa71f26 | |
| parent | e1ff8802ac57a917bca50dcabaf5ea78d8cd407f (diff) | |
| download | linux-7845161edef8008710230efea3839757d0b03d25.tar.xz | |
mtd: spinand: Make sure continuous read is always disabled during probe
Recent changes made sure whenever we were using continuous reads, we
would first start by disabling the feature to ensure a well proven and
stable probe sequence. For development purposes, it might also matter to
make sure we always disable continuous reads at first, in case the ECC
configuration would change. Doing this "automatically" will become even
more relevant when we add extra controller flags to prevent continuous
reads at all.
Ensure we disable continuous reads if the feature is available on the
chip, regardless of whether it will be used or not.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
| -rw-r--r-- | drivers/mtd/nand/spi/core.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index 99a2494554ef..1d631054bb24 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -967,11 +967,7 @@ static void spinand_cont_read_init(struct spinand_device *spinand) enum nand_ecc_engine_type engine_type = nand->ecc.ctx.conf.engine_type; /* OOBs cannot be retrieved so external/on-host ECC engine won't work */ - if (spinand->set_cont_read && - (engine_type == NAND_ECC_ENGINE_TYPE_ON_DIE || - engine_type == NAND_ECC_ENGINE_TYPE_NONE)) { - spinand->cont_read_possible = true; - + if (spinand->set_cont_read) { /* * Ensure continuous read is disabled on probe. * Some devices retain this state across soft reset, @@ -979,6 +975,10 @@ static void spinand_cont_read_init(struct spinand_device *spinand) * in false positive returns from spinand_isbad(). */ spinand_cont_read_enable(spinand, false); + + if (engine_type == NAND_ECC_ENGINE_TYPE_ON_DIE || + engine_type == NAND_ECC_ENGINE_TYPE_NONE) + spinand->cont_read_possible = true; } } |
