Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1360562 > unrolled thread

[PATCH] cpufreq: rockchip: add driver

Started byFeng Xiao <xf@rock-chips.com>
First post2016-03-18 13:20 +0100
Last post2016-03-25 05:50 +0100
Articles 18 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] cpufreq: rockchip: add driver Feng Xiao <xf@rock-chips.com> - 2016-03-18 13:20 +0100
    Re: [PATCH] cpufreq: rockchip: add driver Heiko Stübner <heiko@sntech.de> - 2016-03-18 14:00 +0100
      Re: [PATCH] cpufreq: rockchip: add driver Heiko Stübner <heiko@sntech.de> - 2016-03-21 11:00 +0100
        Re: [PATCH] cpufreq: rockchip: add driver Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-21 11:00 +0100
          Re: [PATCH] cpufreq: rockchip: add driver Feng Xiao <xf@rock-chips.com> - 2016-03-21 14:30 +0100
            Re: [PATCH] cpufreq: rockchip: add driver Heiko Stübner <heiko@sntech.de> - 2016-03-21 16:20 +0100
              Re: [PATCH] cpufreq: rockchip: add driver Heiko Stübner <heiko@sntech.de> - 2016-03-21 17:00 +0100
                Re: [PATCH] cpufreq: rockchip: add driver Feng Xiao <xf@rock-chips.com> - 2016-03-22 02:30 +0100
            Re: [PATCH] cpufreq: rockchip: add driver Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-21 16:20 +0100
      Re: [PATCH] cpufreq: rockchip: add driver Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-21 11:00 +0100
    [PATCH v1] cpufreq: rockchip: add driver Feng Xiao <xf@rock-chips.com> - 2016-03-22 13:00 +0100
      Re: [PATCH v1] cpufreq: rockchip: add driver Heiko Stübner <heiko@sntech.de> - 2016-03-22 17:10 +0100
      [PATCH v2] cpufreq: rockchip: add driver Feng Xiao <xf@rock-chips.com> - 2016-03-23 03:30 +0100
        Re: [PATCH v2] cpufreq: rockchip: add driver Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-23 05:50 +0100
          Re: [PATCH v2] cpufreq: rockchip: add driver Feng Xiao <xf@rock-chips.com> - 2016-03-24 04:10 +0100
            Re: [PATCH v2] cpufreq: rockchip: add driver Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-24 07:50 +0100
              Re: [PATCH v2] cpufreq: rockchip: add driver Finley Xiao <finley.xiao@rock-chips.com> - 2016-03-24 16:10 +0100
                Re: [PATCH v2] cpufreq: rockchip: add driver Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-25 05:50 +0100

#1360562 — [PATCH] cpufreq: rockchip: add driver

FromFeng Xiao <xf@rock-chips.com>
Date2016-03-18 13:20 +0100
Subject[PATCH] cpufreq: rockchip: add driver
Message-ID<re1xL-5E3-7@gated-at.bofh.it>
This driver will directly use cpufreq-dt driver as backend.

As there is not a generic devicetree board file(rockchip.c)
on ARM64 architecture, so remove platform_device_register_simple
in rockchip.c and add a new cpufreq driver to support for all
Rockchip SoCs.

Signed-off-by: Feng Xiao <xf@rock-chips.com>
---
 arch/arm/mach-rockchip/rockchip.c  |  1 -
 drivers/cpufreq/Kconfig.arm        | 10 ++++++++++
 drivers/cpufreq/Makefile           |  1 +
 drivers/cpufreq/rockchip-cpufreq.c | 36 ++++++++++++++++++++++++++++++++++++
 4 files changed, 47 insertions(+), 1 deletion(-)
 create mode 100644 drivers/cpufreq/rockchip-cpufreq.c

