Message ID | 20241113094938.44817-7-bastien.curutchet@bootlin.com |
---|---|
State | New |
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@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=XA0yd6Xq; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=cDaWZoFf; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=pdPkcgsN; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XpJdv1tLBz1xyT for <incoming@patchwork.ozlabs.org>; Wed, 13 Nov 2024 20:58:59 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MErNFD5B7YNeHrPEZhqLGM4adQyeROtOLTZbnU1PLUk=; b=XA0yd6XqPUsQGm RoS+pHKXqz9/GHJzOv+1r3Nxr1UTPv/i/OLiNQXdYyVwQ9FwXGZV7b+OHXOPTjMOXKES5zfLf+zPo b14uwpnDGa6PxD/xxOPJhtQF5TUyDyN9S1O3JsyDBZC4tEXv1WlvSOebj1Cfb9FhRQnPvagVGgG71 KzvKHHDWqezgNR/F3CvLB79YsnKN7m6Ig+W+2GXSG8gerRunnD8UVYeeBhApX248IwdbKyuygSSSt xecWjPrQy490g5QkkQjCHRLQBvrTLzl7I0BTNR0+nkM4zvUq4lPoCyEwyFYOZBSJZ+1Y1TgAgDwIe g23LDoYBYpFAnOYHj4qQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tBA9A-00000006LQE-3Lvu; Wed, 13 Nov 2024 09:58:48 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tBA0V-00000006IaW-3gSz for linux-mtd@bombadil.infradead.org; Wed, 13 Nov 2024 09:49:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=ONE5RIDa+M5HrCVn5iTpaeEU6VZHpy9NTdUHLDL3hak=; b=cDaWZoFfEclnpBlZaYEIgn3vvy eLnn5LIQfyCNQAGaaiZ81dSByPIHw4/YWGrMozOSmmrT2DCBDEW097AfDG6P3gPs0cMpk727sh8Qu KFWltCkVLoKbHzXbc72liI+eEAlAOAnYYoG0Uy45RFjro8XxqlrgKMjjshSFlR1NpjRybNT2ths8w ItHNO5zCGeeJFerVnguTUjQdJWZNvpR7rkBdWLpEtw0oDdSKGrl90Ry3A2XmDRa8aKFP1U6j3ic4q ayXyJ3W7S2CJb6P1N4o2LDi4UiJR5vvnLmj9vtyanrDfiqSCYbLZyk0eBN8vrN6ii/fRQ96JtVsed uNHpuvbw==; Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tBA0S-0000000DE6W-16Rf for linux-mtd@lists.infradead.org; Wed, 13 Nov 2024 09:49:50 +0000 Received: by mail.gandi.net (Postfix) with ESMTPA id 63B31C0005; Wed, 13 Nov 2024 09:49:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1731491385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ONE5RIDa+M5HrCVn5iTpaeEU6VZHpy9NTdUHLDL3hak=; b=pdPkcgsNZr9bGMJRCtJGG6Kp9JOneqiNmeOHO3VmnQwisps53nzoczoic5DMXpqBw+a02h TVI3z1jLaK56EReo3fgnPg7YN2kgc4wL/W/zRjuOpb427i+FiDpEmdRpH9h2E72co2OGN4 WtT1uTc4IHf0Xpn8ZsoWsRQBdWq3lmH4q8j7O3kcuJHzVrY3K1tEAsm6ND8nZQ+bBWc0R4 nFQe6sDNjmxjisT94Dq19Dra0FtCQwiakMODZXcKzNaDzidcK1rXOmFRxvTRfBO3uIEvsK 0R6sX/vctlZXoK6kMjTAAkGeLBJ54biRThG4GRxZUq8PZd0X7DMKqfXgOwMebA== From: Bastien Curutchet <bastien.curutchet@bootlin.com> To: Santosh Shilimkar <ssantosh@kernel.org>, Krzysztof Kozlowski <krzk@kernel.org>, Miquel Raynal <miquel.raynal@bootlin.com>, Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com> Cc: linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, Thomas Petazzoni <thomas.petazzoni@bootlin.com>, Herve Codina <herve.codina@bootlin.com>, Christopher Cordahi <christophercordahi@nanometrics.ca>, Bastien Curutchet <bastien.curutchet@bootlin.com> Subject: [PATCH v3 6/7] mtd: rawnand: davinci: Add clock resource Date: Wed, 13 Nov 2024 10:49:37 +0100 Message-ID: <20241113094938.44817-7-bastien.curutchet@bootlin.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241113094938.44817-1-bastien.curutchet@bootlin.com> References: <20241113094938.44817-1-bastien.curutchet@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: bastien.curutchet@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241113_094948_646947_A0003E93 X-CRM114-Status: GOOD ( 11.47 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: NAND controller has a reference clock inherited from the AEMIF (cf. Documentation/devicetree/bindings/memory-controllers/ti-aemif.txt) This clock isn't used yet by the driver. Add a struct clock in the struct davinci_nand_info so it can be used to compute timings. Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [2001:4b98:dc4:8:0:0:0:226 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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.34 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> 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 |
Series |
Implement setup_interface() in the DaVinci NAND controller
|
expand
|
diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c index 3c0efbdd789e..563045c7ce08 100644 --- a/drivers/mtd/nand/raw/davinci_nand.c +++ b/drivers/mtd/nand/raw/davinci_nand.c @@ -10,6 +10,7 @@ * Dirk Behme <Dirk.Behme@gmail.com> */ +#include <linux/clk.h> #include <linux/err.h> #include <linux/iopoll.h> #include <linux/kernel.h> @@ -117,6 +118,8 @@ struct davinci_nand_info { uint32_t mask_cle; uint32_t core_chipsel; + + struct clk *clk; }; static DEFINE_SPINLOCK(davinci_nand_lock); @@ -822,6 +825,10 @@ static int nand_davinci_probe(struct platform_device *pdev) return -EADDRNOTAVAIL; } + info->clk = devm_clk_get_enabled(&pdev->dev, "aemif"); + if (IS_ERR(info->clk)) + return dev_err_probe(&pdev->dev, PTR_ERR(info->clk), "failed to get clock"); + info->pdev = pdev; info->base = base; info->vaddr = vaddr;
NAND controller has a reference clock inherited from the AEMIF (cf. Documentation/devicetree/bindings/memory-controllers/ti-aemif.txt) This clock isn't used yet by the driver. Add a struct clock in the struct davinci_nand_info so it can be used to compute timings. Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com> --- drivers/mtd/nand/raw/davinci_nand.c | 7 +++++++ 1 file changed, 7 insertions(+)