cpufreq: hisilicon: Use generic platdev driver
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 22 Apr 2016 11:28:47 +0000 (16:58 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 25 Apr 2016 14:18:24 +0000 (16:18 +0200)
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>
drivers/cpufreq/Kconfig.arm
drivers/cpufreq/Makefile
drivers/cpufreq/cpufreq-dt-platdev.c
drivers/cpufreq/hisi-acpu-cpufreq.c [deleted file]

index 14b1f9393b057e106d7b068883ce486ea70239ec..d89b8afe23b6956b6c48e19c87cecc081e7725a1 100644 (file)
@@ -50,15 +50,6 @@ config ARM_HIGHBANK_CPUFREQ
 
          If in doubt, say N.
 
-config ARM_HISI_ACPU_CPUFREQ
-       tristate "Hisilicon ACPU CPUfreq driver"
-       depends on ARCH_HISI && CPUFREQ_DT
-       select PM_OPP
-       help
-         This enables the hisilicon ACPU CPUfreq driver.
-
-         If in doubt, say N.
-
 config ARM_IMX6Q_CPUFREQ
        tristate "Freescale i.MX6 cpufreq support"
        depends on ARCH_MXC
index d7b646c0f2e90099a5acc42140460a6e0c1f2052..2cce2cd400f9f15cbc5f525f8dcd2fda200d439f 100644 (file)
@@ -55,7 +55,6 @@ obj-$(CONFIG_ARCH_DAVINCI)            += davinci-cpufreq.o
 obj-$(CONFIG_UX500_SOC_DB8500)         += dbx500-cpufreq.o
 obj-$(CONFIG_ARM_EXYNOS5440_CPUFREQ)   += exynos5440-cpufreq.o
 obj-$(CONFIG_ARM_HIGHBANK_CPUFREQ)     += highbank-cpufreq.o
-obj-$(CONFIG_ARM_HISI_ACPU_CPUFREQ)    += hisi-acpu-cpufreq.o
 obj-$(CONFIG_ARM_IMX6Q_CPUFREQ)                += imx6q-cpufreq.o
 obj-$(CONFIG_ARM_INTEGRATOR)           += integrator-cpufreq.o
 obj-$(CONFIG_ARM_KIRKWOOD_CPUFREQ)     += kirkwood-cpufreq.o
index 5ad29383e862d4fdc1f071716e41a2036e08d290..ac4a0ba87c1253da12b09963303338715d10cd50 100644 (file)
@@ -24,6 +24,8 @@ static const struct of_device_id machines[] __initconst = {
        { .compatible = "allwinner,sun8i-a83t", },
        { .compatible = "allwinner,sun8i-h3", },
 
+       { .compatible = "hisilicon,hi6220", },
+
        { .compatible = "fsl,imx27", },
        { .compatible = "fsl,imx51", },
        { .compatible = "fsl,imx53", },
diff --git a/drivers/cpufreq/hisi-acpu-cpufreq.c b/drivers/cpufreq/hisi-acpu-cpufreq.c
deleted file mode 100644 (file)
index 026d5b2..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Hisilicon Platforms Using ACPU CPUFreq Support
- *
- * Copyright (c) 2015 Hisilicon Limited.
- * Copyright (c) 2015 Linaro Limited.
- *
- * Leo Yan <leo.yan@linaro.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed "as is" WITHOUT ANY WARRANTY of any
- * kind, whether express or implied; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
-#include <linux/err.h>
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/of.h>
-#include <linux/platform_device.h>
-
-static int __init hisi_acpu_cpufreq_driver_init(void)
-{
-       struct platform_device *pdev;
-
-       if (!of_machine_is_compatible("hisilicon,hi6220"))
-               return -ENODEV;
-
-       pdev = platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
-       return PTR_ERR_OR_ZERO(pdev);
-}
-module_init(hisi_acpu_cpufreq_driver_init);
-
-MODULE_AUTHOR("Leo Yan <leo.yan@linaro.org>");
-MODULE_DESCRIPTION("Hisilicon acpu cpufreq driver");
-MODULE_LICENSE("GPL v2");