Message ID | 1395735604-26706-13-git-send-email-lee.jones@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBDA7X7F2WUEBB44BYWMQKGQEUQ4MJLY@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C32CD20062 for <linaro@patches.linaro.org>; Tue, 25 Mar 2014 08:40:20 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id to1sf486987ieb.5 for <linaro@patches.linaro.org>; Tue, 25 Mar 2014 01:40:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=RzljgRadOKWYTyiXpT8QGpeceiohdZGSHdvkmCfjFB0=; b=hAVS7DWBEmvuDxPtfO3udT/R7mq4MtRJdJxEEVBvsLOw7hz26CA0RGcJ4cvapQ8YYH MfXWs15bTNbzwzE6PmcMfnloIVNlnXWGEi5QphGlOa0q655w1yJZQd7nVQ8L8LwVTMxP 9aPhsSwtprJFi7+fG2aKPk9uWNYA3/2f2O7zRg6+wPtfCFYeq8/GIIS/STHsq5WiDXLZ Y9fxA/SxWqwUpgbk02Q1epeYNyH1rznT52bHkcER8X2GjDA/SzC3Gq87atV6RsNqbuWO 5xUgP+nsiqFVb9tMKSm/77MD+mQALAE649PQoReAc/bMF0O55I05gosfRqkpDcZMBVGv 7rpQ== X-Gm-Message-State: ALoCoQmaB5X0i393GclYN9Etlujc5XmqDUo9T8avA8ybdrSiZu2LDVGaN51LYcVU+dmL1mRRgc6h X-Received: by 10.50.50.2 with SMTP id y2mr2852338ign.1.1395736820044; Tue, 25 Mar 2014 01:40:20 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.30.8 with SMTP id c8ls127600qgc.56.gmail; Tue, 25 Mar 2014 01:40:19 -0700 (PDT) X-Received: by 10.220.96.70 with SMTP id g6mr9306699vcn.19.1395736819903; Tue, 25 Mar 2014 01:40:19 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id d12si3549676vco.83.2014.03.25.01.40.19 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Mar 2014 01:40:19 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id hu19so150638vcb.15 for <patchwork-forward@linaro.org>; Tue, 25 Mar 2014 01:40:19 -0700 (PDT) X-Received: by 10.52.18.70 with SMTP id u6mr46979758vdd.11.1395736819822; Tue, 25 Mar 2014 01:40:19 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp286343vck; Tue, 25 Mar 2014 01:40:19 -0700 (PDT) X-Received: by 10.180.36.226 with SMTP id t2mr5720728wij.37.1395736818362; Tue, 25 Mar 2014 01:40:18 -0700 (PDT) Received: from casper.infradead.org (casper.infradead.org. [85.118.1.10]) by mx.google.com with ESMTPS id u13si2049398wie.14.2014.03.25.01.40.18 for <patch@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Mar 2014 01:40:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 85.118.1.10 as permitted sender) client-ip=85.118.1.10; Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WSMt3-0008A1-GX; Tue, 25 Mar 2014 08:39:10 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WSMsc-0003LI-5m; Tue, 25 Mar 2014 08:38:42 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WSMrc-00036r-HT for linux-mtd@merlin.infradead.org; Tue, 25 Mar 2014 08:37:40 +0000 Received: from mail-wg0-f43.google.com ([74.125.82.43]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WSMbX-0007H7-RX for linux-mtd@lists.infradead.org; Tue, 25 Mar 2014 08:21:04 +0000 Received: by mail-wg0-f43.google.com with SMTP id x13so79946wgg.14 for <linux-mtd@lists.infradead.org>; Tue, 25 Mar 2014 01:20:40 -0700 (PDT) X-Received: by 10.180.96.66 with SMTP id dq2mr19985208wib.54.1395735640374; Tue, 25 Mar 2014 01:20:40 -0700 (PDT) Received: from lee--X1.home (host109-148-113-193.range109-148.btcentralplus.com. [109.148.113.193]) by mx.google.com with ESMTPSA id k4sm5567676wib.19.2014.03.25.01.20.38 for <multiple recipients> (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Mar 2014 01:20:39 -0700 (PDT) From: Lee Jones <lee.jones@linaro.org> To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [RFC 12/47] mtd: nand: stm_nand_bch: scan for NAND devices Date: Tue, 25 Mar 2014 08:19:29 +0000 Message-Id: <1395735604-26706-13-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1395735604-26706-1-git-send-email-lee.jones@linaro.org> References: <1395735604-26706-1-git-send-email-lee.jones@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140325_082103_907533_6D67A517 X-CRM114-Status: GOOD ( 11.23 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on casper.infradead.org summary: Content analysis details: (-2.6 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.43 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: angus.clark@st.com, kernel@stlinux.com, lee.jones@linaro.org, linux-mtd@lists.infradead.org, pekon@ti.com, computersforpeace@gmail.com, dwmw2@infradead.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe> MIME-Version: 1.0 Sender: "linux-mtd" <linux-mtd-bounces@lists.infradead.org> Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
diff --git a/drivers/mtd/nand/stm_nand_bch.c b/drivers/mtd/nand/stm_nand_bch.c index e1ebf92..1de13bd 100644 --- a/drivers/mtd/nand/stm_nand_bch.c +++ b/drivers/mtd/nand/stm_nand_bch.c @@ -374,6 +374,7 @@ static int stm_nand_bch_probe(struct platform_device *pdev) struct nandi_info *info; struct nand_chip *chip; struct mtd_info *mtd; + int err; if (!pdata) { dev_err(&pdev->dev, "no platform data found\n"); @@ -403,6 +404,10 @@ static int stm_nand_bch_probe(struct platform_device *pdev) nandi_set_mtd_defaults(nandi, mtd, chip); + err = nand_scan_ident(mtd, 1, NULL); + if (err) + return err; + return 0; } @@ -410,6 +415,8 @@ static int stm_nand_bch_remove(struct platform_device *pdev) { struct nandi_controller *nandi = platform_get_drvdata(pdev); + nand_release(&nandi->info.mtd); + nandi_clk_disable(nandi); return 0;
Use the core nand_scan_ident() routine to locate connected NAND chips. Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/mtd/nand/stm_nand_bch.c | 7 +++++++ 1 file changed, 7 insertions(+)