mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
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>
This commit is contained in:
parent
e1ff8802ac
commit
7845161ede
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user