From patchwork Sat Apr 29 08:52:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 9705735 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 6D71C602BF for ; Sat, 29 Apr 2017 08:53:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D2C7223A6 for ; Sat, 29 Apr 2017 08:53:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 51AD92843B; Sat, 29 Apr 2017 08:53:30 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID 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 C2C4A223A6 for ; Sat, 29 Apr 2017 08:53:29 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=TjE6J+d6AjaZIgvm59NAzJKgg7dNRHlTDnPbTAN4Ohs=; b=gxmXj4JJUDmRor5SP2YRxQGZaK ILyev1NsHU1HWIffNM4EhAxZ2+E94j1XiqKNZYRG+qnHonWnMj7zSimXzsoSL/mHAExaWuwtbxbWn /0IU0KJhK0TrQVaDQs/JmxCnnnI2sI3zVUa4ffhtUEffj409n6uiEnnt5eQAOgA6q+EZNOL3NBrCb 73kI8jLVM7SY44OgAzSOrD+j/6i5vo3qCE0C599kJkjLNVuWszXGFYmASU0wim9EHjiRN9lSS+U4T 3LZjfp74UYQCEEUYysnj4JyJwf8URT6GNMgU/4mQW4EAvnscuZSb7PXXc8x9nr8itPGP+FvHZMjFj tkliMXmA==; 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 1d4O87-0004KK-Vo; Sat, 29 Apr 2017 08:53: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 1d4O7u-0003si-DF; Sat, 29 Apr 2017 08:53:16 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id 69E2320C7C; Sat, 29 Apr 2017 10:52:54 +0200 (CEST) Received: from localhost (132.230.147.77.rev.sfr.net [77.147.230.132]) by mail.free-electrons.com (Postfix) with ESMTPSA id 0E027206E2; Sat, 29 Apr 2017 10:52:53 +0200 (CEST) From: Thomas Petazzoni To: Boris Brezillon , Marek Vasut , Richard Weinberger , Cyrille Pitchen , David Woodhouse , Brian Norris , linux-mtd@lists.infradead.org Subject: [PATCH v2 3/3] mtd: nand: fsmc: remove default timings Date: Sat, 29 Apr 2017 10:52:36 +0200 Message-Id: <1493455956-18362-4-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1493455956-18362-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1493455956-18362-1-git-send-email-thomas.petazzoni@free-electrons.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170429_015314_698405_258A83B3 X-CRM114-Status: GOOD ( 11.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Viresh Kumar , Linus Walleij , Shiraz Hashim , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP When timings are no longer provided by the Device Tree, we now use the SDR timings specified by the NAND flash, and such SDR timings are always provided. Therefore, it is no longer necessary to keep "default" timings in the fmsc driver. Signed-off-by: Thomas Petazzoni --- drivers/mtd/nand/fsmc_nand.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c index 442e4df..f58c912 100644 --- a/drivers/mtd/nand/fsmc_nand.c +++ b/drivers/mtd/nand/fsmc_nand.c @@ -303,26 +303,12 @@ static void fsmc_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl) * FSMC registers */ static void fsmc_nand_setup(struct fsmc_nand_data *host, - struct fsmc_nand_timings *timings) + struct fsmc_nand_timings *tims) { uint32_t value = FSMC_DEVTYPE_NAND | FSMC_ENABLE | FSMC_WAITON; uint32_t tclr, tar, thiz, thold, twait, tset; unsigned int bank = host->bank; void __iomem *regs = host->regs_va; - struct fsmc_nand_timings *tims; - struct fsmc_nand_timings default_timings = { - .tclr = FSMC_TCLR_1, - .tar = FSMC_TAR_1, - .thiz = FSMC_THIZ_1, - .thold = FSMC_THOLD_4, - .twait = FSMC_TWAIT_6, - .tset = FSMC_TSET_0, - }; - - if (timings) - tims = host->dev_timings; - else - tims = &default_timings; tclr = (tims->tclr & FSMC_TCLR_MASK) << FSMC_TCLR_SHIFT; tar = (tims->tar & FSMC_TAR_MASK) << FSMC_TAR_SHIFT;