diff --git a/arch/arm/mach-rockchip/rockchip.c b/arch/arm/mach-rockchip/rockchip.c
index 3f07cc5..beb71da 100644
--- a/arch/arm/mach-rockchip/rockchip.c
+++ b/arch/arm/mach-rockchip/rockchip.c
@@ -74,7 +74,6 @@ static void __init rockchip_dt_init(void)
 {
 	rockchip_suspend_init();
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-	platform_device_register_simple("cpufreq-dt", 0, NULL, 0);
 }
 
 static const char * const rockchip_board_dt_compat[] = {
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index 14b1f93..1786315 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -97,6 +97,16 @@ config ARM_OMAP2PLUS_CPUFREQ
 	depends on ARCH_OMAP2PLUS
 	default ARCH_OMAP2PLUS
 
+config ARM_ROCKCHIP_CPUFREQ
+	tristate "Rockchip CPUfreq driver"
+	depends on ARCH_ROCKCHIP && CPUFREQ_DT
+	select PM_OPP
+	help
+	  This adds the CPUFreq driver support for Rockchip SoCs.
+	  The driver will directly use cpufreq-dt driver as backend.
+
+	  If in doubt, say N.
+
 config ARM_S3C_CPUFREQ
 	bool
 	help
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
index 9e63fb1..91d8bb7 100644
--- a/drivers/cpufreq/Makefile
+++ b/drivers/cpufreq/Makefile
@@ -61,6 +61,7 @@ obj-$(CONFIG_ARM_MT8173_CPUFREQ)	+= mt8173-cpufreq.o
 obj-$(CONFIG_ARM_OMAP2PLUS_CPUFREQ)	+= omap-cpufreq.o
 obj-$(CONFIG_ARM_PXA2xx_CPUFREQ)	+= pxa2xx-cpufreq.o
 obj-$(CONFIG_PXA3xx)			+= pxa3xx-cpufreq.o
+obj-$(CONFIG_ARM_ROCKCHIP_CPUFREQ)	+= rockchip-cpufreq.o
 obj-$(CONFIG_ARM_S3C24XX_CPUFREQ)	+= s3c24xx-cpufreq.o
 obj-$(CONFIG_ARM_S3C24XX_CPUFREQ_DEBUGFS) += s3c24xx-cpufreq-debugfs.o
 obj-$(CONFIG_ARM_S3C2410_CPUFREQ)	+= s3c2410-cpufreq.o
diff --git a/drivers/cpufreq/rockchip-cpufreq.c b/drivers/cpufreq/rockchip-cpufreq.c
new file mode 100644
index 0000000..ecbadcd
--- /dev/null
+++ b/drivers/cpufreq/rockchip-cpufreq.c
@@ -0,0 +1,36 @@
+/*
+ * Rockchip Platforms CPUFreq Support
+ *
+ * Copyright (C) 2016 Fuzhou Rockchip Electronics Co., Ltd
+ *
+ * Feng Xiao <xf@rock-chips.com>
+ *
+ * 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.
+ */
+
+#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 rockchip_cpufreq_driver_init(void)
+{
+	struct platform_device *pdev;
+
+	pdev = platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
+	return PTR_ERR_OR_ZERO(pdev);
+}
+module_init(rockchip_cpufreq_driver_init);
+
+MODULE_AUTHOR("Feng Xiao <xf@rock-chips.com>");
+MODULE_DESCRIPTION("Rockchip cpufreq driver");
+MODULE_LICENSE("GPL v2");
-- 
1.9.1

[toc] | [next] | [standalone]


#1360592

FromHeiko Stübner <heiko@sntech.de>
Date2016-03-18 14:00 +0100
Message-ID<re2at-5Vd-5@gated-at.bofh.it>
In reply to#1360562
Hi Feng,

Am Freitag, 18. März 2016, 20:10:04 schrieb Feng Xiao:
> This driver will directly use cpufreq-dt driver as backend.
> 
> As there is not a generic devicetree board file(rockchip.c)
> on ARM64 architecture, so remove platform_device_register_simple
> in rockchip.c and add a new cpufreq driver to support for all
> Rockchip SoCs.
> 
> Signed-off-by: Feng Xiao <xf@rock-chips.com>

[...]

> diff --git a/drivers/cpufreq/rockchip-cpufreq.c
> b/drivers/cpufreq/rockchip-cpufreq.c new file mode 100644
> index 0000000..ecbadcd
> --- /dev/null
> +++ b/drivers/cpufreq/rockchip-cpufreq.c
> @@ -0,0 +1,36 @@
> +/*
> + * Rockchip Platforms CPUFreq Support
> + *
> + * Copyright (C) 2016 Fuzhou Rockchip Electronics Co., Ltd
> + *
> + * Feng Xiao <xf@rock-chips.com>
> + *
> + * 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.
> + */
> +
> +#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 rockchip_cpufreq_driver_init(void)
> +{
> +	struct platform_device *pdev;
> +
> +	pdev = platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
> +	return PTR_ERR_OR_ZERO(pdev);

This would create that cpufreq-dt device on all non-Rockchip platforms 
compiled into the same kernel image as well - we definitly don't want that.

Also, on both the rk3368 as well as the rk3399, you probably want the cluster-
handling of arm-bL-cpufreq-dt.
Contrary to its name it is _not_ limited to switching between clusters, but 
can also control frequencies of multiple cpu-clusters running at the same 
time.


Implementation-wise, I guess doing it similar to the scpi-implementation might 
make more sense. Please take a look at drivers/clk/clk-scpi.c that registers 
the virtual cpufreq device there.

So we could do something similar, move the cpufreq from mach-rockchip to the 
clock drivers and register the appropriate cpufreq-driver for each soc.
cpufreq-dt for socs with a single cluster, the bL-thing for socs with multiple 
clusters.


Heiko

[toc] | [prev] | [next] | [standalone]


#1361650

FromHeiko Stübner <heiko@sntech.de>
Date2016-03-21 11:00 +0100
Message-ID<rf4MW-3JE-5@gated-at.bofh.it>
In reply to#1360592
Am Montag, 21. März 2016, 15:20:49 schrieb Viresh Kumar:
> On 18-03-16, 13:56, Heiko Stübner wrote:
> > Also, on both the rk3368 as well as the rk3399, you probably want the
> > cluster- handling of arm-bL-cpufreq-dt.
> > Contrary to its name it is _not_ limited to switching between clusters,
> > but
> > can also control frequencies of multiple cpu-clusters running at the same
> > time.
> 
> We aren't adding any new users to bL driver, please use cpufreq-dt as that
> also supports multiple clusters now.

I hadn't seen that yet ... nice that cpufreq-dt now also supports clusters :-)

The other part still stands though, as we probably should register the 
platform-device somewhere else and not in some new special module.

When everything is using cpufreq-dt now, I guess we could just add it to the 
core rockchip clk-code. Or was there some agreement where this should be done 
(obviously not the devicetree itself)?

[toc] | [prev] | [next] | [standalone]


#1361661

FromViresh Kumar <viresh.kumar@linaro.org>
Date2016-03-21 11:00 +0100
Message-ID<rf4MX-3JE-33@gated-at.bofh.it>
In reply to#1361650
On 21-03-16, 10:54, Heiko Stübner wrote:
> I hadn't seen that yet ... nice that cpufreq-dt now also supports clusters :-)
> 
> The other part still stands though, as we probably should register the 
> platform-device somewhere else and not in some new special module.
> 
> When everything is using cpufreq-dt now, I guess we could just add it to the 
> core rockchip clk-code. Or was there some agreement where this should be done 
> (obviously not the devicetree itself)?

Yeah, there was a discussion around creating a white or black list of platforms
that want to create a platform device for cpufreq-dt. That can be done in
cpufreq-dt.c or a new file, but I haven't worked out on that yet.

You can do it from clk-code or from the driver that was added in this thread.
Just that you need to match your platform's compatible string before doing that.

-- 
viresh

[toc] | [prev] | [next] | [standalone]


#1361821

FromFeng Xiao <xf@rock-chips.com>
Date2016-03-21 14:30 +0100
Message-ID<rf84a-6fl-11@gated-at.bofh.it>
In reply to#1361661

在 2016/3/21 17:58, Viresh Kumar 写道:
> On 21-03-16, 10:54, Heiko Stübner wrote:
>> I hadn't seen that yet ... nice that cpufreq-dt now also supports clusters :-)
>>
>> The other part still stands though, as we probably should register the
>> platform-device somewhere else and not in some new special module.
>>
>> When everything is using cpufreq-dt now, I guess we could just add it to the
>> core rockchip clk-code. Or was there some agreement where this should be done
>> (obviously not the devicetree itself)?
Of_clk_init is called early, and platform_device_register_simple should 
be called after devices_init, it will be failed to do it from clk-code.
So we need add a new file or add module_init to each clock controller 
driver(like clk-rk3368.c, clk-rk3399.c) ?
> Yeah, there was a discussion around creating a white or black list of platforms
> that want to create a platform device for cpufreq-dt. That can be done in
> cpufreq-dt.c or a new file, but I haven't worked out on that yet.
>
> You can do it from clk-code or from the driver that was added in this thread.
> Just that you need to match your platform's compatible string before doing that.
Rockchip-cpufreq.c depends on ARM_ROCKCHIP_CPUFREQ, it will not be 
compiled on non-Rockchip platforms.
The driver can support all Rockchip SoCs up to now, add 
of_machine_is_compatible may be redundant ?
>

[toc] | [prev] | [next] | [standalone]


#1361923

FromHeiko Stübner <heiko@sntech.de>
Date2016-03-21 16:20 +0100
Message-ID<rf9MB-7wN-7@gated-at.bofh.it>
In reply to#1361821
Hi,

Am Montag, 21. März 2016, 21:24:32 schrieb Feng Xiao:
> 在 2016/3/21 17:58, Viresh Kumar 写道:
> > On 21-03-16, 10:54, Heiko Stübner wrote:
> >> I hadn't seen that yet ... nice that cpufreq-dt now also supports
> >> clusters :-)
> >> 
> >> The other part still stands though, as we probably should register the
> >> platform-device somewhere else and not in some new special module.
> >> 
> >> When everything is using cpufreq-dt now, I guess we could just add it to
> >> the core rockchip clk-code. Or was there some agreement where this
> >> should be done (obviously not the devicetree itself)?
> 
> Of_clk_init is called early, and platform_device_register_simple should
> be called after devices_init, it will be failed to do it from clk-code.
> So we need add a new file or add module_init to each clock controller
> driver(like clk-rk3368.c, clk-rk3399.c) ?

as Viresh said, it should be ok to do it like your approach creating a module 
in drivers/cpufreq. But the compatible check is necessary.

Doing it this way also makes it easier to have

> > Yeah, there was a discussion around creating a white or black list of
> > platforms that want to create a platform device for cpufreq-dt. That can
> > be done in cpufreq-dt.c or a new file, but I haven't worked out on that
> > yet.
> > 
> > You can do it from clk-code or from the driver that was added in this
> > thread. Just that you need to match your platform's compatible string
> > before doing that.
> Rockchip-cpufreq.c depends on ARM_ROCKCHIP_CPUFREQ, it will not be
> compiled on non-Rockchip platforms.
> The driver can support all Rockchip SoCs up to now, add
> of_machine_is_compatible may be redundant ?

Please always keep multiplatform in mind. These days the kernel can be 
compiled for multiple architectures at the same time, so you can have support 
for Rockchip, Exynos, Qualcom and whatever in the same kernel image.

Therefore a compile-time check is not enough and you need to check the 
actually running machine as well.


Heiko

[toc] | [prev] | [next] | [standalone]


#1361954

FromHeiko Stübner <heiko@sntech.de>
Date2016-03-21 17:00 +0100
Message-ID<rfapl-7MH-19@gated-at.bofh.it>
In reply to#1361923
Am Montag, 21. März 2016, 16:13:40 schrieb Heiko Stübner:
> Hi,
> 
> Am Montag, 21. März 2016, 21:24:32 schrieb Feng Xiao:
> > 在 2016/3/21 17:58, Viresh Kumar 写道:
> > > On 21-03-16, 10:54, Heiko Stübner wrote:
> > >> I hadn't seen that yet ... nice that cpufreq-dt now also supports
> > >> clusters :-)
> > >> 
> > >> The other part still stands though, as we probably should register the
> > >> platform-device somewhere else and not in some new special module.
> > >> 
> > >> When everything is using cpufreq-dt now, I guess we could just add it
> > >> to
> > >> the core rockchip clk-code. Or was there some agreement where this
> > >> should be done (obviously not the devicetree itself)?
> > 
> > Of_clk_init is called early, and platform_device_register_simple should
> > be called after devices_init, it will be failed to do it from clk-code.
> > So we need add a new file or add module_init to each clock controller
> > driver(like clk-rk3368.c, clk-rk3399.c) ?
> 
> as Viresh said, it should be ok to do it like your approach creating a
> module in drivers/cpufreq. But the compatible check is necessary.
> 
> Doing it this way also makes it easier to have

