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


Groups > linux.kernel > #1712692 > unrolled thread

[PATCH 1/2] cpufreq: dt-platdev: Automatically create cpufreq device with OPP v2

Started byViresh Kumar <viresh.kumar@linaro.org>
First post2017-08-16 07:40 +0200
Last post2017-08-23 05:50 +0200
Articles 14 — 5 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/2] cpufreq: dt-platdev: Automatically create cpufreq device with OPP v2 Viresh Kumar <viresh.kumar@linaro.org> - 2017-08-16 07:40 +0200
    [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist Viresh Kumar <viresh.kumar@linaro.org> - 2017-08-16 07:40 +0200
      Re: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist Geert Uytterhoeven <geert@linux-m68k.org> - 2017-08-16 09:00 +0200
        Re: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist Simon Horman <horms@verge.net.au> - 2017-08-17 10:00 +0200
          Re: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist Viresh Kumar <viresh.kumar@linaro.org> - 2017-08-17 10:50 +0200
          Re: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist Simon Horman <horms@verge.net.au> - 2017-08-21 15:30 +0200
      Re: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist Chen-Yu Tsai <wens@csie.org> - 2017-08-16 11:00 +0200
        Re: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist Viresh Kumar <viresh.kumar@linaro.org> - 2017-08-16 13:30 +0200
          Re: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist Chen-Yu Tsai <wens@csie.org> - 2017-08-17 19:10 +0200
      Re: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-08-23 05:40 +0200
    Re: [PATCH 1/2] cpufreq: dt-platdev: Automatically create cpufreq  device with OPP v2 Chen-Yu Tsai <wens@csie.org> - 2017-08-16 10:50 +0200
      Re: [PATCH 1/2] cpufreq: dt-platdev: Automatically create cpufreq  device with OPP v2 Viresh Kumar <viresh.kumar@linaro.org> - 2017-08-16 13:30 +0200
    Re: [1/2] cpufreq: dt-platdev: Automatically create cpufreq device  with OPP v2 Simon Horman <horms@verge.net.au> - 2017-08-21 15:20 +0200
      Re: [1/2] cpufreq: dt-platdev: Automatically create cpufreq device  with OPP v2 Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-08-23 05:50 +0200

#1712692 — [PATCH 1/2] cpufreq: dt-platdev: Automatically create cpufreq device with OPP v2

FromViresh Kumar <viresh.kumar@linaro.org>
Date2017-08-16 07:40 +0200
Subject[PATCH 1/2] cpufreq: dt-platdev: Automatically create cpufreq device with OPP v2
Message-ID<ueZdD-30Q-7@gated-at.bofh.it>
The initial idea of creating the cpufreq-dt-platdev.c file was to keep a
list of platforms that use the "operating-points" (V1) bindings and
create cpufreq device for them only, as we weren't sure which platforms
would want the device to get created automatically as some had their own
cpufreq drivers as well, or wanted to initialize cpufreq after doing
some stuff from platform code.

But that wasn't the case with platforms using "operating-points-v2"
property. We wanted the device to get created automatically without the
need of adding them to the whitelist. Though, we will still have some
exceptions where we don't want to create the device automatically.

Rename the earlier platform list as *whitelist* and create a new
*blacklist* as well.

The cpufreq-dt device will get created if:
- The platform is there in the whitelist OR
- The platform has "operating-points-v2" property in CPU0's DT node and
  isn't part of the blacklist .

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/cpufreq-dt-platdev.c | 45 ++++++++++++++++++++++++++++++++----
 1 file changed, 40 insertions(+), 5 deletions(-)

diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index bcee384b3251..061b468512a2 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -9,11 +9,16 @@
 
 #include <linux/err.h>
 #include <linux/of.h>
+#include <linux/of_device.h>
 #include <linux/platform_device.h>
 
 #include "cpufreq-dt.h"
 
-static const struct of_device_id machines[] __initconst = {
+/*
+ * Machines for which the cpufreq device is *always* created, mostly used for
+ * platforms using "operating-points" (V1) property.
+ */
+static const struct of_device_id whitelist[] __initconst = {
 	{ .compatible = "allwinner,sun4i-a10", },
 	{ .compatible = "allwinner,sun5i-a10s", },
 	{ .compatible = "allwinner,sun5i-a13", },
@@ -101,21 +106,51 @@ static const struct of_device_id machines[] __initconst = {
 	{ }
 };
 
+/*
+ * Machines for which the cpufreq device is *not* created, mostly used for
+ * platforms using "operating-points-v2" property.
+ */
+static const struct of_device_id blacklist[] __initconst = {
+	{ }
+};
+
+static bool __init cpu0_node_has_opp_v2_prop(void)
+{
+	struct device_node *np = of_cpu_device_node_get(0);
+	bool ret = false;
+
+	if (of_get_property(np, "operating-points-v2", NULL))
+		ret = true;
+
+	of_node_put(np);
+	return ret;
+}
+
 static int __init cpufreq_dt_platdev_init(void)
 {
 	struct device_node *np = of_find_node_by_path("/");
 	const struct of_device_id *match;
+	const void *data = NULL;
 
 	if (!np)
 		return -ENODEV;
 
-	match = of_match_node(machines, np);
+	match = of_match_node(whitelist, np);
+	if (match) {
+		data = match->data;
+		goto create_pdev;
+	}
+
+	if (cpu0_node_has_opp_v2_prop() && !of_match_node(blacklist, np))
+		goto create_pdev;
+
 	of_node_put(np);
-	if (!match)
-		return -ENODEV;
+	return -ENODEV;
 
+create_pdev:
+	of_node_put(np);
 	return PTR_ERR_OR_ZERO(platform_device_register_data(NULL, "cpufreq-dt",
-			       -1, match->data,
+			       -1, data,
 			       sizeof(struct cpufreq_dt_platform_data)));
 }
 device_initcall(cpufreq_dt_platdev_init);
-- 
2.7.4

[toc] | [next] | [standalone]


#1712695 — [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist

FromViresh Kumar <viresh.kumar@linaro.org>
Date2017-08-16 07:40 +0200
Subject[PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist
Message-ID<ueZdD-30Q-13@gated-at.bofh.it>
In reply to#1712692
Drop few ARM (32 and 64 bit) platforms from the whitelist which always
use "operating-points-v2" property from their DT. They should continue
to work after this patch.

Tested on Hikey platform (only the "hisilicon,hi6220" entry).

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/cpufreq-dt-platdev.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index 061b468512a2..45f2ec3b7f7a 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -27,7 +27,6 @@ static const struct of_device_id whitelist[] __initconst = {
 	{ .compatible = "allwinner,sun6i-a31s", },
 	{ .compatible = "allwinner,sun7i-a20", },
 	{ .compatible = "allwinner,sun8i-a23", },
-	{ .compatible = "allwinner,sun8i-a33", },
 	{ .compatible = "allwinner,sun8i-a83t", },
 	{ .compatible = "allwinner,sun8i-h3", },
 
@@ -37,7 +36,6 @@ static const struct of_device_id whitelist[] __initconst = {
 	{ .compatible = "arm,integrator-cp", },
 
 	{ .compatible = "hisilicon,hi3660", },
-	{ .compatible = "hisilicon,hi6220", },
 
 	{ .compatible = "fsl,imx27", },
 	{ .compatible = "fsl,imx51", },
@@ -51,11 +49,8 @@ static const struct of_device_id whitelist[] __initconst = {
 	{ .compatible = "samsung,exynos3250", },
 	{ .compatible = "samsung,exynos4210", },
 	{ .compatible = "samsung,exynos4212", },
-	{ .compatible = "samsung,exynos4412", },
 	{ .compatible = "samsung,exynos5250", },
 #ifndef CONFIG_BL_SWITCHER
-	{ .compatible = "samsung,exynos5420", },
-	{ .compatible = "samsung,exynos5433", },
 	{ .compatible = "samsung,exynos5800", },
 #endif
 
@@ -87,11 +82,7 @@ static const struct of_device_id whitelist[] __initconst = {
 	{ .compatible = "rockchip,rk3368", },
 	{ .compatible = "rockchip,rk3399", },
 
-	{ .compatible = "socionext,uniphier-pro5", },
-	{ .compatible = "socionext,uniphier-pxs2", },
 	{ .compatible = "socionext,uniphier-ld6b", },
-	{ .compatible = "socionext,uniphier-ld11", },
-	{ .compatible = "socionext,uniphier-ld20", },
 
 	{ .compatible = "ti,omap2", },
 	{ .compatible = "ti,omap3", },
@@ -101,8 +92,6 @@ static const struct of_device_id whitelist[] __initconst = {
 	{ .compatible = "xlnx,zynq-7000", },
 	{ .compatible = "xlnx,zynqmp", },
 
-	{ .compatible = "zte,zx296718", },
-
 	{ }
 };
 
-- 
2.7.4

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


#1712721 — Re: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist

FromGeert Uytterhoeven <geert@linux-m68k.org>
Date2017-08-16 09:00 +0200
SubjectRe: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist
Message-ID<uf0t3-3Hx-3@gated-at.bofh.it>
In reply to#1712695
Hi Viresh,

On Wed, Aug 16, 2017 at 7:37 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> Drop few ARM (32 and 64 bit) platforms from the whitelist which always
> use "operating-points-v2" property from their DT. They should continue
> to work after this patch.
>
> Tested on Hikey platform (only the "hisilicon,hi6220" entry).
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  drivers/cpufreq/cpufreq-dt-platdev.c | 11 -----------
>  1 file changed, 11 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
> index 061b468512a2..45f2ec3b7f7a 100644
> --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> @@ -27,7 +27,6 @@ static const struct of_device_id whitelist[] __initconst = {
>         { .compatible = "allwinner,sun6i-a31s", },
>         { .compatible = "allwinner,sun7i-a20", },
>         { .compatible = "allwinner,sun8i-a23", },
> -       { .compatible = "allwinner,sun8i-a33", },
>         { .compatible = "allwinner,sun8i-a83t", },
>         { .compatible = "allwinner,sun8i-h3", },

I think "renesas,r8a7795" can be removed again, too.
Simon?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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


#1713631 — Re: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist

FromSimon Horman <horms@verge.net.au>
Date2017-08-17 10:00 +0200
SubjectRe: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist
Message-ID<ufnSH-1MZ-39@gated-at.bofh.it>
In reply to#1712721
On Wed, Aug 16, 2017 at 08:51:04AM +0200, Geert Uytterhoeven wrote:
> Hi Viresh,
> 
> On Wed, Aug 16, 2017 at 7:37 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > Drop few ARM (32 and 64 bit) platforms from the whitelist which always
> > use "operating-points-v2" property from their DT. They should continue
> > to work after this patch.
> >
> > Tested on Hikey platform (only the "hisilicon,hi6220" entry).
> >
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > ---
> >  drivers/cpufreq/cpufreq-dt-platdev.c | 11 -----------
> >  1 file changed, 11 deletions(-)
> >
> > diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
> > index 061b468512a2..45f2ec3b7f7a 100644
> > --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> > +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> > @@ -27,7 +27,6 @@ static const struct of_device_id whitelist[] __initconst = {
> >         { .compatible = "allwinner,sun6i-a31s", },
> >         { .compatible = "allwinner,sun7i-a20", },
> >         { .compatible = "allwinner,sun8i-a23", },
> > -       { .compatible = "allwinner,sun8i-a33", },
> >         { .compatible = "allwinner,sun8i-a83t", },
> >         { .compatible = "allwinner,sun8i-h3", },
> 
> I think "renesas,r8a7795" can be removed again, too.
> Simon?

I assume you are referring to "[PATCH 1/2] cpufreq: dt-platdev:
Automatically create cpufreq device with OPP v2" (which you kindly
forwarded me). If so, yes, that seems likely. I'll do some testing to
confirm this.

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


#1713678 — Re: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist

FromViresh Kumar <viresh.kumar@linaro.org>
Date2017-08-17 10:50 +0200
SubjectRe: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist
Message-ID<ufoF3-2lr-13@gated-at.bofh.it>
In reply to#1713631
On 17-08-17, 09:53, Simon Horman wrote:
> On Wed, Aug 16, 2017 at 08:51:04AM +0200, Geert Uytterhoeven wrote:
> > Hi Viresh,
> > 
> > On Wed, Aug 16, 2017 at 7:37 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > > Drop few ARM (32 and 64 bit) platforms from the whitelist which always
> > > use "operating-points-v2" property from their DT. They should continue
> > > to work after this patch.
> > >
> > > Tested on Hikey platform (only the "hisilicon,hi6220" entry).
> > >
> > > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > > ---
> > >  drivers/cpufreq/cpufreq-dt-platdev.c | 11 -----------
> > >  1 file changed, 11 deletions(-)
> > >
> > > diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
> > > index 061b468512a2..45f2ec3b7f7a 100644
> > > --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> > > +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> > > @@ -27,7 +27,6 @@ static const struct of_device_id whitelist[] __initconst = {
> > >         { .compatible = "allwinner,sun6i-a31s", },
> > >         { .compatible = "allwinner,sun7i-a20", },
> > >         { .compatible = "allwinner,sun8i-a23", },
> > > -       { .compatible = "allwinner,sun8i-a33", },
> > >         { .compatible = "allwinner,sun8i-a83t", },
> > >         { .compatible = "allwinner,sun8i-h3", },
> > 
> > I think "renesas,r8a7795" can be removed again, too.
> > Simon?
> 
> I assume you are referring to "[PATCH 1/2] cpufreq: dt-platdev:
> Automatically create cpufreq device with OPP v2" (which you kindly
> forwarded me). If so, yes, that seems likely. I'll do some testing to
> confirm this.

Yeah, and he probably meant that renesas bits can be removed and
included in this patch 2/2 only.

-- 
viresh

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


#1716445 — Re: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist

FromSimon Horman <horms@verge.net.au>
Date2017-08-21 15:30 +0200
SubjectRe: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist
Message-ID<ugUWe-4Ub-19@gated-at.bofh.it>
In reply to#1713631
On Thu, Aug 17, 2017 at 09:53:01AM +0200, Simon Horman wrote:
> On Wed, Aug 16, 2017 at 08:51:04AM +0200, Geert Uytterhoeven wrote:
> > Hi Viresh,
> > 
> > On Wed, Aug 16, 2017 at 7:37 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > > Drop few ARM (32 and 64 bit) platforms from the whitelist which always
> > > use "operating-points-v2" property from their DT. They should continue
> > > to work after this patch.
> > >
> > > Tested on Hikey platform (only the "hisilicon,hi6220" entry).
> > >
> > > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > > ---
> > >  drivers/cpufreq/cpufreq-dt-platdev.c | 11 -----------
> > >  1 file changed, 11 deletions(-)
> > >
> > > diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
> > > index 061b468512a2..45f2ec3b7f7a 100644
> > > --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> > > +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> > > @@ -27,7 +27,6 @@ static const struct of_device_id whitelist[] __initconst = {
> > >         { .compatible = "allwinner,sun6i-a31s", },
> > >         { .compatible = "allwinner,sun7i-a20", },
> > >         { .compatible = "allwinner,sun8i-a23", },
> > > -       { .compatible = "allwinner,sun8i-a33", },
> > >         { .compatible = "allwinner,sun8i-a83t", },
> > >         { .compatible = "allwinner,sun8i-h3", },
> > 
> > I think "renesas,r8a7795" can be removed again, too.
> > Simon?
> 
> I assume you are referring to "[PATCH 1/2] cpufreq: dt-platdev:
> Automatically create cpufreq device with OPP v2" (which you kindly
> forwarded me). If so, yes, that seems likely. I'll do some testing to
> confirm this.

I have now done some testing. With "[PATCH 1/2]" applied the following can
be removed:

	"renesas,r8a7795"
	"renesas,r8a7796"

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


#1712777 — Re: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist

FromChen-Yu Tsai <wens@csie.org>
Date2017-08-16 11:00 +0200
SubjectRe: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist
Message-ID<uf2lb-4Su-5@gated-at.bofh.it>
In reply to#1712695
On Wed, Aug 16, 2017 at 1:37 PM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> Drop few ARM (32 and 64 bit) platforms from the whitelist which always
> use "operating-points-v2" property from their DT. They should continue
> to work after this patch.
>
> Tested on Hikey platform (only the "hisilicon,hi6220" entry).
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  drivers/cpufreq/cpufreq-dt-platdev.c | 11 -----------
>  1 file changed, 11 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
> index 061b468512a2..45f2ec3b7f7a 100644
> --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> @@ -27,7 +27,6 @@ static const struct of_device_id whitelist[] __initconst = {
>         { .compatible = "allwinner,sun6i-a31s", },
>         { .compatible = "allwinner,sun7i-a20", },
>         { .compatible = "allwinner,sun8i-a23", },
> -       { .compatible = "allwinner,sun8i-a33", },
>         { .compatible = "allwinner,sun8i-a83t", },
>         { .compatible = "allwinner,sun8i-h3", },
>

Acked-by: Chen-Yu Tsai <wens@csie.org>

In fact, we can drop all the sun8i entries. Of them, only sun8i-a33 has
cpufreq implemented. All the other ones are missing thermal sensor support,
and no OPP tables have been added yet.

ChenYu

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


#1712847 — Re: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist

FromViresh Kumar <viresh.kumar@linaro.org>
Date2017-08-16 13:30 +0200
SubjectRe: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist
Message-ID<uf4Gl-6q1-7@gated-at.bofh.it>
In reply to#1712777
On 16-08-17, 16:53, Chen-Yu Tsai wrote:
> On Wed, Aug 16, 2017 at 1:37 PM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > Drop few ARM (32 and 64 bit) platforms from the whitelist which always
> > use "operating-points-v2" property from their DT. They should continue
> > to work after this patch.
> >
> > Tested on Hikey platform (only the "hisilicon,hi6220" entry).
> >
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > ---
> >  drivers/cpufreq/cpufreq-dt-platdev.c | 11 -----------
> >  1 file changed, 11 deletions(-)
> >
> > diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
> > index 061b468512a2..45f2ec3b7f7a 100644
> > --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> > +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> > @@ -27,7 +27,6 @@ static const struct of_device_id whitelist[] __initconst = {
> >         { .compatible = "allwinner,sun6i-a31s", },
> >         { .compatible = "allwinner,sun7i-a20", },
> >         { .compatible = "allwinner,sun8i-a23", },
> > -       { .compatible = "allwinner,sun8i-a33", },
> >         { .compatible = "allwinner,sun8i-a83t", },
> >         { .compatible = "allwinner,sun8i-h3", },
> >
> 
> Acked-by: Chen-Yu Tsai <wens@csie.org>
> 
> In fact, we can drop all the sun8i entries. Of them, only sun8i-a33 has
> cpufreq implemented. All the other ones are missing thermal sensor support,
> and no OPP tables have been added yet.

Then, why did you guys add all those SoCs there ? :)

-- 
viresh

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


#1714215 — Re: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist

FromChen-Yu Tsai <wens@csie.org>
Date2017-08-17 19:10 +0200
SubjectRe: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist
Message-ID<ufwsX-7Rh-31@gated-at.bofh.it>
In reply to#1712847
On Wed, Aug 16, 2017 at 7:24 PM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> On 16-08-17, 16:53, Chen-Yu Tsai wrote:
>> On Wed, Aug 16, 2017 at 1:37 PM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
>> > Drop few ARM (32 and 64 bit) platforms from the whitelist which always
>> > use "operating-points-v2" property from their DT. They should continue
>> > to work after this patch.
>> >
>> > Tested on Hikey platform (only the "hisilicon,hi6220" entry).
>> >
>> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
>> > ---
>> >  drivers/cpufreq/cpufreq-dt-platdev.c | 11 -----------
>> >  1 file changed, 11 deletions(-)
>> >
>> > diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
>> > index 061b468512a2..45f2ec3b7f7a 100644
>> > --- a/drivers/cpufreq/cpufreq-dt-platdev.c
>> > +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
>> > @@ -27,7 +27,6 @@ static const struct of_device_id whitelist[] __initconst = {
>> >         { .compatible = "allwinner,sun6i-a31s", },
>> >         { .compatible = "allwinner,sun7i-a20", },
>> >         { .compatible = "allwinner,sun8i-a23", },
>> > -       { .compatible = "allwinner,sun8i-a33", },
>> >         { .compatible = "allwinner,sun8i-a83t", },
>> >         { .compatible = "allwinner,sun8i-h3", },
>> >
>>
>> Acked-by: Chen-Yu Tsai <wens@csie.org>
>>
>> In fact, we can drop all the sun8i entries. Of them, only sun8i-a33 has
>> cpufreq implemented. All the other ones are missing thermal sensor support,
>> and no OPP tables have been added yet.
>
> Then, why did you guys add all those SoCs there ? :)

The idea was to add all the SoCs to the cpufreq driver first, and sort out
the thermal sensor and device tree parts later. Obviously this progressed
very slowly.

ChenYu

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


#1718009 — Re: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist

FromMasahiro Yamada <yamada.masahiro@socionext.com>
Date2017-08-23 05:40 +0200
SubjectRe: [PATCH 2/2] cpufreq: dt-platdev: Drop few entries from whitelist
Message-ID<uhuGm-3HL-7@gated-at.bofh.it>
In reply to#1712695
Hi Viresh,


2017-08-16 14:37 GMT+09:00 Viresh Kumar <viresh.kumar@linaro.org>:
> Drop few ARM (32 and 64 bit) platforms from the whitelist which always
> use "operating-points-v2" property from their DT. They should continue
> to work after this patch.
>
> Tested on Hikey platform (only the "hisilicon,hi6220" entry).
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  drivers/cpufreq/cpufreq-dt-platdev.c | 11 -----------
>  1 file changed, 11 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
> index 061b468512a2..45f2ec3b7f7a 100644
> --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> @@ -27,7 +27,6 @@ static const struct of_device_id whitelist[] __initconst = {
>         { .compatible = "allwinner,sun6i-a31s", },
>         { .compatible = "allwinner,sun7i-a20", },
>         { .compatible = "allwinner,sun8i-a23", },
> -       { .compatible = "allwinner,sun8i-a33", },
>         { .compatible = "allwinner,sun8i-a83t", },
>         { .compatible = "allwinner,sun8i-h3", },
>
> @@ -37,7 +36,6 @@ static const struct of_device_id whitelist[] __initconst = {
>         { .compatible = "arm,integrator-cp", },
>
>         { .compatible = "hisilicon,hi3660", },
> -       { .compatible = "hisilicon,hi6220", },
>
>         { .compatible = "fsl,imx27", },
>         { .compatible = "fsl,imx51", },
> @@ -51,11 +49,8 @@ static const struct of_device_id whitelist[] __initconst = {
>         { .compatible = "samsung,exynos3250", },
>         { .compatible = "samsung,exynos4210", },
>         { .compatible = "samsung,exynos4212", },
> -       { .compatible = "samsung,exynos4412", },
>         { .compatible = "samsung,exynos5250", },
>  #ifndef CONFIG_BL_SWITCHER
> -       { .compatible = "samsung,exynos5420", },
> -       { .compatible = "samsung,exynos5433", },
>         { .compatible = "samsung,exynos5800", },
>  #endif
>
> @@ -87,11 +82,7 @@ static const struct of_device_id whitelist[] __initconst = {
>         { .compatible = "rockchip,rk3368", },
>         { .compatible = "rockchip,rk3399", },
>
> -       { .compatible = "socionext,uniphier-pro5", },
> -       { .compatible = "socionext,uniphier-pxs2", },
>         { .compatible = "socionext,uniphier-ld6b", },
> -       { .compatible = "socionext,uniphier-ld11", },
> -       { .compatible = "socionext,uniphier-ld20", },


Please remove "socionext,uniphier-ld6b" as well.

It includes the same silicon die
of "socionext,uniphier-pxs2".



-- 
Best Regards
Masahiro Yamada

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


#1712773 — Re: [PATCH 1/2] cpufreq: dt-platdev: Automatically create cpufreq device with OPP v2

FromChen-Yu Tsai <wens@csie.org>
Date2017-08-16 10:50 +0200
SubjectRe: [PATCH 1/2] cpufreq: dt-platdev: Automatically create cpufreq device with OPP v2
Message-ID<uf2bw-4Pi-13@gated-at.bofh.it>
In reply to#1712692
On Wed, Aug 16, 2017 at 1:37 PM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> The initial idea of creating the cpufreq-dt-platdev.c file was to keep a
> list of platforms that use the "operating-points" (V1) bindings and
> create cpufreq device for them only, as we weren't sure which platforms
> would want the device to get created automatically as some had their own
> cpufreq drivers as well, or wanted to initialize cpufreq after doing
> some stuff from platform code.
>
> But that wasn't the case with platforms using "operating-points-v2"
> property. We wanted the device to get created automatically without the
> need of adding them to the whitelist. Though, we will still have some
> exceptions where we don't want to create the device automatically.
>
> Rename the earlier platform list as *whitelist* and create a new
> *blacklist* as well.
>
> The cpufreq-dt device will get created if:
> - The platform is there in the whitelist OR
> - The platform has "operating-points-v2" property in CPU0's DT node and
>   isn't part of the blacklist .
>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Does this mean "cpufreq: dt: Add support for some new Allwinner SoCs",
or any other patch adding new SoCs to the list, isn't needed anymore?

ChenYu

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


#1712848 — Re: [PATCH 1/2] cpufreq: dt-platdev: Automatically create cpufreq device with OPP v2

FromViresh Kumar <viresh.kumar@linaro.org>
Date2017-08-16 13:30 +0200
SubjectRe: [PATCH 1/2] cpufreq: dt-platdev: Automatically create cpufreq device with OPP v2
Message-ID<uf4Gl-6q1-9@gated-at.bofh.it>
In reply to#1712773
On 16-08-17, 16:49, Chen-Yu Tsai wrote:
> On Wed, Aug 16, 2017 at 1:37 PM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > The initial idea of creating the cpufreq-dt-platdev.c file was to keep a
> > list of platforms that use the "operating-points" (V1) bindings and
> > create cpufreq device for them only, as we weren't sure which platforms
> > would want the device to get created automatically as some had their own
> > cpufreq drivers as well, or wanted to initialize cpufreq after doing
> > some stuff from platform code.
> >
> > But that wasn't the case with platforms using "operating-points-v2"
> > property. We wanted the device to get created automatically without the
> > need of adding them to the whitelist. Though, we will still have some
> > exceptions where we don't want to create the device automatically.
> >
> > Rename the earlier platform list as *whitelist* and create a new
> > *blacklist* as well.
> >
> > The cpufreq-dt device will get created if:
> > - The platform is there in the whitelist OR
> > - The platform has "operating-points-v2" property in CPU0's DT node and
> >   isn't part of the blacklist .
> >
> > Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> 
> Does this mean "cpufreq: dt: Add support for some new Allwinner SoCs",
> or any other patch adding new SoCs to the list, isn't needed anymore?

For SoCs using OPP-v2, yeah, we don't need any more patches in future.

-- 
viresh

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


#1716435 — Re: [1/2] cpufreq: dt-platdev: Automatically create cpufreq device with OPP v2

FromSimon Horman <horms@verge.net.au>
Date2017-08-21 15:20 +0200
SubjectRe: [1/2] cpufreq: dt-platdev: Automatically create cpufreq device with OPP v2
Message-ID<ugUMx-4R2-7@gated-at.bofh.it>
In reply to#1712692
On Wed, Aug 16, 2017 at 11:07:27AM +0530, Viresh Kumar wrote:
> The initial idea of creating the cpufreq-dt-platdev.c file was to keep a
> list of platforms that use the "operating-points" (V1) bindings and
> create cpufreq device for them only, as we weren't sure which platforms
> would want the device to get created automatically as some had their own
> cpufreq drivers as well, or wanted to initialize cpufreq after doing
> some stuff from platform code.
> 
> But that wasn't the case with platforms using "operating-points-v2"
> property. We wanted the device to get created automatically without the
> need of adding them to the whitelist. Though, we will still have some
> exceptions where we don't want to create the device automatically.
> 
> Rename the earlier platform list as *whitelist* and create a new
> *blacklist* as well.
> 
> The cpufreq-dt device will get created if:
> - The platform is there in the whitelist OR
> - The platform has "operating-points-v2" property in CPU0's DT node and
>   isn't part of the blacklist .
> 
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

I have exercised this on the r8a7795 and r8a7795 with the following
reverted:

* 034def597bb7 ("cpufreq: rcar: Add support for R8A7795 SoC")
* bea2ebca6b91 ("cpufreq: dt: Add r8a7796 support to to use generic
cpufreq driver")

Tested-by: Simon Horman <horms+renesas@verge.net.au>

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


#1718012 — Re: [1/2] cpufreq: dt-platdev: Automatically create cpufreq device with OPP v2

FromMasahiro Yamada <yamada.masahiro@socionext.com>
Date2017-08-23 05:50 +0200
SubjectRe: [1/2] cpufreq: dt-platdev: Automatically create cpufreq device with OPP v2
Message-ID<uhuQ1-3KW-1@gated-at.bofh.it>
In reply to#1716435
2017-08-21 22:17 GMT+09:00 Simon Horman <horms@verge.net.au>:
> On Wed, Aug 16, 2017 at 11:07:27AM +0530, Viresh Kumar wrote:
>> The initial idea of creating the cpufreq-dt-platdev.c file was to keep a
>> list of platforms that use the "operating-points" (V1) bindings and
>> create cpufreq device for them only, as we weren't sure which platforms
>> would want the device to get created automatically as some had their own
>> cpufreq drivers as well, or wanted to initialize cpufreq after doing
>> some stuff from platform code.
>>
>> But that wasn't the case with platforms using "operating-points-v2"
>> property. We wanted the device to get created automatically without the
>> need of adding them to the whitelist. Though, we will still have some
>> exceptions where we don't want to create the device automatically.
>>
>> Rename the earlier platform list as *whitelist* and create a new
>> *blacklist* as well.
>>
>> The cpufreq-dt device will get created if:
>> - The platform is there in the whitelist OR
>> - The platform has "operating-points-v2" property in CPU0's DT node and
>>   isn't part of the blacklist .
>>
>> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
>> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
>
> I have exercised this on the r8a7795 and r8a7795 with the following
> reverted:
>
> * 034def597bb7 ("cpufreq: rcar: Add support for R8A7795 SoC")
> * bea2ebca6b91 ("cpufreq: dt: Add r8a7796 support to to use generic
> cpufreq driver")
>
> Tested-by: Simon Horman <horms+renesas@verge.net.au>



Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>




-- 
Best Regards
Masahiro Yamada

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web