From patchwork Fri Sep 15 12:44:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 112735 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp575782qgf; Fri, 15 Sep 2017 05:47:40 -0700 (PDT) X-Google-Smtp-Source: ADKCNb4ecFD5nyi86GbJDDDa+d439dCsBoOk2T9cgAwPSrXEXjI085vfYWVS5TIxze5Efo0dS+Dn X-Received: by 10.80.165.141 with SMTP id a13mr19291722edc.200.1505479660176; Fri, 15 Sep 2017 05:47:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505479660; cv=none; d=google.com; s=arc-20160816; b=McrNU6pHrI8tAmxGrWYoYxRC6b/rZEMs5I6ZXple9h7vBkTPECWYdQxuu8zJ22uhuj 9HZuLWrUqcJXP1uKgU9rmZVzthT6uDgj5Dnlyc8DysMkyGm3jbtLz4pu721CAAd940Z3 K/A4ghbB5DJre6KglkZyc5rKKPQvx5GWQDKtoZ5vUj1gK5E1uJ192Pncd67aHMuAkiyZ r5kPBOPJ9hAjK3IoOwgRAqCI1ogYNQ9EjhEM3mOuyalQkLvzNNL2VYmE/8hWzOVGNRC/ uvCped/RB/c4mbxY7RzT9QIEvwtKvUhbBy8SiTWBl4F3koPEwR048WesWYzmKp/2rmX7 81QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from :dkim-signature:dkim-filter:arc-authentication-results; bh=oTI4RU+ee7kkT7s6JJ6Z4AjGUiNzthjcWs9QtUgbC44=; b=FeTOzGO+Sp8Z7k5iW7vJoataZN1O+uNwJtAAQX1fCjMXLZhLYzcFYmP6BWNVl0cJHo GPlLa9N/REELhNbP05528MeTAOo6NqgfewvQ0ECFGeuQEDiVyjyIbD9zrhwaBOqDbFyX rFwEdTKsjGlIr95J+yFEOvipc+/AiW5lqqWk4CErJUkfjtl+LyrP8EnNOIILJuhAfwxp XNBuBg9NsGnGQo+xwyKr7BXABjYl+RgPEH3vndGr/vAyz8n2mSEZDqe5B+2Nl5xNz459 F5iCyg7M4f06Ngxvn/Em+4npn85YuWb9KgWD+QifV2gBI4ZuyjDHh03NoxIeV4cLvYzV 6xsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=hCgVle38; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id q7si1176542edk.133.2017.09.15.05.47.39; Fri, 15 Sep 2017 05:47:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=hCgVle38; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id A3249C22012; Fri, 15 Sep 2017 12:46:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 7406BC2200A; Fri, 15 Sep 2017 12:46:22 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DF1D2C2200B; Fri, 15 Sep 2017 12:45:29 +0000 (UTC) Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) by lists.denx.de (Postfix) with ESMTPS id 06022C21EED for ; Fri, 15 Sep 2017 12:45:28 +0000 (UTC) Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id v8FCj4JI012431; Fri, 15 Sep 2017 21:45:05 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com v8FCj4JI012431 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1505479505; bh=CZVq8HTXVSQqZxlwJXlPw6AMAiWrfywFh9qrMTeaczw=; h=From:To:Cc:Subject:Date:From; b=hCgVle38sVBndsa5DCrqW1reZxnItoRAJWn4XEAT6D2Mwye5DtcGhj7k/5Bm5d0vo /tI4omfV7GKMIJHVPTKMeechfZCzu/FHMMFBze5bW49FMJQMJkbPznU3xWBYuwu6Gw 0tDahYW3gfDQglrVmhmrpwdPKTAKau2egXCdRR1gZKSJijW1sZCgLW0KnBlyHNK03q gCNhJYoeTuw2p/m87iG65HvFtdfE+gcXEUtbaPaiyKUcUARO0CgVPem1xXUIlV/NCK IY6BnzwlNIlczRZS9r0pfpnefXK1pMQ2zoMiIXwvJfqGbLf+bEUDuwXZHQhTb7ibh8 QLSjZ0lNmgaew== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Fri, 15 Sep 2017 21:44:58 +0900 Message-Id: <1505479499-2862-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Cc: Scott Wood , Scott Wood Subject: [U-Boot] [PATCH 1/2] mtd: nand: do not check R/B# for CMD_READID in nand_command(_lp) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Read ID (0x90) command does not toggle the R/B# pin. Without this patch, NAND_CMD_READID falls into the default: label, then R/B# is checked by chip->dev_ready(). [masahiro: import Linux commit 3158fa0e739615769cc047d2428f30f4c3b6640e] Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon --- drivers/mtd/nand/nand_base.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 3f1b3a7..776c20f 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -651,6 +651,7 @@ static void nand_command(struct mtd_info *mtd, unsigned int command, case NAND_CMD_ERASE2: case NAND_CMD_SEQIN: case NAND_CMD_STATUS: + case NAND_CMD_READID: return; case NAND_CMD_RESET: @@ -748,6 +749,7 @@ static void nand_command_lp(struct mtd_info *mtd, unsigned int command, case NAND_CMD_SEQIN: case NAND_CMD_RNDIN: case NAND_CMD_STATUS: + case NAND_CMD_READID: return; case NAND_CMD_RESET: From patchwork Fri Sep 15 12:44:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 112734 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp575268qgf; Fri, 15 Sep 2017 05:47:07 -0700 (PDT) X-Google-Smtp-Source: AOwi7QB4EuEAHPj8sz0Ec/NZrG/hfE+3R4MQusdX6g2MajxPPYlHLK8YSSxU7BJAWt3V7JfXoi8P X-Received: by 10.80.222.8 with SMTP id z8mr4961491edk.214.1505479627271; Fri, 15 Sep 2017 05:47:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505479627; cv=none; d=google.com; s=arc-20160816; b=F5BlNILMCZmOCk8sJ9NsQcgAnYBxRgsrgdc5YADYwhIwblDUE/4+t2ODoxdZWyNBE7 X84Lp+7626rH5jUrSP2tkiEoSGyzdYFJmL1mPu3KUTu4ZTDn1FfkDWCyZL9q/fS4CWGJ zt10P9tzOZVCiGyB9HAqQRSudk/YPAJkgLTVQcTgtIxqrvnIFbRNz+sjPdiU4tygUhz/ zIPUgiewV+WcuD//4vzcOAPzlVwvsnLsIqxx3NTwANX0fH7HE9Ip4KAyEyuuPJMtXuvl YTfMDqnjcGy3ywiU55ltEUJJI9Xylgmtj/TX6RVVj3sdndYqc6dfh04+jarK6jwwVGK0 8aJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:dkim-filter:arc-authentication-results; bh=5HJfUbFlppeIZU9V9ebMU/jZccmihqmnYdX2xl8XKuA=; b=kYuLrllUzkfUTX4h/UMynlZg3Hn32HCutO9BX2rjTFOL1v26RNtPBikx7VE6R3kfxu X4Ik+5gpG19p09eQrhCYbK81kQkl4Pxt2chry12JVrmRPGo5Utp1sMGMlzgXdnfkVC9Q SaPMZGd7lwpV8nZfqzha0pzmoL3hYljZskjP8YYI5+oJ1Ad/ZW5U1ci0vw+qmExBGgC4 NtNvoZ2k/69zl4rn6k8y/ma/ErfctKIuT8OF5gcNbHd/V/WeJV9WwgLMLqyfvItYKwIf 8H5D3wkUPqd9H4J/x2uL7ejxJ2Sd6zpQ/+tzQpps8LNN1/W9gag9oQ7f9s8SEddCnAgw tC4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=ZzyCsOyN; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id d90si1202159edd.470.2017.09.15.05.47.06; Fri, 15 Sep 2017 05:47:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=ZzyCsOyN; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id D430CC22015; Fri, 15 Sep 2017 12:46:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 374A9C21F73; Fri, 15 Sep 2017 12:46:07 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 459C4C21E7C; Fri, 15 Sep 2017 12:45:30 +0000 (UTC) Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) by lists.denx.de (Postfix) with ESMTPS id E9437C21FF5 for ; Fri, 15 Sep 2017 12:45:29 +0000 (UTC) Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id v8FCj4JJ012431; Fri, 15 Sep 2017 21:45:05 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com v8FCj4JJ012431 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1505479506; bh=jeL/UlVnRVjrpcW10QIc5cR+TdE2SD0Twiv/TYvYlgw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZzyCsOyNUGjNM0JnM4srN3PPFkokcVasJQbmylzAZkLk92yXTTkTw1YKQIe0/qlFd F5gAEjt2jcUuj1kCSHlvypJcraBxC6h/F+LdvXXgjNnwpbvo1GmXcokfQPjRQSfzOI rbmzAJ2vjq/Eb06agQegPtIS9IhCHHlJEbjcuxzOI6UsjtTmHoOkT47N+blZHm+fsw DLdV2yxTMgqhOiGnbn6a0UTmcXOSEa43/juuR+Te6pCytQZqEzipmVSgos5DFTwDAn OkSuh5jHqMOjOP4JO67/nJsC5tmRDjXnBeuvZcmMPhf4MX3IcjKY1plPdZRHIVW21d COcr/MS0HsrLw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Fri, 15 Sep 2017 21:44:59 +0900 Message-Id: <1505479499-2862-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505479499-2862-1-git-send-email-yamada.masahiro@socionext.com> References: <1505479499-2862-1-git-send-email-yamada.masahiro@socionext.com> Cc: Scott Wood , Scott Wood Subject: [U-Boot] [PATCH 2/2] mtd: nand: do not check R/B# for CMD_SET_FEATURES in nand_command(_lp) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Set Features (0xEF) command toggles the R/B# pin after 4 sub feature parameters are written. Currently, nand_command(_lp) calls chip->dev_ready immediately after the address cycle because NAND_CMD_SET_FEATURES falls into default: label. No wait is needed at this point. If you see nand_onfi_set_features(), R/B# is already cared by the chip->waitfunc call. [masahiro: import Linux commit c5d664aa5a4c4b257a54eb35045031630d105f49] Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon --- drivers/mtd/nand/nand_base.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 776c20f..a95134c 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -652,6 +652,7 @@ static void nand_command(struct mtd_info *mtd, unsigned int command, case NAND_CMD_SEQIN: case NAND_CMD_STATUS: case NAND_CMD_READID: + case NAND_CMD_SET_FEATURES: return; case NAND_CMD_RESET: @@ -750,6 +751,7 @@ static void nand_command_lp(struct mtd_info *mtd, unsigned int command, case NAND_CMD_RNDIN: case NAND_CMD_STATUS: case NAND_CMD_READID: + case NAND_CMD_SET_FEATURES: return; case NAND_CMD_RESET: