Message ID | 1490213273-8571-24-git-send-email-yamada.masahiro@socionext.com |
---|---|
State | Accepted |
Delegated to: | Boris Brezillon |
Headers | show
Return-Path: <linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3vpLnZ53Tvz9s7v for <incoming@patchwork.ozlabs.org>; Thu, 23 Mar 2017 07:26:58 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NJr8x+64"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="AhGDjlKF"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="tX8nqjDt"; dkim-atps=neutral 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=kxUZr+lQE/23bWMVsWEaGMob3wWKCOm2hPnPDZDQOeI=; b=NJr8x+64MxFKyDYs+GokqAg14z 4dqeBwqOL1SGxYclVr8ygWwRWMDCuBZMVII4cMaofjXKcFBYmDY9Wo1/PESJ/fuRbSSsHA4LROG+Y R3m0KlqoQvqvk7VmlPQWf1yt0iQwfqTBPR5+ieBnUoLa87vqFyYwIV/vYLOBeWc/Tdl4MnYA0FePh caRbY2YMuAmB37liJHQKh3qUhBwzMUp7T6+DArDJogqxQoUGNxMjSoe4yxgHEFbiR+qHtVLRm7ojU 95j53nfqVFNuqoe19jRuZYSQhQthAk3i9usfDCfTHQYwCJbvSB6WvA0w6sF4CdEDp6kly77BBKsqL QDEhjCMQ==; 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 1cqmqK-00064B-10; Wed, 22 Mar 2017 20:26:52 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cqmpo-000555-J6 for linux-mtd@bombadil.infradead.org; Wed, 22 Mar 2017 20:26:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=lJjun7m07Up94XhckEfI9LGZQhK6861r5EIlvWfOCpk=; b=AhGDjlKFlIdWSqjYltT182nim fqGflIgdq0NKfsT8tx2Zw8kwAG5ClE8Lvhtiq9phEcF95SFdeHSS9FtUM9mflJTRsD+GQx3cIpqZQ PaMJJMP3K5h0W10KduCObbONrPJs0U5jxuXxBurDCSihakYmaeJy4wBN6SPBQpwM/bOr+IuSPs0uk obbmAVbd67EVIRejdguRAi2W8hygHKCHK6vePVsmIXutgnUETQUYUA3jxnLnNB3/LEwFqd02Eqjir gPNIXbnS6mU9EyBQKqMRvCBC1LtW0w50nbL9nI5bJy/+o2xaaVRxQHeBgzbqq8GaLmnovV4Rf3K9L CyAcjg3RQ==; Received: from conuserg-07.nifty.com ([210.131.2.74]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cqmZx-0008Li-S7 for linux-mtd@lists.infradead.org; Wed, 22 Mar 2017 20:10:04 +0000 Received: from grover.sesame (FL1-111-169-71-157.osk.mesh.ad.jp [111.169.71.157]) (authenticated) by conuserg-07.nifty.com with ESMTP id v2MK896D029452; Thu, 23 Mar 2017 05:08:47 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com v2MK896D029452 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1490213328; bh=lJjun7m07Up94XhckEfI9LGZQhK6861r5EIlvWfOCpk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tX8nqjDtkzjdRzDjHJmBEexHmpzZsMPfXmmR0KuJhsaMupYgIEA32ZKe8T81iLGYQ O8PeepUQc7g0qNZghpJ7B8Gl7U4t3dcbN1J577P2LgU3hJ4F6/SFM55/wGpNiAGLKN YTmwe129MzIl4xDoMaFa2YTN0sOoNBg4q5Cc4CznaEEMBtvUp5lA4CrIedImA4QB8k Y6vT/de5MymFIMwdKQ6/wOcOPj0eKtT27EnXzmApTMWAQq+VZ+lLeFIn/A7KFfH7dY AeHvszXF3Of7Q/4aztx+VCFLGpLz0FB4yv4rZ1V5bB+JJzetwqQ4kcRcQG72pIJoJZ DGN3zWZNtLbdQ== X-Nifty-SrcIP: [111.169.71.157] From: Masahiro Yamada <yamada.masahiro@socionext.com> To: linux-mtd@lists.infradead.org Subject: [RESEND PATCH v2 23/53] mtd: nand: denali: set DEVICES_CONNECTED 1 if not set Date: Thu, 23 Mar 2017 05:07:22 +0900 Message-Id: <1490213273-8571-24-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490213273-8571-1-git-send-email-yamada.masahiro@socionext.com> References: <1490213273-8571-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170322_200959_314625_0095ADA6 X-CRM114-Status: GOOD ( 14.52 ) X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-1.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list <linux-mtd.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-mtd/> List-Post: <mailto:linux-mtd@lists.infradead.org> List-Help: <mailto:linux-mtd-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe> Cc: laurent.monat@idquantique.com, Boris Brezillon <boris.brezillon@free-electrons.com>, thorsten.christiansson@idquantique.com, Richard Weinberger <richard@nod.at>, Marek Vasut <marek.vasut@gmail.com>, Masahiro Yamada <yamada.masahiro@socionext.com>, Artem Bityutskiy <artem.bityutskiy@linux.intel.com>, Cyrille Pitchen <cyrille.pitchen@atmel.com>, linux-kernel@vger.kernel.org, Dinh Nguyen <dinguyen@kernel.org>, Masami Hiramatsu <mhiramat@kernel.org>, Chuanxiao Dong <chuanxiao.dong@intel.com>, Jassi Brar <jaswinder.singh@linaro.org>, Brian Norris <computersforpeace@gmail.com>, Enrico Jorns <ejo@pengutronix.de>, David Woodhouse <dwmw2@infradead.org>, Graham Moore <grmoore@opensource.altera.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" <linux-mtd-bounces@lists.infradead.org> Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index abf8997..3da0a0e 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c @@ -1472,6 +1472,15 @@ static int denali_multidev_fixup(struct denali_nand_info *denali) */ denali->devnum = ioread32(denali->flash_reg + DEVICES_CONNECTED); + /* + * On some SoCs, DEVICES_CONNECTED is not auto-detected. + * For those, DEVICES_CONNECTED is left to 0. Set 1 if it is the case. + */ + if (denali->devnum == 0) { + denali->devnum = 1; + iowrite32(1, denali->flash_reg + DEVICES_CONNECTED); + } + if (denali->devnum == 1) return 0;
Currently, the driver expects DEVICE_CONNECTED is automatically set by the hardware, but this feature is disabled in some cases. In such cases, it is the software's responsibility to set up the DEVICES_CONNECTED register. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> --- Changes in v2: None drivers/mtd/nand/denali.c | 9 +++++++++ 1 file changed, 9 insertions(+)