From patchwork Sat Nov 11 21:24:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ladislav Michl X-Patchwork-Id: 837085 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="febFUuOE"; dkim-atps=neutral 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 3yZ8zm6tnkz9t2m for ; Sun, 12 Nov 2017 08:24:20 +1100 (AEDT) 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6ODcuiowtKywPJ4LKDXt0IE0ez3AeFILmGo3spbzkCE=; b=febFUuOEFNZbSG rzL+ZTwJNX4AEqT+sor1HlWCNEITThc3358vTkiMaAcQ7/H7VVi4nzEu6Vkks7XVmFUOaw5a7SSHl aI78MMLtIRtT3cftCHI1wz5DelzSduXp/2wRKgQIRn/RnR69iFnsCx2vwcsprNZoinY4RJjsuBMQo yEDUd3GfYgnpVPI+dfwFLNRbndmDGpm9UKxk+PHBe8bguGq4hTbMS+ocIUx2yTGb38hs2539mEzgu WK1xHtgF2wAxxeMP7Yt1JuhkZPPYCdo+We5VlRdu4Knj8qBPJ1T09eoJRcwqQad0O2yxNL5zommDv jLKR24dWbtnhbrpZ4ipQ==; 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 1eDdG8-0000W3-0r; Sat, 11 Nov 2017 21:24:12 +0000 Received: from eddie.linux-mips.org ([148.251.95.138] helo=cvs.linux-mips.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eDdG4-0004uQ-DY for linux-mtd@lists.infradead.org; Sat, 11 Nov 2017 21:24:10 +0000 Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23990633AbdKKVYIG3IhB (ORCPT ); Sat, 11 Nov 2017 22:24:08 +0100 Date: Sat, 11 Nov 2017 22:24:06 +0100 From: Ladislav Michl To: linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org Subject: [PATCH v4 11/16] mtd: onenand: omap2: Do not make delay for GPIO OMAP3 specific Message-ID: <20171111212406.lgqpj57o4ckxbx4i@lenoch> References: <20171111211206.465pgorrjp3eyix6@lenoch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20171111211206.465pgorrjp3eyix6@lenoch> User-Agent: NeoMutt/20170113 (1.7.2) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171111_132408_892169_B36B9FF0 X-CRM114-Status: GOOD ( 10.57 ) 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 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [148.251.95.138 listed in list.dnswl.org] -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] 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines 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: Tony Lindgren , Peter Ujfalusi , Kyungmin Park , Boris Brezillon , Roger Quadros Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Second commit in driver history (782b7a367d81: "[MTD] [OneNAND] OMAP3: add delay for GPIO") added quirk for waiting until GPIO line settle. As DMA was disabled for OMAP2 boards, chances are this problem was not OMAP3 specific and as it is just one register read, previous test for SoC type is approximately as expensive as read itself. Make delay unconditional, which allows removing SoC specific code alltogether. Signed-off-by: Ladislav Michl Acked-by: Roger Quadros Reviewed-by: Sebastian Reichel --- Changes: -v3: new patch -v4: none drivers/mtd/onenand/omap2.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c index c9ff67100ef4..e4857a41760d 100644 --- a/drivers/mtd/onenand/omap2.c +++ b/drivers/mtd/onenand/omap2.c @@ -57,7 +57,6 @@ struct omap2_onenand { struct dma_chan *dma_chan; int freq; int (*setup)(void __iomem *base, int *freq_ptr); - u8 flags; }; static void omap2_onenand_dma_complete_func(void *completion) @@ -148,9 +147,8 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state) if (!(syscfg & ONENAND_SYS_CFG1_IOBE)) { syscfg |= ONENAND_SYS_CFG1_IOBE; write_reg(c, syscfg, ONENAND_REG_SYS_CFG1); - if (c->flags & ONENAND_IN_OMAP34XX) - /* Add a delay to let GPIO settle */ - syscfg = read_reg(c, ONENAND_REG_SYS_CFG1); + /* Add a delay to let GPIO settle */ + syscfg = read_reg(c, ONENAND_REG_SYS_CFG1); } reinit_completion(&c->irq_done); @@ -470,7 +468,6 @@ static int omap2_onenand_probe(struct platform_device *pdev) init_completion(&c->irq_done); init_completion(&c->dma_done); - c->flags = pdata->flags; c->gpmc_cs = pdata->cs; c->gpio_irq = pdata->gpio_irq; if (pdata->dma_channel < 0) {