summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/nand/raw/nand_base.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index d344dcb12620..2109fc223ff2 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -1272,11 +1272,13 @@ static int nand_setup_data_interface(struct nand_chip *chip, int chipnr)
if (!chip->setup_data_interface)
return 0;
- /* Change the mode on the chip side */
- ret = nand_set_features(chip, ONFI_FEATURE_ADDR_TIMING_MODE,
- tmode_param);
- if (ret)
- return ret;
+ /* Change the mode on the chip side (if supported by the NAND chip) */
+ if (nand_supports_set_get_features(chip)) {
+ ret = nand_set_features(chip, ONFI_FEATURE_ADDR_TIMING_MODE,
+ tmode_param);
+ if (ret)
+ return ret;
+ }
/* Change the mode on the controller side */
return chip->setup_data_interface(mtd, chipnr, &chip->data_interface);