linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Rob Herring <robh+dt@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Joseph Lo <josephl@nvidia.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Peter De Schrijver <pdeschrijver@nvidia.com>,
	Prashant Gaikwad <pgaikwad@nvidia.com>,
	Stephen Boyd <sboyd@kernel.org>
Cc: devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v4 02/10] memory: tegra20-emc: Drop setting EMC rate to max on probe
Date: Mon, 17 Jun 2019 02:35:43 +0300	[thread overview]
Message-ID: <20190616233551.6838-3-digetx@gmail.com> (raw)
In-Reply-To: <20190616233551.6838-1-digetx@gmail.com>

The memory frequency scaling will be managed by tegra20-devfreq driver
and PM QoS once all the prerequisite patches will get upstreamed.
The parent clock is now managed by the clock driver and we also should
assume that PLLM rate can't be changed on some devices (Galaxy Tab 10.1
for example). Altogether there is no point in touching of clock's rate
from the EMC driver.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/memory/tegra/tegra20-emc.c | 45 ------------------------------
 1 file changed, 45 deletions(-)

diff --git a/drivers/memory/tegra/tegra20-emc.c b/drivers/memory/tegra/tegra20-emc.c
index 9ee5bef49e47..55ac3863a354 100644
--- a/drivers/memory/tegra/tegra20-emc.c
+++ b/drivers/memory/tegra/tegra20-emc.c
@@ -424,41 +424,6 @@ static int emc_setup_hw(struct tegra_emc *emc)
 	return 0;
 }
 
-static int emc_init(struct tegra_emc *emc, unsigned long rate)
-{
-	int err;
-
-	err = clk_set_parent(emc->emc_mux, emc->backup_clk);
-	if (err) {
-		dev_err(emc->dev,
-			"failed to reparent to backup source: %d\n", err);
-		return err;
-	}
-
-	err = clk_set_rate(emc->pll_m, rate);
-	if (err) {
-		dev_err(emc->dev,
-			"failed to change pll_m rate: %d\n", err);
-		return err;
-	}
-
-	err = clk_set_parent(emc->emc_mux, emc->pll_m);
-	if (err) {
-		dev_err(emc->dev,
-			"failed to reparent to pll_m: %d\n", err);
-		return err;
-	}
-
-	err = clk_set_rate(emc->clk, rate);
-	if (err) {
-		dev_err(emc->dev,
-			"failed to change emc rate: %d\n", err);
-		return err;
-	}
-
-	return 0;
-}
-
 static int tegra_emc_probe(struct platform_device *pdev)
 {
 	struct device_node *np;
@@ -550,18 +515,8 @@ static int tegra_emc_probe(struct platform_device *pdev)
 		goto put_backup;
 	}
 
-	/* set DRAM clock rate to maximum */
-	err = emc_init(emc, emc->timings[emc->num_timings - 1].rate);
-	if (err) {
-		dev_err(&pdev->dev, "failed to initialize EMC clock rate: %d\n",
-			err);
-		goto unreg_notifier;
-	}
-
 	return 0;
 
-unreg_notifier:
-	clk_notifier_unregister(emc->clk, &emc->clk_nb);
 put_backup:
 	clk_put(emc->backup_clk);
 put_pll_m:
-- 
2.22.0


  parent reply	other threads:[~2019-06-16 23:36 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-16 23:35 [PATCH v4 00/10] memory: tegra: Introduce Tegra30 EMC driver Dmitry Osipenko
2019-06-16 23:35 ` [PATCH v4 01/10] clk: tegra20/30: Add custom EMC clock implementation Dmitry Osipenko
2019-06-17  9:35   ` Thierry Reding
2019-06-17 15:00     ` Dmitry Osipenko
2019-06-18 12:21   ` Thierry Reding
2019-06-19  1:14     ` Stephen Boyd
2019-06-19  1:14   ` Stephen Boyd
2019-06-19 15:37     ` Dmitry Osipenko
2019-06-16 23:35 ` Dmitry Osipenko [this message]
2019-06-16 23:35 ` [PATCH v4 03/10] memory: tegra20-emc: Adapt for clock driver changes Dmitry Osipenko
2019-06-16 23:35 ` [PATCH v4 04/10] memory: tegra20-emc: Include io.h instead of iopoll.h Dmitry Osipenko
2019-06-16 23:35 ` [PATCH v4 05/10] memory: tegra20-emc: Replace clk_get_sys with devm_clk_get Dmitry Osipenko
2019-06-17  9:46   ` Thierry Reding
2019-06-17 15:01     ` Dmitry Osipenko
2019-06-16 23:35 ` [PATCH v4 06/10] dt-bindings: memory: Add binding for NVIDIA Tegra30 External Memory Controller Dmitry Osipenko
2019-06-16 23:35 ` [PATCH v4 07/10] memory: tegra: Introduce Tegra30 EMC driver Dmitry Osipenko
2019-06-17  9:50   ` Thierry Reding
2019-06-17 15:03     ` Dmitry Osipenko
2019-06-16 23:35 ` [PATCH v4 08/10] memory: tegra: Ensure timing control debug features are disabled Dmitry Osipenko
2019-06-16 23:35 ` [PATCH v4 09/10] memory: tegra: Consolidate registers definition into one place Dmitry Osipenko
2019-06-16 23:35 ` [PATCH v4 10/10] ARM: dts: tegra30: Add External Memory Controller node Dmitry Osipenko
2019-06-17  8:21 ` [PATCH v4 00/10] memory: tegra: Introduce Tegra30 EMC driver Peter De Schrijver
2019-06-17 15:08   ` Dmitry Osipenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190616233551.6838-3-digetx@gmail.com \
    --to=digetx@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=josephl@nvidia.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=pdeschrijver@nvidia.com \
    --cc=pgaikwad@nvidia.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).