Seem like I forgot the complete my sentence here. This should've been

Doing it this way also makes it easier to have everything go into cpufreq-dt 
once that whitelist appears that Viresh wrote about. So this might be better 
than to distribute this stuff around other subsystems, as I originally 
suggested.

> 
> > > Yeah, there was a discussion around creating a white or black list of
> > > platforms that want to create a platform device for cpufreq-dt. That can
> > > be done in cpufreq-dt.c or a new file, but I haven't worked out on that
> > > yet.
> > > 
> > > You can do it from clk-code or from the driver that was added in this
> > > thread. Just that you need to match your platform's compatible string
> > > before doing that.
> > 
> > Rockchip-cpufreq.c depends on ARM_ROCKCHIP_CPUFREQ, it will not be
> > compiled on non-Rockchip platforms.
> > The driver can support all Rockchip SoCs up to now, add
> > of_machine_is_compatible may be redundant ?
> 
> Please always keep multiplatform in mind. These days the kernel can be
> compiled for multiple architectures at the same time, so you can have
> support for Rockchip, Exynos, Qualcom and whatever in the same kernel
> image.
> 
> Therefore a compile-time check is not enough and you need to check the
> actually running machine as well.
> 
> 
> Heiko

[toc] | [prev] | [next] | [standalone]


