summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/tango-cpufreq.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2021-01-20 14:16:44 +0100
committerViresh Kumar <viresh.kumar@linaro.org>2021-01-21 09:34:46 +0530
commit7114ebffd330bfc5a95b9832a70b6bd857d26fd8 (patch)
treef26f3a89fca7b26fc164bbc2cab0829cded6fb5d /drivers/cpufreq/tango-cpufreq.c
parent3657f729b6fb5f2c0bf693742de2dcd49c572aa1 (diff)
downloadlwn-7114ebffd330bfc5a95b9832a70b6bd857d26fd8.tar.gz
lwn-7114ebffd330bfc5a95b9832a70b6bd857d26fd8.zip
cpufreq: remove tango driver
The tango platform is getting removed, so the driver is no longer needed. Cc: Marc Gonzalez <marc.w.gonzalez@free.fr> Cc: Mans Rullgard <mans@mansr.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> [ Viresh: Update cpufreq-dt-platdev.c as well ] Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/cpufreq/tango-cpufreq.c')
-rw-r--r--drivers/cpufreq/tango-cpufreq.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/drivers/cpufreq/tango-cpufreq.c b/drivers/cpufreq/tango-cpufreq.c
deleted file mode 100644
index 89a7f860bfe8..000000000000
--- a/drivers/cpufreq/tango-cpufreq.c
+++ /dev/null
@@ -1,38 +0,0 @@
-#include <linux/of.h>
-#include <linux/cpu.h>
-#include <linux/clk.h>
-#include <linux/pm_opp.h>
-#include <linux/platform_device.h>
-
-static const struct of_device_id machines[] __initconst = {
- { .compatible = "sigma,tango4" },
- { /* sentinel */ }
-};
-
-static int __init tango_cpufreq_init(void)
-{
- struct device *cpu_dev = get_cpu_device(0);
- unsigned long max_freq;
- struct clk *cpu_clk;
- void *res;
-
- if (!of_match_node(machines, of_root))
- return -ENODEV;
-
- cpu_clk = clk_get(cpu_dev, NULL);
- if (IS_ERR(cpu_clk))
- return -ENODEV;
-
- max_freq = clk_get_rate(cpu_clk);
-
- dev_pm_opp_add(cpu_dev, max_freq / 1, 0);
- dev_pm_opp_add(cpu_dev, max_freq / 2, 0);
- dev_pm_opp_add(cpu_dev, max_freq / 3, 0);
- dev_pm_opp_add(cpu_dev, max_freq / 5, 0);
- dev_pm_opp_add(cpu_dev, max_freq / 9, 0);
-
- res = platform_device_register_data(NULL, "cpufreq-dt", -1, NULL, 0);
-
- return PTR_ERR_OR_ZERO(res);
-}
-device_initcall(tango_cpufreq_init);