aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2016-04-22 07:28:47 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-04-25 10:18:24 -0400
commit3920be471ce7f66c05e6e0cd251a332b84520ef8 (patch)
treeb4a0753edb16ff12ebee3150b18747a5e28dc88a
parent5e4249c6d9e596fdb26357997236a01b96c8902d (diff)
cpufreq: hisilicon: Use generic platdev driver
The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform device now, reuse that and remove similar code from platform code. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/cpufreq/Kconfig.arm9
-rw-r--r--drivers/cpufreq/Makefile1
-rw-r--r--drivers/cpufreq/cpufreq-dt-platdev.c2
-rw-r--r--drivers/cpufreq/hisi-acpu-cpufreq.c42
4 files changed, 2 insertions, 52 deletions
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index 14b1f9393b05..d89b8afe23b6 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -50,15 +50,6 @@ config ARM_HIGHBANK_CPUFREQ
50 50
51 If in doubt, say N. 51 If in doubt, say N.
52 52
53config ARM_HISI_ACPU_CPUFREQ
54 tristate "Hisilicon ACPU CPUfreq driver"
55 depends on ARCH_HISI && CPUFREQ_DT
56 select PM_OPP
57 help
58 This enables the hisilicon ACPU CPUfreq driver.
59
60 If in doubt, say N.
61
62config ARM_IMX6Q_CPUFREQ 53config ARM_IMX6Q_CPUFREQ
63 tristate "Freescale i.MX6 cpufreq support" 54 tristate "Freescale i.MX6 cpufreq support"
64 depends on ARCH_MXC 55 depends on ARCH_MXC
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
index d7b646c0f2e9..2cce2cd400f9 100644
--- a/drivers/cpufreq/Makefile
+++ b/drivers/cpufreq/Makefile
@@ -55,7 +55,6 @@ obj-$(CONFIG_ARCH_DAVINCI) += davinci-cpufreq.o
55obj-$(CONFIG_UX500_SOC_DB8500) += dbx500-cpufreq.o 55obj-$(CONFIG_UX500_SOC_DB8500) += dbx500-cpufreq.o
56obj-$(CONFIG_ARM_EXYNOS5440_CPUFREQ) += exynos5440-cpufreq.o 56obj-$(CONFIG_ARM_EXYNOS5440_CPUFREQ) += exynos5440-cpufreq.o
57obj-$(CONFIG_ARM_HIGHBANK_CPUFREQ) += highbank-cpufreq.o 57obj-$(CONFIG_ARM_HIGHBANK_CPUFREQ) += highbank-cpufreq.o
58obj-$(CONFIG_ARM_HISI_ACPU_CPUFREQ) += hisi-acpu-cpufreq.o
59obj-$(CONFIG_ARM_IMX6Q_CPUFREQ) += imx6q-cpufreq.o 58obj-$(CONFIG_ARM_IMX6Q_CPUFREQ) += imx6q-cpufreq.o
60obj-$(CONFIG_ARM_INTEGRATOR) += integrator-cpufreq.o 59obj-$(CONFIG_ARM_INTEGRATOR) += integrator-cpufreq.o
61obj-$(CONFIG_ARM_KIRKWOOD_CPUFREQ) += kirkwood-cpufreq.o 60obj-$(CONFIG_ARM_KIRKWOOD_CPUFREQ) += kirkwood-cpufreq.o
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index 5ad29383e862..ac4a0ba87c12 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -24,6 +24,8 @@ static const struct of_device_id machines[] __initconst = {
24 { .compatible = "allwinner,sun8i-a83t", }, 24 { .compatible = "allwinner,sun8i-a83t", },
25 { .compatible = "allwinner,sun8i-h3", }, 25 { .compatible = "allwinner,sun8i-h3", },
26 26
27 { .compatible = "hisilicon,hi6220", },
28
27 { .compatible = "fsl,imx27", }, 29 { .compatible = "fsl,imx27", },
28 { .compatible = "fsl,imx51", }, 30 { .compatible = "fsl,imx51", },
29 { .compatible = "fsl,imx53", }, 31 { .compatible = "fsl,imx53", },
diff --git a/drivers/cpufreq/hisi-acpu-cpufreq.c b/drivers/cpufreq/hisi-acpu-cpufreq.c
deleted file mode 100644
index 026d5b2224de..000000000000
--- a/drivers/cpufreq/hisi-acpu-cpufreq.c
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2 * Hisilicon Platforms Using ACPU CPUFreq Support
3 *
4 * Copyright (c) 2015 Hisilicon Limited.
5 * Copyright (c) 2015 Linaro Limited.
6 *
7 * Leo Yan <leo.yan@linaro.org>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 *
13 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
14 * kind, whether express or implied; without even the implied warranty
15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 */
18
19#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
20
21#include <linux/err.h>
22#include <linux/init.h>
23#include <linux/kernel.h>
24#include <linux/module.h>
25#include <linux/of.h>
26#include <linux/platform_device.h>
27
28static int __init hisi_acpu_cpufreq_driver_init(void)
29{
30 struct platform_device *pdev;
31
32 if (!of_machine_is_compatible("hisilicon,hi6220"))
33 return -ENODEV;
34
35 pdev = platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
36 return PTR_ERR_OR_ZERO(pdev);
37}
38module_init(hisi_acpu_cpufreq_driver_init);
39
40MODULE_AUTHOR("Leo Yan <leo.yan@linaro.org>");
41MODULE_DESCRIPTION("Hisilicon acpu cpufreq driver");
42MODULE_LICENSE("GPL v2");