Skip to content

Commit 34c5c01

Browse files
miquelraynalBoris Brezillon
authored andcommitted
mtd: rawnand: macronix: nack the support of changing timings for one chip
The MX30LF2G18AC chip declares in its parameter page supporting SET/GET_FEATURES but when it comes to timings, experience shows that it is not the case. Unflag this feature for this particular chip in the nand_parameters structure to avoid unnecessary errors and downturns. Signed-off-by: Miquel Raynal <[email protected]> Signed-off-by: Boris Brezillon <[email protected]>
1 parent 789157e commit 34c5c01

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

drivers/mtd/nand/raw/nand_macronix.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,19 @@ static int macronix_nand_init(struct nand_chip *chip)
2222
if (nand_is_slc(chip))
2323
chip->bbt_options |= NAND_BBT_SCAN2NDPAGE;
2424

25+
/*
26+
* MX30LF2G18AC chip does not support using SET/GET_FEATURES to change
27+
* the timings unlike what is declared in the parameter page. Unflag
28+
* this feature to avoid unnecessary downturns.
29+
*/
30+
if (chip->parameters.supports_set_get_features &&
31+
!strcmp("MX30LF2G18AC", chip->parameters.model)) {
32+
bitmap_clear(chip->parameters.get_feature_list,
33+
ONFI_FEATURE_ADDR_TIMING_MODE, 1);
34+
bitmap_clear(chip->parameters.set_feature_list,
35+
ONFI_FEATURE_ADDR_TIMING_MODE, 1);
36+
}
37+
2538
return 0;
2639
}
2740

0 commit comments

Comments
 (0)