From patchwork Wed Nov 1 06:19:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: xiaolei li X-Patchwork-Id: 10035919 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1AE18600C5 for ; Wed, 1 Nov 2017 06:20:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03948285C8 for ; Wed, 1 Nov 2017 06:20:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB62B285E5; Wed, 1 Nov 2017 06:20:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8FD57285C8 for ; Wed, 1 Nov 2017 06:20:41 +0000 (UTC) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=/b0ULitUDEDPsryooerILj0o4fE3bIMlvidPpnsHJ+M=; b=XO6kgQaOiGU6NE J9gKOH/qxlTEPgjV+BmqdDa4A5v58o3lW/RM0e0l6nT5MgG6f778OLjF/HDiewhOT8BP1PivXFQHJ 3wjfBfxrT/Vm3j8DfbPwHpqDF9TQ87xcqBMTM4OvAy8E30xlR5PmcDzKIXijxaCd35ty3JnwIgfcL BG9ogZJOyhYHdygGJ1UlGtTzrgL7ALA5krFq/x5ahXkST3Fn/GuBuAQ8eSPBtXb2tH9xiNebFwmDU 7ijgva1EAdn+fmnM2Dk9uQcS6cIkNNISWWvNCazxdhGaE6AW9S2h6DOno1WbZ4jTvTk/ngEfZ8Ozb MvTnNrmCzpDakhUyGxuQ==; 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 1e9mOG-0008II-8Y; Wed, 01 Nov 2017 06:20:40 +0000 Received: from [210.61.82.184] (helo=mailgw02.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e9mOD-0007ye-0z; Wed, 01 Nov 2017 06:20:38 +0000 X-UUID: 825b88bb22ce416387b2f78f2192b859-20171101 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 339851179; Wed, 01 Nov 2017 14:20:00 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs03n2.mediatek.inc (172.21.101.182) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Wed, 1 Nov 2017 14:19:58 +0800 Received: from mtkslt306.mediatek.inc (10.21.14.136) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Wed, 1 Nov 2017 14:19:58 +0800 From: To: , Subject: [PATCH] mtd: nand: mtk: deselect the chip that was selected in resume function Date: Wed, 1 Nov 2017 14:19:57 +0800 Message-ID: <1509517197-60350-1-git-send-email-xiaolei.li@mediatek.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171031_232037_224200_BE4C7528 X-CRM114-Status: GOOD ( 11.16 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: srv_heupstream@mediatek.com, bayi.cheng@mediatek.com, linux-mtd@lists.infradead.org, linux-mediatek@lists.infradead.org, xiaolei.li@mediatek.com, dwmw2@infradead.org, rogercc.lin@mediatek.com Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Xiaolei Li It is necessary to deselect the chip if it was selected before. But now we only select chips when resume nand driver. So, deselect the chip after doing nand reset. Signed-off-by: Xiaolei Li --- drivers/mtd/nand/mtk_nand.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c index d86a7d1..a8bf61a 100644 --- a/drivers/mtd/nand/mtk_nand.c +++ b/drivers/mtd/nand/mtk_nand.c @@ -1557,6 +1557,7 @@ static int mtk_nfc_resume(struct device *dev) for (i = 0; i < chip->nsels; i++) { nand->select_chip(mtd, i); nand->cmdfunc(mtd, NAND_CMD_RESET, -1, -1); + nand->select_chip(mtd, -1); } }