Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1686857

[PATCH] mtd: gpmi-nand: do not fail setting ONFI timing mode if available

From Miquel Raynal <miquel.raynal@free-electrons.com>
Newsgroups linux.kernel
Subject [PATCH] mtd: gpmi-nand: do not fail setting ONFI timing mode if available
Date 2017-07-13 21:30 +0200
Message-ID <u2RYd-1gM-7@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


GPMI NFC driver fails to apply timing mode if the ->onfi_get_features()
does not return the mode that was previously applied.

We can assume that a nand chip supports a timing as long as it is
read from the ONFI parameter page. Reading back a different mode than
the one previously applied does not mean the mode is unsupported but
that the nand chip does not implement the ONFI feature because it
probably does not need to.

The output of ->onfi_get_feature() is irrelevant so delete it.

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 drivers/mtd/nand/gpmi-nand/gpmi-lib.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
index 141bd70a49c2..4d137145439c 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
@@ -939,13 +939,6 @@ static int enable_edo_mode(struct gpmi_nand_data *this, int mode)
 	if (ret)
 		goto err_out;
 
-	/* [2] send GET FEATURE command to double-check the timing mode */
-	memset(feature, 0, ONFI_SUBFEATURE_PARAM_LEN);
-	ret = nand->onfi_get_features(mtd, nand,
-				ONFI_FEATURE_ADDR_TIMING_MODE, feature);
-	if (ret || feature[0] != mode)
-		goto err_out;
-
 	nand->select_chip(mtd, -1);
 
 	/* [3] set the main IO clock, 100MHz for mode 5, 80MHz for mode 4. */
-- 
2.11.0

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] mtd: gpmi-nand: do not fail setting ONFI timing mode if available Miquel Raynal <miquel.raynal@free-electrons.com> - 2017-07-13 21:30 +0200
  Re: [PATCH] mtd: gpmi-nand: do not fail setting ONFI timing mode if  available Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-07-13 22:20 +0200
    Re: [PATCH] mtd: gpmi-nand: do not fail setting ONFI timing mode if  available Han Xu <han.xu@nxp.com> - 2017-07-14 17:00 +0200
      Re: [PATCH] mtd: gpmi-nand: do not fail setting ONFI timing mode if  available Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-07-14 19:40 +0200
        Re: [PATCH] mtd: gpmi-nand: do not fail setting ONFI timing mode if  available Miquel RAYNAL <miquel.raynal@free-electrons.com> - 2017-07-15 13:00 +0200
          Re: [PATCH] mtd: gpmi-nand: do not fail setting ONFI timing mode if  available Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-07-15 14:50 +0200

csiph-web