From patchwork Fri May 18 20:06:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 10412057 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 588CB60230 for ; Fri, 18 May 2018 20:09:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4248C28AC5 for ; Fri, 18 May 2018 20:09:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3531E28ACB; Fri, 18 May 2018 20:09:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D500E28AC5 for ; Fri, 18 May 2018 20:09:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752356AbeERUHZ (ORCPT ); Fri, 18 May 2018 16:07:25 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:41571 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751943AbeERUHW (ORCPT ); Fri, 18 May 2018 16:07:22 -0400 Received: by mail-lf0-f67.google.com with SMTP id m17-v6so15668928lfj.8; Fri, 18 May 2018 13:07:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZonjWTezhouA4obmngsNvlcSjlcVZzWCeJ3FeIp4ghI=; b=mcGPliT4ELs5yAr+Mn00uDl2nXytqIOj9zyHdJn2/j2Jx7VV/OOP5NQFSuhognHCFT zfQpeglFH0mMGkg/Hu9XN7oJPRNi00ACFVov9Cz0BLamnODyczdcvygzZoO5+ilZo2Rr r6qdwWqAnbN1QOh+78dOmNZ92dB8SmCo2TkJV4u4CEbXQ86Ru2/47027iP93siAXx9ff dBTtR81YtIEX+nPMzuzgFj+XZp7WHykJFnEvppHK7YSUwBueqiakdxiROxaIOs8uHW+a FlxunZAa6O/H3FtYPqiZK+wB+79w4PWcHGPgKqZSQYT3WQV9Z06fwq/kXyiTcd/4b4KL rSMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZonjWTezhouA4obmngsNvlcSjlcVZzWCeJ3FeIp4ghI=; b=rMM9ZcqL5LsO7A6vsJyO+LiCKgwwLkpBkqkMHNX3xuRzg86RpRGLabmqsyuybQHjo9 R3N1uSbry5KxclHhnHF9MQGrjLNjdND5qvl23PXfzYvhioVYNH9nX2eWZSWjbRWDzfux gUVgB6sHkDFFcGAF5NFLMUHxE0UHZfKeKk8Rl/Ad/Rcy3nEA/AdldU/YBDJodGykruZh Vh/W2zTFisZhqmi6+nfDeQqJF/ojoc/MmRk00kQyWJHjiAtp0TMz643pvFUkPeWaLygE LWAsXAD3tB6tDkhw93xzGuwWxceh9eSVqC0hAxofGjkksepbHFY51g4CpAkjgoBZq6/u Klmw== X-Gm-Message-State: ALKqPweCczy6rXF177OrlYdwvN6aPlL7M+qX0Emw2cYCKIukJay4w+/w +mBg/dZB5nlwcYEmpf2YiL0= X-Google-Smtp-Source: AB8JxZqqNMrVWhfgGFP3qDxWm8rWwGTkQLhOKYRW1LnfvJdCjMX2YksQbMdFV4u5Ly2kX7ErtZ91FA== X-Received: by 2002:a19:e81d:: with SMTP id f29-v6mr2223694lfh.83.1526674040821; Fri, 18 May 2018 13:07:20 -0700 (PDT) Received: from localhost.localdomain ([109.252.91.60]) by smtp.gmail.com with ESMTPSA id z132-v6sm2026987lfd.45.2018.05.18.13.07.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 May 2018 13:07:20 -0700 (PDT) From: Dmitry Osipenko To: "Rafael J. Wysocki" , Viresh Kumar , Thierry Reding , Jonathan Hunter Cc: linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Geis Subject: [PATCH v2 04/11] cpufreq: tegra20: Remove EMC clock usage Date: Fri, 18 May 2018 23:06:35 +0300 Message-Id: <20180518200642.24815-5-digetx@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180518200642.24815-1-digetx@gmail.com> References: <20180518200642.24815-1-digetx@gmail.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The EMC driver has been gone 4 years ago, since the commit a7cbe92cef27 ("ARM: tegra: remove tegra EMC scaling driver"). Remove the EMC clock usage as it does nothing. We may consider re-implementing the EMC scaling later, probably using PM Memory Bandwidth QoS API. Signed-off-by: Dmitry Osipenko Acked-by: Viresh Kumar Acked-by: Thierry Reding --- drivers/cpufreq/tegra20-cpufreq.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/drivers/cpufreq/tegra20-cpufreq.c b/drivers/cpufreq/tegra20-cpufreq.c index bec1a50a8138..4b09a8b410c4 100644 --- a/drivers/cpufreq/tegra20-cpufreq.c +++ b/drivers/cpufreq/tegra20-cpufreq.c @@ -40,7 +40,6 @@ static struct cpufreq_frequency_table freq_table[] = { static struct clk *cpu_clk; static struct clk *pll_x_clk; static struct clk *pll_p_clk; -static struct clk *emc_clk; static bool pll_x_prepared; static unsigned int tegra_get_intermediate(struct cpufreq_policy *policy, @@ -91,17 +90,6 @@ static int tegra_target(struct cpufreq_policy *policy, unsigned int index) unsigned int ifreq = clk_get_rate(pll_p_clk) / 1000; int ret = 0; - /* - * Vote on memory bus frequency based on cpu frequency - * This sets the minimum frequency, display or avp may request higher - */ - if (rate >= 816000) - clk_set_rate(emc_clk, 600000000); /* cpu 816 MHz, emc max */ - else if (rate >= 456000) - clk_set_rate(emc_clk, 300000000); /* cpu 456 MHz, emc 150Mhz */ - else - clk_set_rate(emc_clk, 100000000); /* emc 50Mhz */ - /* * target freq == pll_p, don't need to take extra reference to pll_x_clk * as it isn't used anymore. @@ -137,14 +125,12 @@ static int tegra_cpu_init(struct cpufreq_policy *policy) if (policy->cpu >= NUM_CPUS) return -EINVAL; - clk_prepare_enable(emc_clk); clk_prepare_enable(cpu_clk); /* FIXME: what's the actual transition time? */ ret = cpufreq_generic_init(policy, freq_table, 300 * 1000); if (ret) { clk_disable_unprepare(cpu_clk); - clk_disable_unprepare(emc_clk); return ret; } @@ -156,7 +142,6 @@ static int tegra_cpu_init(struct cpufreq_policy *policy) static int tegra_cpu_exit(struct cpufreq_policy *policy) { clk_disable_unprepare(cpu_clk); - clk_disable_unprepare(emc_clk); return 0; } @@ -188,19 +173,12 @@ static int __init tegra_cpufreq_init(void) if (IS_ERR(pll_p_clk)) return PTR_ERR(pll_p_clk); - emc_clk = clk_get_sys("cpu", "emc"); - if (IS_ERR(emc_clk)) { - clk_put(cpu_clk); - return PTR_ERR(emc_clk); - } - return cpufreq_register_driver(&tegra_cpufreq_driver); } static void __exit tegra_cpufreq_exit(void) { cpufreq_unregister_driver(&tegra_cpufreq_driver); - clk_put(emc_clk); clk_put(cpu_clk); }