#1362260

FromFeng Xiao <xf@rock-chips.com>
Date2016-03-22 02:30 +0100
Message-ID<rfjiV-5B9-5@gated-at.bofh.it>
In reply to#1361954
I get it, thanks.

在 2016/3/21 23:52, Heiko Stübner 写道:
> Am Montag, 21. März 2016, 16:13:40 schrieb Heiko Stübner:
>> Hi,
>>
>> Am Montag, 21. März 2016, 21:24:32 schrieb Feng Xiao:
>>> 在 2016/3/21 17:58, Viresh Kumar 写道:
>>>> On 21-03-16, 10:54, Heiko Stübner wrote:
>>>>> I hadn't seen that yet ... nice that cpufreq-dt now also supports
>>>>> clusters :-)
>>>>>
>>>>> The other part still stands though, as we probably should register the
>>>>> platform-device somewhere else and not in some new special module.
>>>>>
>>>>> When everything is using cpufreq-dt now, I guess we could just add it
>>>>> to
>>>>> the core rockchip clk-code. Or was there some agreement where this
>>>>> should be done (obviously not the devicetree itself)?
>>> Of_clk_init is called early, and platform_device_register_simple should
>>> be called after devices_init, it will be failed to do it from clk-code.
>>> So we need add a new file or add module_init to each clock controller
>>> driver(like clk-rk3368.c, clk-rk3399.c) ?
>> as Viresh said, it should be ok to do it like your approach creating a
>> module in drivers/cpufreq. But the compatible check is necessary.
>>
>> Doing it this way also makes it easier to have
> Seem like I forgot the complete my sentence here. This should've been
>
> Doing it this way also makes it easier to have everything go into cpufreq-dt
> once that whitelist appears that Viresh wrote about. So this might be better
> than to distribute this stuff around other subsystems, as I originally
> suggested.
>
>>>> Yeah, there was a discussion around creating a white or black list of
>>>> platforms that want to create a platform device for cpufreq-dt. That can
>>>> be done in cpufreq-dt.c or a new file, but I haven't worked out on that
>>>> yet.
>>>>
>>>> You can do it from clk-code or from the driver that was added in this
>>>> thread. Just that you need to match your platform's compatible string
>>>> before doing that.
>>> Rockchip-cpufreq.c depends on ARM_ROCKCHIP_CPUFREQ, it will not be
>>> compiled on non-Rockchip platforms.
>>> The driver can support all Rockchip SoCs up to now, add
>>> of_machine_is_compatible may be redundant ?
>> Please always keep multiplatform in mind. These days the kernel can be
>> compiled for multiple architectures at the same time, so you can have
>> support for Rockchip, Exynos, Qualcom and whatever in the same kernel
>> image.
>>
>> Therefore a compile-time check is not enough and you need to check the
>> actually running machine as well.
>>
>>
>> Heiko
>
>
>

[toc] | [prev] | [next] | [standalone]


#1361928

FromViresh Kumar <viresh.kumar@linaro.org>
Date2016-03-21 16:20 +0100
Message-ID<rf9MC-7wN-21@gated-at.bofh.it>
In reply to#1361821
On 21-03-16, 21:24, Feng Xiao wrote:
> Rockchip-cpufreq.c depends on ARM_ROCKCHIP_CPUFREQ, it will not be compiled
> on non-Rockchip platforms.
> The driver can support all Rockchip SoCs up to now, add
> of_machine_is_compatible may be redundant ?

Heard of Multi-platform kernels ?

-- 
viresh

[toc] | [prev] | [next] | [standalone]


#1361652

FromViresh Kumar <viresh.kumar@linaro.org>
Date2016-03-21 11:00 +0100
Message-ID<rf4MW-3JE-7@gated-at.bofh.it>
In reply to#1360592
On 18-03-16, 13:56, Heiko Stübner wrote:
> Also, on both the rk3368 as well as the rk3399, you probably want the cluster-
> handling of arm-bL-cpufreq-dt.
> Contrary to its name it is _not_ limited to switching between clusters, but 
> can also control frequencies of multiple cpu-clusters running at the same 
> time.

We aren't adding any new users to bL driver, please use cpufreq-dt as that also
supports multiple clusters now.

-- 
viresh

[toc] | [prev] | [next] | [standalone]


#1362671 — [PATCH v1] cpufreq: rockchip: add driver

FromFeng Xiao <xf@rock-chips.com>
Date2016-03-22 13:00 +0100
Subject[PATCH v1] cpufreq: rockchip: add driver
Message-ID<rft8C-3Pc-13@gated-at.bofh.it>
In reply to#1360562
This driver will directly use cpufreq-dt driver as backend.

As there is not a generic devicetree board file(rockchip.c)
on ARM64 architecture, so remove platform_device_register_simple
in rockchip.c and add a new cpufreq driver to support Rockchip
SoCs.

