From patchwork Thu Jul 13 19:20:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 787954 X-Patchwork-Delegate: boris.brezillon@free-electrons.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x7m1Q0Z8Kz9s7m for ; Fri, 14 Jul 2017 05:22:50 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lBQtARsf"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=+sXdoe4P/u8D3ghw/aTmoYWXSU1gnx+DnabUkdd+GWk=; b=lBQ tARsfoZDd/rVezNgefi19QTAimk3h1Y+4+u2U2x6BdmVQ7V01Up0tEbkY1v+rQ0hEcg5NaMgeu0Iq eBHzOnmR7n1kuIlyfI9dno0/t/jFXtjWYRmvfAyqNl74Hv1F5QBA0k0OgiOn3xbOEyJY+ch9b+wdE qcpzg1W3wtJ2UrowIyeGVpdKUQ65ognQjAtuDbYYLmf5VZmGGlJ3MDcD7Y9jeQY3Xh6VX7NOO+Ogr KyOAlRpqIjPcMzyIgK7huMjOB3PeYYKUlvPl/4UDzIhh90akgMs6rqIzeF2FQaTEMcH1QyTtfYN/L w8d7iN0IdkzkCskLOJoc8tocFuxVGDg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dVjgx-0000Dv-5B; Thu, 13 Jul 2017 19:22:27 +0000 Received: from mail.free-electrons.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dVjgs-0000Az-Vx for linux-mtd@lists.infradead.org; Thu, 13 Jul 2017 19:22:25 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id 9429021D81; Thu, 13 Jul 2017 21:21:58 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost.localdomain (unknown [91.224.148.103]) by mail.free-electrons.com (Postfix) with ESMTPSA id C1BD621E2E; Thu, 13 Jul 2017 21:21:31 +0200 (CEST) From: Miquel Raynal To: han.xu@nxp.com, boris.brezillon@free-electrons.com, richard@nod.at, linux-mtd@lists.infradead.org Subject: [PATCH] mtd: gpmi-nand: do not fail setting ONFI timing mode if available Date: Thu, 13 Jul 2017 21:20:30 +0200 Message-Id: <20170713192030.22177-1-miquel.raynal@free-electrons.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170713_122223_216978_CD3D3E53 X-CRM114-Status: GOOD ( 11.04 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: cyrille.pitchen@wedev4u.fr, linux-kernel@vger.kernel.org, marek.vasut@gmail.com, Miquel Raynal , computersforpeace@gmail.com, dwmw2@infradead.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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 --- 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. */