From patchwork Mon Nov 11 17:10:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 3168641 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 570C4C045B for ; Mon, 11 Nov 2013 17:12:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AC2062020A for ; Mon, 11 Nov 2013 17:12:00 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 74047201E7 for ; Mon, 11 Nov 2013 17:11:59 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vfv1f-0004t3-Q9; Mon, 11 Nov 2013 17:11:47 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vfv1Z-0006vw-PP; Mon, 11 Nov 2013 17:11:41 +0000 Received: from comal.ext.ti.com ([198.47.26.152]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vfv1W-0006vC-M7; Mon, 11 Nov 2013 17:11:39 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id rABHAtF8027420; Mon, 11 Nov 2013 11:10:55 -0600 Received: from DNCE71.ent.ti.com (dnce71.ent.ti.com [137.167.131.20]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id rABHAscW001028; Mon, 11 Nov 2013 11:10:55 -0600 Received: from DNCE04.ent.ti.com ([fe80::50a2:cda3:1471:a76]) by DNCE71.ent.ti.com ([fe80::7d60:3983:a688:ea7d%20]) with mapi id 14.02.0342.003; Mon, 11 Nov 2013 18:10:54 +0100 From: "Khoronzhuk, Ivan" To: "Shilimkar, Santosh" , Rob Landley , Russell King Subject: [PATCH 10/12] mtd: nand: davinci: don't set timings if AEMIF is used Thread-Topic: [PATCH 10/12] mtd: nand: davinci: don't set timings if AEMIF is used Thread-Index: AQHO3vrjIGD+7RTiekG2UEZPLijDWpogQ8eQ Date: Mon, 11 Nov 2013 17:10:53 +0000 Message-ID: <4F5844B3A985794BA902E12C070812375F8D53@DNCE04.ent.ti.com> References: <1384187188-5776-1-git-send-email-ivan.khoronzhuk@ti.com>, <1384187188-5776-11-git-send-email-ivan.khoronzhuk@ti.com> In-Reply-To: <1384187188-5776-11-git-send-email-ivan.khoronzhuk@ti.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [157.170.170.56] x-exclaimer-md-config: f9c360f5-3d1e-4c3c-8703-f45bf52eff6b MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131111_121138_840787_CA0D0A6D X-CRM114-Status: UNSURE ( 9.08 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -6.9 (------) Cc: Mark Rutland , "devicetree@vger.kernel.org" , "Strashko, Grygorii" , Pawel Moll , Stephen Warren , Ian Campbell , Kumar Gala , Rob Herring , "linux-kernel@vger.kernel.org" , "linux-mtd@lists.infradead.org" , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If Davinci AEMIF is used we don't need to set timings and bus width. It is done by AEMIF driver (drivers/memory/davinci-aemfi.c). Signed-off-by: Ivan Khoronzhuk --- drivers/mtd/nand/davinci_nand.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) -- 1.7.9.5 diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c index 4705214..879e915 100644 --- a/drivers/mtd/nand/davinci_nand.c +++ b/drivers/mtd/nand/davinci_nand.c @@ -742,27 +742,35 @@ static int __init nand_davinci_probe(struct platform_device *pdev) goto err_clk_enable; } +#if !IS_ENABLED(CONFIG_TI_DAVINCI_AEMIF) /* - * Setup Async configuration register in case we did not boot from - * NAND and so bootloader did not bother to set it up. + * Setup Async configuration register in case we did not boot + * from NAND and so bootloader did not bother to set it up. */ - val = davinci_nand_readl(info, A1CR_OFFSET + info->core_chipsel * 4); + val = davinci_nand_readl(info, A1CR_OFFSET + + info->core_chipsel * 4); - /* Extended Wait is not valid and Select Strobe mode is not used */ + /* + * Extended Wait is not valid and Select Strobe mode is not + * used + */ val &= ~(ACR_ASIZE_MASK | ACR_EW_MASK | ACR_SS_MASK); if (info->chip.options & NAND_BUSWIDTH_16) val |= 0x1; - davinci_nand_writel(info, A1CR_OFFSET + info->core_chipsel * 4, val); + davinci_nand_writel(info, A1CR_OFFSET + + info->core_chipsel * 4, val); ret = 0; if (info->timing) - ret = davinci_aemif_setup_timing(info->timing, info->base, - info->core_chipsel); + ret = davinci_aemif_setup_timing(info->timing, + info->base, + info->core_chipsel); if (ret < 0) { dev_dbg(&pdev->dev, "NAND timing values setup fail\n"); goto err; } +#endif spin_lock_irq(&davinci_nand_lock);