Signed-off-by: Feng Xiao <xf@rock-chips.com>
---
change in v1:
- add compatible check

 arch/arm/mach-rockchip/rockchip.c  |  1 -
 drivers/cpufreq/Kconfig.arm        | 10 +++++++
 drivers/cpufreq/Makefile           |  1 +
 drivers/cpufreq/rockchip-cpufreq.c | 55 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 66 insertions(+), 1 deletion(-)
 create mode 100644 drivers/cpufreq/rockchip-cpufreq.c

diff --git a/arch/arm/mach-rockchip/rockchip.c b/arch/arm/mach-rockchip/rockchip.c
index 3f07cc5..beb71da 100644
--- a/arch/arm/mach-rockchip/rockchip.c
+++ b/arch/arm/mach-rockchip/rockchip.c
@@ -74,7 +74,6 @@ static void __init rockchip_dt_init(void)
 {
 	rockchip_suspend_init();
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-	platform_device_register_simple("cpufreq-dt", 0, NULL, 0);
 }
 
 static const char * const rockchip_board_dt_compat[] = {
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index 14b1f93..1786315 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -97,6 +97,16 @@ config ARM_OMAP2PLUS_CPUFREQ
 	depends on ARCH_OMAP2PLUS
 	default ARCH_OMAP2PLUS
 
+config ARM_ROCKCHIP_CPUFREQ
+	tristate "Rockchip CPUfreq driver"
+	depends on ARCH_ROCKCHIP && CPUFREQ_DT
+	select PM_OPP
+	help
+	  This adds the CPUFreq driver support for Rockchip SoCs.
+	  The driver will directly use cpufreq-dt driver as backend.
+
+	  If in doubt, say N.
+
 config ARM_S3C_CPUFREQ
 	bool
 	help
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
index 9e63fb1..91d8bb7 100644
--- a/drivers/cpufreq/Makefile
+++ b/drivers/cpufreq/Makefile
@@ -61,6 +61,7 @@ obj-$(CONFIG_ARM_MT8173_CPUFREQ)	+= mt8173-cpufreq.o
 obj-$(CONFIG_ARM_OMAP2PLUS_CPUFREQ)	+= omap-cpufreq.o
 obj-$(CONFIG_ARM_PXA2xx_CPUFREQ)	+= pxa2xx-cpufreq.o
 obj-$(CONFIG_PXA3xx)			+= pxa3xx-cpufreq.o
+obj-$(CONFIG_ARM_ROCKCHIP_CPUFREQ)	+= rockchip-cpufreq.o
 obj-$(CONFIG_ARM_S3C24XX_CPUFREQ)	+= s3c24xx-cpufreq.o
 obj-$(CONFIG_ARM_S3C24XX_CPUFREQ_DEBUGFS) += s3c24xx-cpufreq-debugfs.o
 obj-$(CONFIG_ARM_S3C2410_CPUFREQ)	+= s3c2410-cpufreq.o
diff --git a/drivers/cpufreq/rockchip-cpufreq.c b/drivers/cpufreq/rockchip-cpufreq.c
new file mode 100644
index 0000000..65c1de9
--- /dev/null
+++ b/drivers/cpufreq/rockchip-cpufreq.c
@@ -0,0 +1,55 @@
+/*
+ * Rockchip Platforms CPUFreq Support
+ *
+ * Copyright (C) 2016 Fuzhou Rockchip Electronics Co., Ltd
+ *
+ * Feng Xiao <xf@rock-chips.com>
+ *
+ * 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.
+ */
+
+#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 const char * const rockchip_compat[] = {
+	"rockchip,rk2928",
+	"rockchip,rk3066a",
+	"rockchip,rk3066b",
+	"rockchip,rk3188",
+	"rockchip,rk3288",
+	"rockchip,rk3366",
+	"rockchip,rk3368",
+	"rockchip,rk3399",
+};
+
+static int __init rockchip_cpufreq_driver_init(void)
+{
+	struct platform_device *pdev;
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(rockchip_compat); i++) {
+		if (of_machine_is_compatible(rockchip_compat[i])) {
+			pdev = platform_device_register_simple("cpufreq-dt",
+							       -1, NULL, 0);
+			return PTR_ERR_OR_ZERO(pdev);
+		}
+	}
+
+	return -ENODEV;
+}
+module_init(rockchip_cpufreq_driver_init);
+
+MODULE_AUTHOR("Feng Xiao <xf@rock-chips.com>");
+MODULE_DESCRIPTION("Rockchip cpufreq driver");
+MODULE_LICENSE("GPL v2");
-- 
1.9.1

[toc] | [prev] | [next] | [standalone]


#1362829 — Re: [PATCH v1] cpufreq: rockchip: add driver

FromHeiko Stübner <heiko@sntech.de>
Date2016-03-22 17:10 +0100
SubjectRe: [PATCH v1] cpufreq: rockchip: add driver
Message-ID<rfx2y-6XE-13@gated-at.bofh.it>
In reply to#1362671
Hi,

Am Dienstag, 22. März 2016, 19:57:28 schrieb Feng Xiao:
> This driver will directly use cpufreq-dt driver as backend.
> 
> As there is not a generic devicetree board file(rockchip.c)
> on ARM64 architecture, so remove platform_device_register_simple
> in rockchip.c and add a new cpufreq driver to support Rockchip
> SoCs.
> 
> Signed-off-by: Feng Xiao <xf@rock-chips.com>

some hints regarding the soc-selection below, otherwise this looks nice.

Reviewed-by: Heiko Stuebner <heiko@sntech.de>

[includes an Ack for the mach-rockchip change ;-) ]

[...]

