From patchwork Thu Jun 14 05:11:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 138513 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1637413lji; Wed, 13 Jun 2018 22:12:18 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI0hGscomBMNwRtFHzoPsaydtyQi1gDdEPv6fchhCMhiiAXFAe0He95EF1591FP6+ShRCY6 X-Received: by 2002:a65:640d:: with SMTP id a13-v6mr991569pgv.154.1528953138380; Wed, 13 Jun 2018 22:12:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528953138; cv=none; d=google.com; s=arc-20160816; b=X8F9GX3z4VDk44enT22Cx/KlA1TQ12y8uJ9sfTc/rhqgDo1nAtjar4tYY9SXalTEmC 8FWpj+nwJyYqoANzBdjJ+WsBuoFhuAobcLTRttwbr2zjgffoyqhuGdIhFhh2UCa7HxkB R4dGg5WXGZo0J+iWqHuA5wzy1h8D/pelTquUhHNKZxI3MPqcpcUQlqb5Lmp4reI6FZ0o LtqbY6mltk4GPjKTCWt0kxdeUzHTRH+Oqgnllo5/bbiFBiJeCCF1R0uEJ+5mjZmIFptF iH+aX795olwCCO+8zCT1/7v1bFkKiPvEyxq+NRIHxIBLi37B+eXVWT9xLCBgZ/d6L3rB PL2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:references:in-reply-to:message-id:date:subject :to:from:dkim-signature:dkim-filter:dkim-signature :arc-authentication-results; bh=4vuVTurZKAi9jzgaMZIw9sdtVRwyueYq+fUXGUgWDao=; b=EOV6/XqKwpCrwymDt8QZ1h7uN3T/s5zXAynGGJiLNb+VPuAoVx9AxND/TQvfCWRLhN epwrUggn86WXBbuh24j+B2gDlDXilT0CoD6cr6en+hXqArX8RdRpwRqHiJGY6k0eTefH +juI2jMCwEJCw9KtlcGy64FF5780Ui88SbRs2EJIUe37OzjX3+NxWKjLxHM+H+g5pUlN 9aGeBskz1gku5Xz/lg69PDi3yvWrHlWjxIrRM1SXuRF8RCJ+8fbJujheffvyo420tuvD QG7yxzX3BPqD5I3d6jvLUNl3Z/rXag6UCCG78ULsjM0+sS8w2CrWXEeLRUO4gyEZ+c1d FMlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=rMffmY2V; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=z6BgS8OH; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org" Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id e1-v6si4872990plk.397.2018.06.13.22.12.18 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Jun 2018 22:12:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=rMffmY2V; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=z6BgS8OH; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org" 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=4vuVTurZKAi9jzgaMZIw9sdtVRwyueYq+fUXGUgWDao=; b=rMffmY2V0T+OoGfEolg9CQjYY+ if99qddYXyZ+y/hcrFhT8ji6fxD09HQiAjH1DSmHeQVURs9ZYXkNt08w1QFCpNMCEE9PhMKORFYOg ObXlD83yNrK9Bruvk6vrV65kel8D+3mQdQMuykS2sEaGFmOR9SiMuUhy2AX8421P1uzpaNpgj6mHS 9ExkY1XT1+Fz5VEGiabI/3qHKTSMUJEkYWH9j6KS6D4oiNDYWHS0fWOArXOooPYHyDpLnzBGfmrjA wd80EGNAn9gDlPX9TunjG0CK01z+UyhRx/ZwETTg7PgEhup2TwGdiyhbvoC9jDuIWlY/pPKLYa/h4 UcwZ+mug==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fTKYF-000546-H9; Thu, 14 Jun 2018 05:12:03 +0000 Received: from conuserg-10.nifty.com ([210.131.2.77]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fTKXr-0004pr-KB for linux-mtd@lists.infradead.org; Thu, 14 Jun 2018 05:11:41 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id w5E5BB4c003441; Thu, 14 Jun 2018 14:11:13 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w5E5BB4c003441 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1528953074; bh=6zjCqH2/niUWhUqhnX5ee0MSTNWgyn0kUe8iu0jnQPU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z6BgS8OH5DSrPToX1BHq86OzxFhnw8BCXYFuWu7qpMybpEeAP5SYL90V2lvtwn4Jk 5ALyM1rLp4zOqq6Zt3mHpeCuGAXH5CiXSE2mytStgnKBU6652Ts/ev/D3KkAdXnLyN t0ElTicMtjKvgkitY+55Om4GVBq/yoGG/ywjoPwvKChtb68aC5M6mVfCPY4htGJdTL /wMJTM2cuA3PYOmpG5MFc5FTTk8X88d/RYJjRvbZ6/osm9N5R0kEAELVRpLAHcOhWm E1ymWihDDEVaWiPQcIMWN2xTASHBhCMo89VMxsY8I/fZiFL++Ot+2IMbEimvxs38Zm hUFTkADyfDduQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mtd@lists.infradead.org, Boris Brezillon Subject: [PATCH v2 1/3] mtd: rawnand: denali_dt: use dev as a shorthand of &pdev->dev Date: Thu, 14 Jun 2018 14:11:05 +0900 Message-Id: <1528953067-24324-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528953067-24324-1-git-send-email-yamada.masahiro@socionext.com> References: <1528953067-24324-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180613_221139_927377_AF169C70 X-CRM114-Status: GOOD ( 10.92 ) X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [210.131.2.77 listed in list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Brian Norris , Marek Vasut , Richard Weinberger , linux-kernel@vger.kernel.org, Masahiro Yamada , Miquel Raynal , Philipp Rosenberger , Richard Weinberger , David Woodhouse MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org Add 'dev' as a shorthand before adding more code that takes a pointer to struce device. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mtd/nand/raw/denali_dt.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) -- 2.7.4 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c index cfd33e6..d923cfa 100644 --- a/drivers/mtd/nand/raw/denali_dt.c +++ b/drivers/mtd/nand/raw/denali_dt.c @@ -79,44 +79,45 @@ MODULE_DEVICE_TABLE(of, denali_nand_dt_ids); static int denali_dt_probe(struct platform_device *pdev) { + struct device *dev = &pdev->dev; struct resource *res; struct denali_dt *dt; const struct denali_dt_data *data; struct denali_nand_info *denali; int ret; - dt = devm_kzalloc(&pdev->dev, sizeof(*dt), GFP_KERNEL); + dt = devm_kzalloc(dev, sizeof(*dt), GFP_KERNEL); if (!dt) return -ENOMEM; denali = &dt->denali; - data = of_device_get_match_data(&pdev->dev); + data = of_device_get_match_data(dev); if (data) { denali->revision = data->revision; denali->caps = data->caps; denali->ecc_caps = data->ecc_caps; } - denali->dev = &pdev->dev; + denali->dev = dev; denali->irq = platform_get_irq(pdev, 0); if (denali->irq < 0) { - dev_err(&pdev->dev, "no irq defined\n"); + dev_err(dev, "no irq defined\n"); return denali->irq; } res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "denali_reg"); - denali->reg = devm_ioremap_resource(&pdev->dev, res); + denali->reg = devm_ioremap_resource(dev, res); if (IS_ERR(denali->reg)) return PTR_ERR(denali->reg); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nand_data"); - denali->host = devm_ioremap_resource(&pdev->dev, res); + denali->host = devm_ioremap_resource(dev, res); if (IS_ERR(denali->host)) return PTR_ERR(denali->host); - dt->clk = devm_clk_get(&pdev->dev, NULL); + dt->clk = devm_clk_get(dev, NULL); if (IS_ERR(dt->clk)) { - dev_err(&pdev->dev, "no clk available\n"); + dev_err(dev, "no clk available\n"); return PTR_ERR(dt->clk); } ret = clk_prepare_enable(dt->clk); From patchwork Thu Jun 14 05:11:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 138515 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1638079lji; Wed, 13 Jun 2018 22:13:09 -0700 (PDT) X-Google-Smtp-Source: ADUXVKILV2voxlFBcG6mwlmHDX5hn6VizLEVloxLeCBIjuaPB0L1OP0gCYFMk/hiDKWqKf2Kb3qn X-Received: by 2002:a62:4395:: with SMTP id l21-v6mr7934888pfi.196.1528953188978; Wed, 13 Jun 2018 22:13:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528953188; cv=none; d=google.com; s=arc-20160816; b=RQmqld9KE2EkvetfvF41ymsJhWbTGl7z4lbxbQ5zyr4hVhiqfIrEWlMnZxHWKgGesM fuATJLu2zYSaKN+rPZokHb1Vb5Y52j26RSkr7pLOD5MhjvDMHh9zn1xSb1gUi7Yp6M7r eAteFjNiUAizKhvCzmFGDbhvD8erPJAQsHAy0Y6f5HOuM1WfykDx5UN29NEDCdxjjbRm dMa/99vdRSi0LK8iiaoCgdFNtsEdfNeiD281IC5MRd7up0wBg2WGO6eJ/9ExlwHxjwk3 duvohHtKHG5Md95nWPB+LESjoGslTh2oU+X06FZOXL7otBlGS2IQc8S8aNkGEtDbjP+Q vCLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:references:in-reply-to:message-id:date:subject :to:from:dkim-signature:dkim-filter:dkim-signature :arc-authentication-results; bh=vcoM2jeAHbniM4/GxZc1wX8nIl35lJgYOlvv4EYmbmY=; b=gfsa+k29ZBff6OGyNGEiGlznCP2R5MTSCWVZscSzNW1riObjA4RiE2r0BegXtmu3jk W/z6QbjZq2cuHahEXejYeIDgGGmN1xElkto6y/2JMg9mmVwNg6/IAa3vzlGK4PC+Yn0P 1HIe78lM/IY6gnXs3qztA+L++KCJlFI0mEib4F8n96COVHNCp6es45lMOvSj5wlA/6/0 4Jz3dRZuq4MZqBUYmMTXKQz//Cp7g80ZvJr036OkZVic8VhTBARQbmgw2B7Dt1hwdDXQ QZ21unkBYM8bRPf0qD0fYWNjEigmy1y2eXcXsujGZBRPunI9Wruz38O3JGiFRreiOTEy 1jyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=gOsFG+rJ; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=RFmIZCHv; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org" Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id v6-v6si4533612plp.60.2018.06.13.22.13.08 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Jun 2018 22:13:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=gOsFG+rJ; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=RFmIZCHv; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org" 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=vcoM2jeAHbniM4/GxZc1wX8nIl35lJgYOlvv4EYmbmY=; b=gOsFG+rJIrTSKie2wX2FMmpjqR pft1KgXVFsmHqbOILiPqnIazkChZD7M1nzg7SJMCJMVqjsyH3XqhjGkOCB3oz65PUF3CpGVBrX3Uf OzqIJ6vWo2ODVlOge3vXykA428Y/7RUL0TWdHBqYbE+eMM8Jf0yLlsZQWU37nDk6waDfVu5w3coHh u8DJEay5/2DeVFk9ljJ9K8sgaOZACSFGGPMpFA55PqAq92qpio8A3n2CiiQokpdSFhcttwU4YoIWu qdDe+lIFd1TwND+lF0kMnlDtzo0m4Xi74bgyqEzSFO0hH7vWfQeywnl7aRSJwzwg5ODt+HlawWK0m emOyMiiA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fTKZ8-0005bZ-Up; Thu, 14 Jun 2018 05:12:58 +0000 Received: from conuserg-10.nifty.com ([210.131.2.77]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fTKYB-0004wE-3j for linux-mtd@lists.infradead.org; Thu, 14 Jun 2018 05:12:27 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id w5E5BB4d003441; Thu, 14 Jun 2018 14:11:14 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w5E5BB4d003441 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1528953075; bh=hbd48UNc6f10cR0u3CexApki7qmgrdchS+BaKfqV0/E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RFmIZCHv1o2RDrW4qbYAKqILTZuaW/R3WKsuvcUsL+/LtrzCprS2Ft7w9zl5PF9Pd tzq3KFEwiQjsA33CfHeJgtZoMCAZXKHbIgsJRu6ThOL9Dcx9onnuQNtOx/aQcJPEqR eJmpaFZe3IwLx4ebMZ2rXnATze/EvyFJDOkiQ22rT+VooHNmGP9EHGhBBrnZTnfm9a M6ux5KtAl1MeHf98nTXErZmJbKSF1w2C9aELsW1p1yy4MsjuWVtSjos+DRxpUwX5IC 344qChz5d/q3s1JdV22XOk1tZ7oIJ7UuzKNXSzOg2cZ2kHCQPb/xQQYFBAEAZko8gi oErVumRuRRGSw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mtd@lists.infradead.org, Boris Brezillon Subject: [PATCH v2 2/3] mtd: rawnand: denali_dt: add more clocks based on IP datasheet Date: Thu, 14 Jun 2018 14:11:06 +0900 Message-Id: <1528953067-24324-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528953067-24324-1-git-send-email-yamada.masahiro@socionext.com> References: <1528953067-24324-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180613_221159_460363_0D911227 X-CRM114-Status: GOOD ( 17.71 ) X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [210.131.2.77 listed in list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Rob Herring , Brian Norris , devicetree@vger.kernel.org, Richard Weinberger , linux-kernel@vger.kernel.org, Masahiro Yamada , Rob Herring , Miquel Raynal , Philipp Rosenberger , Richard Weinberger , David Woodhouse , Marek Vasut MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org According to the Denali User's Guide, this IP needs three clocks: - clk: controller core clock - clk_x: bus interface clock - ecc_clk: clock at which ECC circuitry is run Currently, denali_dt.c requires a single anonymous clock and its frequency. However, the driver needs to get the frequency of "clk_x" not "clk". This is confusing because people tend to assume the anonymous clock means the core clock. Instead of the cheesy implementation, the clocks in the real hardware should be represented in the driver and the DT-binding. However, adding new clocks would break the existing platforms. For the backward compatibility, the driver still accepts a single clock just as before. If clk_x is missing, clk_x_rate is set to a hardcoded value. It is fine because both Altera (Intel) SOCFPGA and Socionext UniPhier use 200 MHz for the bus interface clock. Signed-off-by: Masahiro Yamada --- Changes in v2: split into sensible chunks .../devicetree/bindings/mtd/denali-nand.txt | 5 +++ drivers/mtd/nand/raw/denali_dt.c | 49 ++++++++++++++++++++-- 2 files changed, 50 insertions(+), 4 deletions(-) -- 2.7.4 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/Documentation/devicetree/bindings/mtd/denali-nand.txt b/Documentation/devicetree/bindings/mtd/denali-nand.txt index 0ee8edb..f33da87 100644 --- a/Documentation/devicetree/bindings/mtd/denali-nand.txt +++ b/Documentation/devicetree/bindings/mtd/denali-nand.txt @@ -8,6 +8,9 @@ Required properties: - reg : should contain registers location and length for data and reg. - reg-names: Should contain the reg names "nand_data" and "denali_reg" - interrupts : The interrupt number. + - clocks: should contain phandle of the controller core clock, the bus + interface clock, and the ECC circuit clock. + - clock-names: should contain "nand", "nand_x", "ecc" Optional properties: - nand-ecc-step-size: see nand.txt for details. If present, the value must be @@ -31,5 +34,7 @@ nand: nand@ff900000 { compatible = "altr,socfpga-denali-nand"; reg = <0xff900000 0x20>, <0xffb80000 0x1000>; reg-names = "nand_data", "denali_reg"; + clocks = <&nand_clk>, <&nand_x_clk>, <&nand_ecc_clk>; + clock-names = "nand", "nand_x", "ecc"; interrupts = <0 144 4>; }; diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c index d923cfa..afaae37 100644 --- a/drivers/mtd/nand/raw/denali_dt.c +++ b/drivers/mtd/nand/raw/denali_dt.c @@ -27,7 +27,9 @@ struct denali_dt { struct denali_nand_info denali; - struct clk *clk; + struct clk *clk; /* core clock */ + struct clk *clk_x; /* bus interface clock */ + struct clk *clk_ecc; /* ECC circuit clock */ }; struct denali_dt_data { @@ -115,24 +117,61 @@ static int denali_dt_probe(struct platform_device *pdev) if (IS_ERR(denali->host)) return PTR_ERR(denali->host); - dt->clk = devm_clk_get(dev, NULL); + /* + * A single anonymous clock is supported for the backward compatibility. + * New platforms should support all the named clocks. + */ + dt->clk = devm_clk_get(dev, "nand"); + if (IS_ERR(dt->clk)) + dt->clk = devm_clk_get(dev, NULL); if (IS_ERR(dt->clk)) { dev_err(dev, "no clk available\n"); return PTR_ERR(dt->clk); } + + dt->clk_x = devm_clk_get(dev, "nand_x"); + if (IS_ERR(dt->clk_x)) + dt->clk_x = NULL; + + dt->clk_ecc = devm_clk_get(dev, "ecc"); + if (IS_ERR(dt->clk_ecc)) + dt->clk_ecc = NULL; + ret = clk_prepare_enable(dt->clk); if (ret) return ret; - denali->clk_x_rate = clk_get_rate(dt->clk); + ret = clk_prepare_enable(dt->clk_x); + if (ret) + goto out_disable_clk; + + ret = clk_prepare_enable(dt->clk_ecc); + if (ret) + goto out_disable_clk_x; + + if (dt->clk_x) { + denali->clk_x_rate = clk_get_rate(dt->clk_x); + } else { + /* + * Hardcode the clock rates for the backward compatibility. + * This works for both SOCFPGA and UniPhier. + */ + dev_notice(dev, + "necessary clock is missing. default clock rates are used.\n"); + denali->clk_x_rate = 200000000; + } ret = denali_init(denali); if (ret) - goto out_disable_clk; + goto out_disable_clk_ecc; platform_set_drvdata(pdev, dt); return 0; +out_disable_clk_ecc: + clk_disable_unprepare(dt->clk_ecc); +out_disable_clk_x: + clk_disable_unprepare(dt->clk_x); out_disable_clk: clk_disable_unprepare(dt->clk); @@ -144,6 +183,8 @@ static int denali_dt_remove(struct platform_device *pdev) struct denali_dt *dt = platform_get_drvdata(pdev); denali_remove(&dt->denali); + clk_disable_unprepare(dt->clk_ecc); + clk_disable_unprepare(dt->clk_x); clk_disable_unprepare(dt->clk); return 0; From patchwork Thu Jun 14 05:11:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 138514 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1637702lji; Wed, 13 Jun 2018 22:12:42 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKV7zJuRKz2hon1ZvKpBiKtCVSKANU3vbCRbblz3uvjqOs6HbKZITdnh+3KJGcj6pDyaDlV X-Received: by 2002:aa7:808f:: with SMTP id v15-v6mr7964172pff.38.1528953162018; Wed, 13 Jun 2018 22:12:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528953162; cv=none; d=google.com; s=arc-20160816; b=G9RrmsEaSH67LKd26VxHtsqGIbyFaGoaixlFZQbTIzWLfIn9gzgmWt32zkAUTDgzMx x3W4fSl5MaqNACXGO9HOEUi0XIC7j9HBiqrRsoKeaTD/8J75FSeCY6CwZvCYiPS0NKD8 ZQbbpDXXB6ROTHCg8nznkVUYax4xuLOUb+CzTC1pQkJTbVzT6d5oJnkV2laepSWKVxsf YA9/Kh8lUlckbcD6yCHYU33W60AcCroLqA++Sfm8G4W/acPf6jxLtvGBihMIrpZVyDZ+ +vOmF9VxKIeqdt9dQbdLE8Pd+aNOyehDWPMgLzdDPIl8N9tARujYMJ4K+vhjsXlGUi98 0rgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:references:in-reply-to:message-id:date:subject :to:from:dkim-signature:dkim-filter:dkim-signature :arc-authentication-results; bh=X3DhfdMz2UrORpTRRwDywUHRm5minlJm2DI1VLiwVaE=; b=D8UqKfJ9RN7sCcpu4loXcyh7MP5tKc3ARk/NJnZf6Bp+COu0Q6dJSXPifq0msDCLyZ PgPtuf8ZdgVINXagXiIleBGrvSUDExrYSbc07uLOkrqW51j+SU6g8AhDHbjMbEqWct/3 By/cOV+ktGXki5x5eGWyKHkZT+mzW4F2fkcmwfbhub/LfHKGaouOy9ECZNnldstEFeiN DKd5shenYw+fLSL8+B7ZXgKtmOp2aVVOwjNINFw54JY/6dsnQ/8xBlWQFGaoI+tqAgas uXQ9GvywgVotS5a1p32VbHmgNQV2X9Wx8dDO79bnDcT7TLL2cdgP+mBamBg3ZnVphpSS YNFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=b0g4s52c; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=L4InzDQ6; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org" Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id p8-v6si3858911pgs.239.2018.06.13.22.12.41 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Jun 2018 22:12:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=b0g4s52c; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=L4InzDQ6; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org" 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=X3DhfdMz2UrORpTRRwDywUHRm5minlJm2DI1VLiwVaE=; b=b0g4s52cBr1t89TIkn4jMrM3Ix nX+yI9XjSJxTCIltqzLI1TcohXe83iIRhFRZYJdsRwQU8hAM6cGDl4RNlKv9Y3f0O7Lm+RUQMdTyy GFIVpn03MyJM1ICalAoiDX4RIpkHzOTdZzqBdFZRFNpAjJct9MBjWvapUI6oTR20gxTw0ZUSRu1ED TDUIpd7B0kWsK4ePmNywjT+WjF3feEM1W9db6bcKUsKaqVp1DFLyHdnlswLnrZWAAmp0tmto7LTD1 93reJCy/Gv08ofUjAHA4spEI6LWnVB/xLvQ5qJ+swEykMWC3isDh9zPoHaMFLTraL2Jzssfh+Gka5 DYecJiMA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fTKYe-0005Lk-5B; Thu, 14 Jun 2018 05:12:28 +0000 Received: from conuserg-10.nifty.com ([210.131.2.77]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fTKYB-0004u5-3x for linux-mtd@lists.infradead.org; Thu, 14 Jun 2018 05:12:12 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id w5E5BB4e003441; Thu, 14 Jun 2018 14:11:15 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w5E5BB4e003441 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1528953076; bh=pm+4FyH/gYp1HZyuH+lEvzm6vmk1locPJsAuPPRhnNg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L4InzDQ63YxHKf+qtTN0PcrfROTW8Lv8neSvkn3Sc622+BvRx1Ph/VdpFXteQbdq+ kZ+cVGHFbUQhtLzxahwUGsZp72PqIauzBjslxSe3KvvvYLLkKYd2ueTwItH+Zlxt+X eFzXkRJ2HMAqFyLwGVsDfgHoDvMW/YUeJkYokitpC4KEIKFooELSkaKLBppJWMqJOh 3mjvrM6I0mv5z0tCKJjrpplbJlOA0DokjIyKQ48PywZF4gIiXTVNKq4wU9ocMMbE6Y rxGo5DtmOUkXW/kAQFVDmsxDq5ZP1BMfMwziwmWHcqIwGZNfbK5wfuqFVfyxdSiyP4 Xz1Ku8eemBrCw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mtd@lists.infradead.org, Boris Brezillon Subject: [PATCH v2 3/3] mtd: rawnand: denali: optimize timing parameters for data interface Date: Thu, 14 Jun 2018 14:11:07 +0900 Message-Id: <1528953067-24324-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528953067-24324-1-git-send-email-yamada.masahiro@socionext.com> References: <1528953067-24324-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180613_221159_461740_AECE5175 X-CRM114-Status: GOOD ( 18.11 ) X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [210.131.2.77 listed in list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Brian Norris , Marek Vasut , Richard Weinberger , linux-kernel@vger.kernel.org, Masahiro Yamada , Miquel Raynal , Philipp Rosenberger , Richard Weinberger , David Woodhouse MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org This commit improves the ->setup_data_interface() hook. The denali_setup_data_interface() needs the frequency of clk_x and the ratio of clk_x / clk. The latter is currently hardcoded in the driver, like this: #define DENALI_CLK_X_MULT 6 The IP datasheet requires that clk_x / clk be 4, 5, or 6. I just chose 6 because it is the most defensive value, but it is not optimal. By getting the clock rate of both "clk" and "clk_x", the driver can compute the timing values more precisely. To not break the existing platforms, the fallback value, 50 MHz is provided. It is true for all upstreamed platforms. Signed-off-by: Masahiro Yamada --- Changes in v2: - Split patches into sensible chunks drivers/mtd/nand/raw/denali.c | 49 +++++++++++++++++++-------------------- drivers/mtd/nand/raw/denali.h | 1 + drivers/mtd/nand/raw/denali_dt.c | 2 ++ drivers/mtd/nand/raw/denali_pci.c | 1 + 4 files changed, 28 insertions(+), 25 deletions(-) -- 2.7.4 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c index 2a302a1..2de46d4 100644 --- a/drivers/mtd/nand/raw/denali.c +++ b/drivers/mtd/nand/raw/denali.c @@ -51,14 +51,6 @@ MODULE_LICENSE("GPL"); #define DENALI_INVALID_BANK -1 #define DENALI_NR_BANKS 4 -/* - * The bus interface clock, clk_x, is phase aligned with the core clock. The - * clk_x is an integral multiple N of the core clk. The value N is configured - * at IP delivery time, and its available value is 4, 5, or 6. We need to align - * to the largest value to make it work with any possible configuration. - */ -#define DENALI_CLK_X_MULT 6 - static inline struct denali_nand_info *mtd_to_denali(struct mtd_info *mtd) { return container_of(mtd_to_nand(mtd), struct denali_nand_info, nand); @@ -954,7 +946,7 @@ static int denali_setup_data_interface(struct mtd_info *mtd, int chipnr, { struct denali_nand_info *denali = mtd_to_denali(mtd); const struct nand_sdr_timings *timings; - unsigned long t_clk; + unsigned long t_x, mult_x; int acc_clks, re_2_we, re_2_re, we_2_re, addr_2_data; int rdwr_en_lo, rdwr_en_hi, rdwr_en_lo_hi, cs_setup; int addr_2_data_mask; @@ -965,15 +957,24 @@ static int denali_setup_data_interface(struct mtd_info *mtd, int chipnr, return PTR_ERR(timings); /* clk_x period in picoseconds */ - t_clk = DIV_ROUND_DOWN_ULL(1000000000000ULL, denali->clk_x_rate); - if (!t_clk) + t_x = DIV_ROUND_DOWN_ULL(1000000000000ULL, denali->clk_x_rate); + if (!t_x) + return -EINVAL; + + /* + * The bus interface clock, clk_x, is phase aligned with the core clock. + * The clk_x is an integral multiple N of the core clk. The value N is + * configured at IP delivery time, and its available value is 4, 5, 6. + */ + mult_x = DIV_ROUND_CLOSEST_ULL(denali->clk_x_rate, denali->clk_rate); + if (mult_x < 4 || mult_x > 6) return -EINVAL; if (chipnr == NAND_DATA_IFACE_CHECK_ONLY) return 0; /* tREA -> ACC_CLKS */ - acc_clks = DIV_ROUND_UP(timings->tREA_max, t_clk); + acc_clks = DIV_ROUND_UP(timings->tREA_max, t_x); acc_clks = min_t(int, acc_clks, ACC_CLKS__VALUE); tmp = ioread32(denali->reg + ACC_CLKS); @@ -982,7 +983,7 @@ static int denali_setup_data_interface(struct mtd_info *mtd, int chipnr, iowrite32(tmp, denali->reg + ACC_CLKS); /* tRWH -> RE_2_WE */ - re_2_we = DIV_ROUND_UP(timings->tRHW_min, t_clk); + re_2_we = DIV_ROUND_UP(timings->tRHW_min, t_x); re_2_we = min_t(int, re_2_we, RE_2_WE__VALUE); tmp = ioread32(denali->reg + RE_2_WE); @@ -991,7 +992,7 @@ static int denali_setup_data_interface(struct mtd_info *mtd, int chipnr, iowrite32(tmp, denali->reg + RE_2_WE); /* tRHZ -> RE_2_RE */ - re_2_re = DIV_ROUND_UP(timings->tRHZ_max, t_clk); + re_2_re = DIV_ROUND_UP(timings->tRHZ_max, t_x); re_2_re = min_t(int, re_2_re, RE_2_RE__VALUE); tmp = ioread32(denali->reg + RE_2_RE); @@ -1005,8 +1006,7 @@ static int denali_setup_data_interface(struct mtd_info *mtd, int chipnr, * With WE_2_RE properly set, the Denali controller automatically takes * care of the delay; the driver need not set NAND_WAIT_TCCS. */ - we_2_re = DIV_ROUND_UP(max(timings->tCCS_min, timings->tWHR_min), - t_clk); + we_2_re = DIV_ROUND_UP(max(timings->tCCS_min, timings->tWHR_min), t_x); we_2_re = min_t(int, we_2_re, TWHR2_AND_WE_2_RE__WE_2_RE); tmp = ioread32(denali->reg + TWHR2_AND_WE_2_RE); @@ -1021,7 +1021,7 @@ static int denali_setup_data_interface(struct mtd_info *mtd, int chipnr, if (denali->revision < 0x0501) addr_2_data_mask >>= 1; - addr_2_data = DIV_ROUND_UP(timings->tADL_min, t_clk); + addr_2_data = DIV_ROUND_UP(timings->tADL_min, t_x); addr_2_data = min_t(int, addr_2_data, addr_2_data_mask); tmp = ioread32(denali->reg + TCWAW_AND_ADDR_2_DATA); @@ -1031,7 +1031,7 @@ static int denali_setup_data_interface(struct mtd_info *mtd, int chipnr, /* tREH, tWH -> RDWR_EN_HI_CNT */ rdwr_en_hi = DIV_ROUND_UP(max(timings->tREH_min, timings->tWH_min), - t_clk); + t_x); rdwr_en_hi = min_t(int, rdwr_en_hi, RDWR_EN_HI_CNT__VALUE); tmp = ioread32(denali->reg + RDWR_EN_HI_CNT); @@ -1040,11 +1040,10 @@ static int denali_setup_data_interface(struct mtd_info *mtd, int chipnr, iowrite32(tmp, denali->reg + RDWR_EN_HI_CNT); /* tRP, tWP -> RDWR_EN_LO_CNT */ - rdwr_en_lo = DIV_ROUND_UP(max(timings->tRP_min, timings->tWP_min), - t_clk); + rdwr_en_lo = DIV_ROUND_UP(max(timings->tRP_min, timings->tWP_min), t_x); rdwr_en_lo_hi = DIV_ROUND_UP(max(timings->tRC_min, timings->tWC_min), - t_clk); - rdwr_en_lo_hi = max(rdwr_en_lo_hi, DENALI_CLK_X_MULT); + t_x); + rdwr_en_lo_hi = max_t(int, rdwr_en_lo_hi, mult_x); rdwr_en_lo = max(rdwr_en_lo, rdwr_en_lo_hi - rdwr_en_hi); rdwr_en_lo = min_t(int, rdwr_en_lo, RDWR_EN_LO_CNT__VALUE); @@ -1054,8 +1053,8 @@ static int denali_setup_data_interface(struct mtd_info *mtd, int chipnr, iowrite32(tmp, denali->reg + RDWR_EN_LO_CNT); /* tCS, tCEA -> CS_SETUP_CNT */ - cs_setup = max3((int)DIV_ROUND_UP(timings->tCS_min, t_clk) - rdwr_en_lo, - (int)DIV_ROUND_UP(timings->tCEA_max, t_clk) - acc_clks, + cs_setup = max3((int)DIV_ROUND_UP(timings->tCS_min, t_x) - rdwr_en_lo, + (int)DIV_ROUND_UP(timings->tCEA_max, t_x) - acc_clks, 0); cs_setup = min_t(int, cs_setup, CS_SETUP_CNT__VALUE); @@ -1282,7 +1281,7 @@ int denali_init(struct denali_nand_info *denali) } /* clk rate info is needed for setup_data_interface */ - if (denali->clk_x_rate) + if (denali->clk_rate && denali->clk_x_rate) chip->setup_data_interface = denali_setup_data_interface; ret = nand_scan_ident(mtd, denali->max_banks, NULL); diff --git a/drivers/mtd/nand/raw/denali.h b/drivers/mtd/nand/raw/denali.h index 9ad33d2..1f8feaf 100644 --- a/drivers/mtd/nand/raw/denali.h +++ b/drivers/mtd/nand/raw/denali.h @@ -300,6 +300,7 @@ struct denali_nand_info { struct nand_chip nand; + unsigned long clk_rate; /* core clock rate */ unsigned long clk_x_rate; /* bus interface clock rate */ int active_bank; /* currently selected bank */ struct device *dev; diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c index afaae37..0faaad0 100644 --- a/drivers/mtd/nand/raw/denali_dt.c +++ b/drivers/mtd/nand/raw/denali_dt.c @@ -150,6 +150,7 @@ static int denali_dt_probe(struct platform_device *pdev) goto out_disable_clk_x; if (dt->clk_x) { + denali->clk_rate = clk_get_rate(dt->clk); denali->clk_x_rate = clk_get_rate(dt->clk_x); } else { /* @@ -158,6 +159,7 @@ static int denali_dt_probe(struct platform_device *pdev) */ dev_notice(dev, "necessary clock is missing. default clock rates are used.\n"); + denali->clk_rate = 50000000; denali->clk_x_rate = 200000000; } diff --git a/drivers/mtd/nand/raw/denali_pci.c b/drivers/mtd/nand/raw/denali_pci.c index 49cb3e1..7c8efc4 100644 --- a/drivers/mtd/nand/raw/denali_pci.c +++ b/drivers/mtd/nand/raw/denali_pci.c @@ -73,6 +73,7 @@ static int denali_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) denali->irq = dev->irq; denali->ecc_caps = &denali_pci_ecc_caps; denali->nand.ecc.options |= NAND_ECC_MAXIMIZE; + denali->clk_rate = 50000000; /* 50 MHz */ denali->clk_x_rate = 200000000; /* 200 MHz */ ret = pci_request_regions(dev, DENALI_NAND_NAME);