cpufreq: dt-platdev: allow RK3399 to have separate tunables per cluster
PATCH v2 1/1 cpufreq: dt-platdev: allow RK3399 to have separate tunables per cluster
RK3899 has one cluster with 4 small cores, and another one with 2 big cores, with cores in different clusters having different OPPs and thus needing separate set of tunables. Let's enable this via "have_governor_per_policy" platform data.
---
v2 changes: commit message updated.
Not tested, but we had a patch unconditionally enabling CPUFREQ_HAVE_GOVERNOR_PER_POLICY flag in tree we used to ship devices based on RK3399 platform.
drivers/cpufreq/cpufreq-dt-platdev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/cpufreq/cpufreq-dt-platdev.c +4 -1
@@ -78,7 +78,10 @@ static const struct of_device_id whitelist[] __initconst = { { .compatible = "rockchip,rk3328", }, { .compatible = "rockchip,rk3366", }, { .compatible = "rockchip,rk3368", }, - { .compatible = "rockchip,rk3399", }, + { .compatible = "rockchip,rk3399", + .data = &(struct cpufreq_dt_platform_data) + { .have_governor_per_policy = true, }, + }, { .compatible = "st-ericsson,u8500", }, { .compatible = "st-ericsson,u8540", },
Signature · 5 lines
2.19.0.605.g01d371f741-goog -- Dmitry
Quoted 23 lines · Dmitry Torokhov
RK3899 has one cluster with 4 small cores, and another one with 2 big cores, with cores in different clusters having different OPPs and thus needing separate set of tunables. Let's enable this via "
have_governor_per_policy" platform data.Signed-off-by Dmitry Torokhov <[email protected]>---
v2 changes: commit message updated.
Not tested, but we had a patch unconditionally enabling
CPUFREQ_HAVE_GOVERNOR_PER_POLICYflag in tree we used to ship devices based on RK3399 platform.drivers/cpufreq/cpufreq-dt-platdev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/cpufreq/cpufreq-dt-platdev.c +0
-0@@ -78,7 +78,10 @@ static const struct of_device_id whitelist[] __initconst = { { .compatible = "rockchip,rk3328", },
drivers/cpufreq/cpufreq-dt-platdev.c static const struct of_device_id whitelist[] __initconst = { · line 87
Quoted 10 lines
drivers/cpufreq/cpufreq-dt-platdev.c +4
-1{ .compatible = "rockchip,rk3366", }, { .compatible = "rockchip,rk3368", }, - { .compatible = "rockchip,rk3399", }, + { .compatible = "rockchip,rk3399", + .data = &(struct cpufreq_dt_platform_data) + { .have_governor_per_policy = true, }, + }, { .compatible = "st-ericsson,u8500", }, { .compatible = "st-ericsson,u8540", },
Signature · 1 line
viresh
Quoted 32 lines · CEST Viresh Kumar
Quoted 31 lines · Dmitry Torokhov
RK3899 has one cluster with 4 small cores, and another one with 2 big cores, with cores in different clusters having different OPPs and thus needing separate set of tunables. Let's enable this via "
have_governor_per_policy" platform data.Signed-off-by Dmitry Torokhov <[email protected]>---
v2 changes: commit message updated.
Not tested, but we had a patch unconditionally enabling
CPUFREQ_HAVE_GOVERNOR_PER_POLICYflag in tree we used to ship devices based on RK3399 platform.drivers/cpufreq/cpufreq-dt-platdev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/cpufreq/cpufreq-dt-platdev.c +4
-1@@ -78,7 +78,10 @@ static const struct of_device_id whitelist[] __initconst = { { .compatible = "rockchip,rk3328", }, { .compatible = "rockchip,rk3366", }, { .compatible = "rockchip,rk3368", }, - { .compatible = "rockchip,rk3399", }, + { .compatible = "rockchip,rk3399", + .data = &(struct cpufreq_dt_platform_data) + { .have_governor_per_policy = true, }, + },
Quoted 4 lines
drivers/cpufreq/cpufreq-dt-platdev.c static const struct of_device_id whitelist[] __initconst = { · line 87
Quoted 2 lines
drivers/cpufreq/cpufreq-dt-platdev.c +0
-0{ .compatible = "st-ericsson,u8500", }, { .compatible = "st-ericsson,u8540", },Acked-by Viresh Kumar <[email protected]>
Patch applied, thanks!