> diff --git a/drivers/cpufreq/rockchip-cpufreq.c
> b/drivers/cpufreq/rockchip-cpufreq.c new file mode 100644
> index 0000000..65c1de9
> --- /dev/null
> +++ b/drivers/cpufreq/rockchip-cpufreq.c
> @@ -0,0 +1,55 @@
> +/*
> + * Rockchip Platforms CPUFreq Support
> + *
> + * Copyright (C) 2016 Fuzhou Rockchip Electronics Co., Ltd
> + *
> + * Feng Xiao <xf@rock-chips.com>
> + *
> + * 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.
> + */
> +
> +#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 const char * const rockchip_compat[] = {
> +	"rockchip,rk2928",

+	"rockchip,rk3036",

> +	"rockchip,rk3066a",
> +	"rockchip,rk3066b",
> +	"rockchip,rk3188",

+	"rockchip,rk3228",

> +	"rockchip,rk3288",
> +	"rockchip,rk3366",
> +	"rockchip,rk3368",
> +	"rockchip,rk3399",
> +};
> +
> +static int __init rockchip_cpufreq_driver_init(void)
> +{
> +	struct platform_device *pdev;
> +	int i;
> +
> +	for (i = 0; i < ARRAY_SIZE(rockchip_compat); i++) {
> +		if (of_machine_is_compatible(rockchip_compat[i])) {
> +			pdev = platform_device_register_simple("cpufreq-dt",
> +							       -1, NULL, 0);
> +			return PTR_ERR_OR_ZERO(pdev);
> +		}
> +	}
> +
> +	return -ENODEV;
> +}
> +module_init(rockchip_cpufreq_driver_init);
> +
> +MODULE_AUTHOR("Feng Xiao <xf@rock-chips.com>");
> +MODULE_DESCRIPTION("Rockchip cpufreq driver");
> +MODULE_LICENSE("GPL v2");

[toc] | [prev] | [next] | [standalone]


#1363165 — [PATCH v2] cpufreq: rockchip: add driver

FromFeng Xiao <xf@rock-chips.com>
Date2016-03-23 03:30 +0100
Subject[PATCH v2] cpufreq: rockchip: add driver
Message-ID<rfGIx-54a-1@gated-at.bofh.it>
In reply to#1362671
This driver will directly use cpufreq-dt driver as backend.

As there is not a generic devicetree board file(rockchip.c)
on ARM64 architecture, so remove platform_device_register_simple
in rockchip.c and add a new cpufreq driver to support Rockchip
SoCs.

Signed-off-by: Feng Xiao <xf@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
---
change in v2:
- add rockchip,rk3036 and rockchip,rk3228 to compatibility list

change in v1:
- add compatible check

 arch/arm/mach-rockchip/rockchip.c  |  1 -
 drivers/cpufreq/Kconfig.arm        | 10 +++++++
 drivers/cpufreq/Makefile           |  1 +
 drivers/cpufreq/rockchip-cpufreq.c | 57 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 68 insertions(+), 1 deletion(-)
 create mode 100644 drivers/cpufreq/rockchip-cpufreq.c

diff --git a/arch/arm/mach-rockchip/rockchip.c b/arch/arm/mach-rockchip/rockchip.c
index 3f07cc5..beb71da 100644
--- a/arch/arm/mach-rockchip/rockchip.c
+++ b/arch/arm/mach-rockchip/rockchip.c
@@ -74,7 +74,6 @@ static void __init rockchip_dt_init(void)
 {
 	rockchip_suspend_init();
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-	platform_device_register_simple("cpufreq-dt", 0, NULL, 0);
 }
 
 static const char * const rockchip_board_dt_compat[] = {
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index 14b1f93..1786315 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -97,6 +97,16 @@ config ARM_OMAP2PLUS_CPUFREQ
 	depends on ARCH_OMAP2PLUS
 	default ARCH_OMAP2PLUS
 
+config ARM_ROCKCHIP_CPUFREQ
+	tristate "Rockchip CPUfreq driver"
+	depends on ARCH_ROCKCHIP && CPUFREQ_DT
+	select PM_OPP
+	help
+	  This adds the CPUFreq driver support for Rockchip SoCs.
+	  The driver will directly use cpufreq-dt driver as backend.
+
+	  If in doubt, say N.
+
 config ARM_S3C_CPUFREQ
 	bool
 	help
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
index 9e63fb1..91d8bb7 100644
--- a/drivers/cpufreq/Makefile
+++ b/drivers/cpufreq/Makefile
@@ -61,6 +61,7 @@ obj-$(CONFIG_ARM_MT8173_CPUFREQ)	+= mt8173-cpufreq.o
 obj-$(CONFIG_ARM_OMAP2PLUS_CPUFREQ)	+= omap-cpufreq.o
 obj-$(CONFIG_ARM_PXA2xx_CPUFREQ)	+= pxa2xx-cpufreq.o
 obj-$(CONFIG_PXA3xx)			+= pxa3xx-cpufreq.o
+obj-$(CONFIG_ARM_ROCKCHIP_CPUFREQ)	+= rockchip-cpufreq.o
 obj-$(CONFIG_ARM_S3C24XX_CPUFREQ)	+= s3c24xx-cpufreq.o
 obj-$(CONFIG_ARM_S3C24XX_CPUFREQ_DEBUGFS) += s3c24xx-cpufreq-debugfs.o
 obj-$(CONFIG_ARM_S3C2410_CPUFREQ)	+= s3c2410-cpufreq.o
diff --git a/drivers/cpufreq/rockchip-cpufreq.c b/drivers/cpufreq/rockchip-cpufreq.c
new file mode 100644
index 0000000..9266614
--- /dev/null
+++ b/drivers/cpufreq/rockchip-cpufreq.c
@@ -0,0 +1,57 @@
+/*
+ * Rockchip Platforms CPUFreq Support
+ *
+ * Copyright (C) 2016 Fuzhou Rockchip Electronics Co., Ltd
+ *
+ * Feng Xiao <xf@rock-chips.com>
+ *
+ * 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.
+ */
+
+#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 const char * const rockchip_compat[] = {
+	"rockchip,rk2928",
+	"rockchip,rk3036",
+	"rockchip,rk3066a",
+	"rockchip,rk3066b",
+	"rockchip,rk3188",
+	"rockchip,rk3228",
+	"rockchip,rk3288",
+	"rockchip,rk3366",
+	"rockchip,rk3368",
+	"rockchip,rk3399",
+};
+
+static int __init rockchip_cpufreq_driver_init(void)
+{
+	struct platform_device *pdev;
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(rockchip_compat); i++) {
+		if (of_machine_is_compatible(rockchip_compat[i])) {
+			pdev = platform_device_register_simple("cpufreq-dt",
+							       -1, NULL, 0);
+			return PTR_ERR_OR_ZERO(pdev);
+		}
+	}
+
+	return -ENODEV;
+}
+module_init(rockchip_cpufreq_driver_init);
+
+MODULE_AUTHOR("Feng Xiao <xf@rock-chips.com>");
+MODULE_DESCRIPTION("Rockchip cpufreq driver");
+MODULE_LICENSE("GPL v2");
-- 
1.9.1

