Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4487027imu; Tue, 15 Jan 2019 00:29:20 -0800 (PST) X-Google-Smtp-Source: ALg8bN55GgC5bq2MPorpyPvXhht2oVHnwPkrizpw6XOuWqR9o1j74XIjCz6sZav6yLCUsGPVpvWO X-Received: by 2002:a63:2784:: with SMTP id n126mr2824421pgn.48.1547540960843; Tue, 15 Jan 2019 00:29:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547540960; cv=none; d=google.com; s=arc-20160816; b=PFAvxExFwhUtRpa8wRzTomZUL5j5LYWwf1ugWi2zVsKHCuAY6LrCKuvqtzs7jnF3BC YW5oa8REkxh4alRRlYvF5lAQ4ERcfrNTOTjgzv0gFWO1ymRtO5glrbusTGdQihdrUT9b XUsTJCnjpiAGZrfNGpt94PT3L3aUgRll0VZJhMCS9t14Bzt7uOpFOapRGLhbADBFCAzK RsPXol7K09+opiJIoZ6RTKJJu9Xc8WqhjSaN/6dUx2lWXCjF14J/4TKlfE/0D9JnUhPn pDpfAxTwknhK4eFg4tU7DaSkWwRUBQtkDrff9vfgA/sTm+0sSY1lcWX+jm1QXQtGACxF yZDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=OUfJ3OLYNT1gN1lsc/KpmyBq7v1Da05HpG6V735Lw48=; b=trKFB0nxK4YoKk3+zSJDLn97Ydn5UpFCRaR+nPSbTw41/caQtODYEjOST7qU1ebnWF 5mbDNJpZwbheLukJ72Y8rkA4JfQqN/vt7KwBXYz1ugsrL4IQ9BPFl787XY/gOosBq1F+ bONLtKAzPF4Qh9I4jIO9KU1idMgkXEfPu0yLeZtzdw4grrFYLWhWnLw8K1sUr+05qygi 8XYB/K3q+T4gYVSyb0H9FOh5XJCAfzBiYDreXlog9R6w3YdJlCozLamgGGjUct3dWMSy 9KIP7xkHZwEBVRc4L3PmLroLOQKPHQGRsKMwXF+L5CSzVtLDcDnmxl+wdUOfbTFvDrgs kaow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=yKNEibH8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y11si2584849pgj.442.2019.01.15.00.29.05; Tue, 15 Jan 2019 00:29:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=yKNEibH8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728408AbfAOING (ORCPT + 99 others); Tue, 15 Jan 2019 03:13:06 -0500 Received: from conuserg-07.nifty.com ([210.131.2.74]:43605 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728043AbfAOING (ORCPT ); Tue, 15 Jan 2019 03:13:06 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id x0F8BngX023329; Tue, 15 Jan 2019 17:11:50 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com x0F8BngX023329 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1547539910; bh=OUfJ3OLYNT1gN1lsc/KpmyBq7v1Da05HpG6V735Lw48=; h=From:To:Cc:Subject:Date:From; b=yKNEibH8fL7l/0/Aa4bU17wH3pgw9gXrLlp732DFHbz+Y6MdellPcLb7uwFSWo5/Y XySbgwg9U9ywsgXCA6KXkqasl1mYVfTGt82AjibLGym3jn8/uS8h0JdrM+iNkyqCyx YozNywHjxz+cdurKqtHISblzhgoprj4Lcf6Ph608mPMwaSdKOty4oLYKW5z43KU3vA uEdjjCTDezM40AgnBWdOQz7+BEXcrte74tqneUiLl8jc01Mig/JEbarupYhvKhzZG6 bsqgGiv+Kw0A1mxrnlUy7CkvEjZEGWh3VjtT8LhxFfP/+kfhCVxshA5gkxrQ4Mg55Z CAFsMv3YGw4JA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mtd@lists.infradead.org, Boris Brezillon , Miquel Raynal Cc: Masahiro Yamada , Brian Norris , linux-kernel@vger.kernel.org, Marek Vasut , Richard Weinberger , David Woodhouse , Boris Brezillon Subject: [PATCH] mtd: rawnand: denali_dt: remove single anonymous clock support Date: Tue, 15 Jan 2019 17:11:34 +0900 Message-Id: <1547539894-12898-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 6f1fe97bec34 ("mtd: rawnand: denali_dt: add more clocks based on IP datasheet") introduced a more correct binding that requires three named clocks. Now that all upstream DT files migrated over to it, remove the single anonymous clock support. Signed-off-by: Masahiro Yamada --- drivers/mtd/nand/raw/denali_dt.c | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c index 7c6a8a4..0b5ae24 100644 --- a/drivers/mtd/nand/raw/denali_dt.c +++ b/drivers/mtd/nand/raw/denali_dt.c @@ -109,25 +109,17 @@ static int denali_dt_probe(struct platform_device *pdev) if (IS_ERR(denali->host)) return PTR_ERR(denali->host); - /* - * 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; + return PTR_ERR(dt->clk_x); dt->clk_ecc = devm_clk_get(dev, "ecc"); if (IS_ERR(dt->clk_ecc)) - dt->clk_ecc = NULL; + return PTR_ERR(dt->clk_ecc); ret = clk_prepare_enable(dt->clk); if (ret) @@ -141,19 +133,8 @@ static int denali_dt_probe(struct platform_device *pdev) if (ret) 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 { - /* - * 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_rate = 50000000; - denali->clk_x_rate = 200000000; - } + denali->clk_rate = clk_get_rate(dt->clk); + denali->clk_x_rate = clk_get_rate(dt->clk_x); ret = denali_init(denali); if (ret) -- 2.7.4