mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
cpufreq: imx: 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. Note that the complete routine imx27_dt_init() is removed as of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); has same effect as a NULL .init_machine machine callback pointer. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Lucas Stach <l.stach@pengutronix.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
a59511d1da
commit
7ead83f6df
5 changed files with 5 additions and 21 deletions
|
@ -18,15 +18,6 @@
|
|||
#include "common.h"
|
||||
#include "mx27.h"
|
||||
|
||||
static void __init imx27_dt_init(void)
|
||||
{
|
||||
struct platform_device_info devinfo = { .name = "cpufreq-dt", };
|
||||
|
||||
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
|
||||
|
||||
platform_device_register_full(&devinfo);
|
||||
}
|
||||
|
||||
static const char * const imx27_dt_board_compat[] __initconst = {
|
||||
"fsl,imx27",
|
||||
NULL
|
||||
|
@ -36,6 +27,5 @@ DT_MACHINE_START(IMX27_DT, "Freescale i.MX27 (Device Tree Support)")
|
|||
.map_io = mx27_map_io,
|
||||
.init_early = imx27_init_early,
|
||||
.init_irq = mx27_init_irq,
|
||||
.init_machine = imx27_dt_init,
|
||||
.dt_compat = imx27_dt_board_compat,
|
||||
MACHINE_END
|
||||
|
|
|
@ -50,13 +50,10 @@ static void __init imx51_ipu_mipi_setup(void)
|
|||
|
||||
static void __init imx51_dt_init(void)
|
||||
{
|
||||
struct platform_device_info devinfo = { .name = "cpufreq-dt", };
|
||||
|
||||
imx51_ipu_mipi_setup();
|
||||
imx_src_init();
|
||||
|
||||
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
|
||||
platform_device_register_full(&devinfo);
|
||||
}
|
||||
|
||||
static void __init imx51_init_late(void)
|
||||
|
|
|
@ -40,8 +40,6 @@ static void __init imx53_dt_init(void)
|
|||
static void __init imx53_init_late(void)
|
||||
{
|
||||
imx53_pm_init();
|
||||
|
||||
platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
|
||||
}
|
||||
|
||||
static const char * const imx53_dt_board_compat[] __initconst = {
|
||||
|
|
|
@ -105,11 +105,6 @@ static void __init imx7d_init_irq(void)
|
|||
irqchip_init();
|
||||
}
|
||||
|
||||
static void __init imx7d_init_late(void)
|
||||
{
|
||||
platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
|
||||
}
|
||||
|
||||
static const char *const imx7d_dt_compat[] __initconst = {
|
||||
"fsl,imx7d",
|
||||
NULL,
|
||||
|
@ -117,7 +112,6 @@ static const char *const imx7d_dt_compat[] __initconst = {
|
|||
|
||||
DT_MACHINE_START(IMX7D, "Freescale i.MX7 Dual (Device Tree)")
|
||||
.init_irq = imx7d_init_irq,
|
||||
.init_late = imx7d_init_late,
|
||||
.init_machine = imx7d_init_machine,
|
||||
.dt_compat = imx7d_dt_compat,
|
||||
MACHINE_END
|
||||
|
|
|
@ -12,6 +12,11 @@
|
|||
#include <linux/platform_device.h>
|
||||
|
||||
static const struct of_device_id machines[] __initconst = {
|
||||
{ .compatible = "fsl,imx27", },
|
||||
{ .compatible = "fsl,imx51", },
|
||||
{ .compatible = "fsl,imx53", },
|
||||
{ .compatible = "fsl,imx7d", },
|
||||
|
||||
{ .compatible = "marvell,berlin", },
|
||||
|
||||
{ .compatible = "samsung,exynos3250", },
|
||||
|
|
Loading…
Reference in a new issue