[toc] | [prev] | [next] | [standalone]


#1363199 — Re: [PATCH v2] cpufreq: rockchip: add driver

FromViresh Kumar <viresh.kumar@linaro.org>
Date2016-03-23 05:50 +0100
SubjectRe: [PATCH v2] cpufreq: rockchip: add driver
Message-ID<rfIU1-6Hf-11@gated-at.bofh.it>
In reply to#1363165
On 23-03-16, 10:18, Feng Xiao wrote:
> diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
> index 14b1f93..1786315 100644
> --- a/drivers/cpufreq/Kconfig.arm
> +++ b/drivers/cpufreq/Kconfig.arm
> @@ -97,6 +97,16 @@ config ARM_OMAP2PLUS_CPUFREQ
>  	depends on ARCH_OMAP2PLUS
>  	default ARCH_OMAP2PLUS
>  
> +config ARM_ROCKCHIP_CPUFREQ
> +	tristate "Rockchip CPUfreq driver"

Since you are allowing it to be built as a module ...

> +	depends on ARCH_ROCKCHIP && CPUFREQ_DT
> +	select PM_OPP
> +	help
> +	  This adds the CPUFreq driver support for Rockchip SoCs.
> +	  The driver will directly use cpufreq-dt driver as backend.
> +
> +	  If in doubt, say N.

> +++ b/drivers/cpufreq/rockchip-cpufreq.c
> +static int __init rockchip_cpufreq_driver_init(void)
> +{
> +	struct platform_device *pdev;
> +	int i;
> +
> +	for (i = 0; i < ARRAY_SIZE(rockchip_compat); i++) {
> +		if (of_machine_is_compatible(rockchip_compat[i])) {
> +			pdev = platform_device_register_simple("cpufreq-dt",
> +							       -1, NULL, 0);
> +			return PTR_ERR_OR_ZERO(pdev);
> +		}
> +	}
> +
> +	return -ENODEV;
> +}
> +module_init(rockchip_cpufreq_driver_init);

You need a module exit as well to remove the device. Otherwise following
sequence will give you errors:

insmod rockchip-cpufreq.ko
rmmod rockchip-cpufreq.ko
insmod rockchip-cpufreq.ko //Errors on this..

So, either don't allow it to be built as a module or fix the module-exit path.

-- 
viresh

[toc] | [prev] | [next] | [standalone]


#1363885 — Re: [PATCH v2] cpufreq: rockchip: add driver

FromFeng Xiao <xf@rock-chips.com>
Date2016-03-24 04:10 +0100
SubjectRe: [PATCH v2] cpufreq: rockchip: add driver
Message-ID<rg3OO-4FE-15@gated-at.bofh.it>
In reply to#1363199
hi all,
      I found that it could match the cpufreq-dt driver succesfully only 
with the following changes.
--- a/arch/arm64/boot/dts/rockchip/rk3366.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3366.dtsi
@@ -139,6 +139,10 @@
                 };
         };

+       cpufreq-dt {   //the node name must be cpufreq-dt
+               compatible = "rockchip,cpufreq";  //  the compatible 
name is insignificant
+       };
+

This was supported by the commit 07e461cd7e73a84f0e3757932b93cc80976fd749

commit 07e461cd7e73a84f0e3757932b93cc80976fd749
Author: Grant Likely <grant.likely@linaro.org>
Date:   Wed May 21 15:40:31 2014 +0900

     of: Ensure unique names without sacrificing determinism

     The way the driver core is implemented, every device using the same bus
     type is required to have a unique name because a symlink to each device
     is created in the appropriate /sys/bus/*/devices directory, and two
     identical names causes a collision.

     The current code handles the requirement by using an globally
     incremented counter that is appended to the device name. It works, but
     it means any change to device registration will change the assigned
     numbers. Instead, if we build up the name by using information from the
     parent nodes, then it can be guaranteed to be unique without adding a
     random number to the end of it.

     Signed-off-by: Grant Likely <grant.likely@linaro.org>
     Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
     Cc: Rob Herring <robh@kernel.org>

If so, do I need to continue to add the new cpufreq driver ?

在 2016/3/23 12:40, Viresh Kumar 写道:
> On 23-03-16, 10:18, Feng Xiao wrote:
>> diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
>> index 14b1f93..1786315 100644
>> --- a/drivers/cpufreq/Kconfig.arm
>> +++ b/drivers/cpufreq/Kconfig.arm
>> @@ -97,6 +97,16 @@ config ARM_OMAP2PLUS_CPUFREQ
>>   	depends on ARCH_OMAP2PLUS
>>   	default ARCH_OMAP2PLUS
>>   
>> +config ARM_ROCKCHIP_CPUFREQ
>> +	tristate "Rockchip CPUfreq driver"
> Since you are allowing it to be built as a module ...
>
>> +	depends on ARCH_ROCKCHIP && CPUFREQ_DT
>> +	select PM_OPP
>> +	help
>> +	  This adds the CPUFreq driver support for Rockchip SoCs.
>> +	  The driver will directly use cpufreq-dt driver as backend.
>> +
>> +	  If in doubt, say N.
>> +++ b/drivers/cpufreq/rockchip-cpufreq.c
>> +static int __init rockchip_cpufreq_driver_init(void)
>> +{
>> +	struct platform_device *pdev;
>> +	int i;
>> +
>> +	for (i = 0; i < ARRAY_SIZE(rockchip_compat); i++) {
>> +		if (of_machine_is_compatible(rockchip_compat[i])) {
>> +			pdev = platform_device_register_simple("cpufreq-dt",
>> +							       -1, NULL, 0);
>> +			return PTR_ERR_OR_ZERO(pdev);
>> +		}
>> +	}
>> +
>> +	return -ENODEV;
>> +}
>> +module_init(rockchip_cpufreq_driver_init);
> You need a module exit as well to remove the device. Otherwise following
> sequence will give you errors:
>
> insmod rockchip-cpufreq.ko
> rmmod rockchip-cpufreq.ko
> insmod rockchip-cpufreq.ko //Errors on this..
>
> So, either don't allow it to be built as a module or fix the module-exit path.
>

[toc] | [prev] | [next] | [standalone]


#1363951 — Re: [PATCH v2] cpufreq: rockchip: add driver

FromViresh Kumar <viresh.kumar@linaro.org>
Date2016-03-24 07:50 +0100
SubjectRe: [PATCH v2] cpufreq: rockchip: add driver
Message-ID<rg7fI-7bf-3@gated-at.bofh.it>
In reply to#1363885
On 24-03-16, 11:01, Feng Xiao wrote:
> hi all,
>      I found that it could match the cpufreq-dt driver succesfully only with
> the following changes.
> --- a/arch/arm64/boot/dts/rockchip/rk3366.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3366.dtsi
> @@ -139,6 +139,10 @@
>                 };
>         };
> 
> +       cpufreq-dt {   //the node name must be cpufreq-dt
> +               compatible = "rockchip,cpufreq";  //  the compatible name is
> insignificant
> +       };
> +

Its not allowed to create a DT node for a dummy device and so we never
followed this way.

I have just sent a patchset and cc'd you:
"[PATCH 0/3] cpufreq: dt: Create platform device from generic code"

and so this patch shall get replaced now.

-- 
viresh

[toc] | [prev] | [next] | [standalone]


#1364257 — Re: [PATCH v2] cpufreq: rockchip: add driver

FromFinley Xiao <finley.xiao@rock-chips.com>
Date2016-03-24 16:10 +0100
SubjectRe: [PATCH v2] cpufreq: rockchip: add driver
Message-ID<rgf3z-4oM-7@gated-at.bofh.it>
In reply to#1363951
Hi Viresh,

can we add a of_match_table with a common compatible name as follows ?

--- a/drivers/cpufreq/cpufreq-dt.c
+++ b/drivers/cpufreq/cpufreq-dt.c
@@ -470,10 +470,16 @@ static int dt_cpufreq_remove(struct 
platform_device *pdev)
         cpufreq_unregister_driver(&dt_cpufreq_driver);
         return 0;
  }
+static const struct of_device_id dt_cpufreq_of_match[] = {
+       { .compatible = "***,***", },
+       { }
+};
+MODULE_DEVICE_TABLE(of, dt_cpufreq_of_match);
  static struct platform_driver dt_cpufreq_platdrv = {
         .driver = {
                 .name   = "cpufreq-dt",
+               .of_match_table = dt_cpufreq_of_match,
         },

--- a/arch/arm64/boot/dts/rockchip/rk3366.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3366.dtsi
+       cpufreq {
+               compatible = "***,***";
+       }

Does it create a DT node for a dummy device too ?


在 2016/3/24 14:43, Viresh Kumar 写道:
> On 24-03-16, 11:01, Feng Xiao wrote:
>> hi all,
>>       I found that it could match the cpufreq-dt driver succesfully only with
>> the following changes.
>> --- a/arch/arm64/boot/dts/rockchip/rk3366.dtsi
>> +++ b/arch/arm64/boot/dts/rockchip/rk3366.dtsi
>> @@ -139,6 +139,10 @@
>>                  };
>>          };
>>
>> +       cpufreq-dt {   //the node name must be cpufreq-dt
>> +               compatible = "rockchip,cpufreq";  //  the compatible name is
>> insignificant
>> +       };
>> +
> Its not allowed to create a DT node for a dummy device and so we never
> followed this way.
>
> I have just sent a patchset and cc'd you:
> "[PATCH 0/3] cpufreq: dt: Create platform device from generic code"
>
> and so this patch shall get replaced now.
>

-- 
Finley

[toc] | [prev] | [next] | [standalone]


#1364560 — Re: [PATCH v2] cpufreq: rockchip: add driver

FromViresh Kumar <viresh.kumar@linaro.org>
Date2016-03-25 05:50 +0100
SubjectRe: [PATCH v2] cpufreq: rockchip: add driver
Message-ID<rgrR7-4O1-17@gated-at.bofh.it>
In reply to#1364257
On 24-03-16, 23:09, Finley Xiao wrote:
> --- a/arch/arm64/boot/dts/rockchip/rk3366.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3366.dtsi
> +       cpufreq {
> +               compatible = "***,***";
> +       }
> 
> Does it create a DT node for a dummy device too ?

Yes, its not allowed.

-- 
viresh

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web