Re: [PATCH v2] cpufreq: st: enable selective initialization based on the platform

2016-05-04 Thread Rafael J. Wysocki
On Wednesday, April 27, 2016 05:18:59 PM Sudeep Holla wrote:
> The sti-cpufreq does unconditional registration of the cpufreq-dt driver
> which causes issue on an multi-platform build. For example, on Vexpress
> TC2 platform, we get the following error on boot:
> 
> cpu cpu0: OPP-v2 not supported
> cpu cpu0: Not doing voltage scaling
> cpu: dev_pm_opp_of_cpumask_add_table: couldn't find opp table
>   for cpu:0, -19
> cpu cpu0: dev_pm_opp_get_max_volt_latency: Invalid regulator (-6)
> ...
> arm_big_little: bL_cpufreq_register: Failed registering platform driver:
>   vexpress-spc, err: -17
> 
> The actual driver fails to initialise as cpufreq-dt is probed
> successfully, which is incorrect. This issue can happen to any platform
> not using cpufreq-dt in a multi-platform build.
> 
> This patch adds a check to do selective initialization of the driver.
> 
> Cc: Lee Jones 
> Cc: "Rafael J. Wysocki" 
> Cc: Viresh Kumar 
> Cc: linux...@vger.kernel.org
> Fixes: ab0ea257fc58 ("cpufreq: st: Provide runtime initialised driver for 
> ST's platforms")
> Signed-off-by: Sudeep Holla 
> ---
>  drivers/cpufreq/sti-cpufreq.c | 4 
>  1 file changed, 4 insertions(+)
> 
> v1->v2:
>   - Updated compatible strings as per Lee's confirmation
> 
> diff --git a/drivers/cpufreq/sti-cpufreq.c b/drivers/cpufreq/sti-cpufreq.c
> index a9c659f58974..04042038ec4b 100644
> --- a/drivers/cpufreq/sti-cpufreq.c
> +++ b/drivers/cpufreq/sti-cpufreq.c
> @@ -259,6 +259,10 @@ static int sti_cpufreq_init(void)
>  {
>   int ret;
> 
> + if ((!of_machine_is_compatible("st,stih407")) &&
> + (!of_machine_is_compatible("st,stih410")))
> + return -ENODEV;
> +
>   ddata.cpu = get_cpu_device(0);
>   if (!ddata.cpu) {
>   dev_err(ddata.cpu, "Failed to get device for CPU0\n");

Applied with the ACKs, thanks!



Re: [PATCH v2] cpufreq: st: enable selective initialization based on the platform

2016-05-04 Thread Rafael J. Wysocki
On Wednesday, April 27, 2016 05:18:59 PM Sudeep Holla wrote:
> The sti-cpufreq does unconditional registration of the cpufreq-dt driver
> which causes issue on an multi-platform build. For example, on Vexpress
> TC2 platform, we get the following error on boot:
> 
> cpu cpu0: OPP-v2 not supported
> cpu cpu0: Not doing voltage scaling
> cpu: dev_pm_opp_of_cpumask_add_table: couldn't find opp table
>   for cpu:0, -19
> cpu cpu0: dev_pm_opp_get_max_volt_latency: Invalid regulator (-6)
> ...
> arm_big_little: bL_cpufreq_register: Failed registering platform driver:
>   vexpress-spc, err: -17
> 
> The actual driver fails to initialise as cpufreq-dt is probed
> successfully, which is incorrect. This issue can happen to any platform
> not using cpufreq-dt in a multi-platform build.
> 
> This patch adds a check to do selective initialization of the driver.
> 
> Cc: Lee Jones 
> Cc: "Rafael J. Wysocki" 
> Cc: Viresh Kumar 
> Cc: linux...@vger.kernel.org
> Fixes: ab0ea257fc58 ("cpufreq: st: Provide runtime initialised driver for 
> ST's platforms")
> Signed-off-by: Sudeep Holla 
> ---
>  drivers/cpufreq/sti-cpufreq.c | 4 
>  1 file changed, 4 insertions(+)
> 
> v1->v2:
>   - Updated compatible strings as per Lee's confirmation
> 
> diff --git a/drivers/cpufreq/sti-cpufreq.c b/drivers/cpufreq/sti-cpufreq.c
> index a9c659f58974..04042038ec4b 100644
> --- a/drivers/cpufreq/sti-cpufreq.c
> +++ b/drivers/cpufreq/sti-cpufreq.c
> @@ -259,6 +259,10 @@ static int sti_cpufreq_init(void)
>  {
>   int ret;
> 
> + if ((!of_machine_is_compatible("st,stih407")) &&
> + (!of_machine_is_compatible("st,stih410")))
> + return -ENODEV;
> +
>   ddata.cpu = get_cpu_device(0);
>   if (!ddata.cpu) {
>   dev_err(ddata.cpu, "Failed to get device for CPU0\n");

Applied with the ACKs, thanks!



Re: [PATCH v2] cpufreq: st: enable selective initialization based on the platform

2016-04-28 Thread Lee Jones
On Wed, 27 Apr 2016, Sudeep Holla wrote:

> The sti-cpufreq does unconditional registration of the cpufreq-dt driver
> which causes issue on an multi-platform build. For example, on Vexpress
> TC2 platform, we get the following error on boot:
> 
> cpu cpu0: OPP-v2 not supported
> cpu cpu0: Not doing voltage scaling
> cpu: dev_pm_opp_of_cpumask_add_table: couldn't find opp table
>   for cpu:0, -19
> cpu cpu0: dev_pm_opp_get_max_volt_latency: Invalid regulator (-6)
> ...
> arm_big_little: bL_cpufreq_register: Failed registering platform driver:
>   vexpress-spc, err: -17
> 
> The actual driver fails to initialise as cpufreq-dt is probed
> successfully, which is incorrect. This issue can happen to any platform
> not using cpufreq-dt in a multi-platform build.
> 
> This patch adds a check to do selective initialization of the driver.
> 
> Cc: Lee Jones 
> Cc: "Rafael J. Wysocki" 
> Cc: Viresh Kumar 
> Cc: linux...@vger.kernel.org
> Fixes: ab0ea257fc58 ("cpufreq: st: Provide runtime initialised driver for 
> ST's platforms")
> Signed-off-by: Sudeep Holla 
> ---
>  drivers/cpufreq/sti-cpufreq.c | 4 
>  1 file changed, 4 insertions(+)
> 
> v1->v2:
>   - Updated compatible strings as per Lee's confirmation

Acked-by: Lee Jones 

> diff --git a/drivers/cpufreq/sti-cpufreq.c b/drivers/cpufreq/sti-cpufreq.c
> index a9c659f58974..04042038ec4b 100644
> --- a/drivers/cpufreq/sti-cpufreq.c
> +++ b/drivers/cpufreq/sti-cpufreq.c
> @@ -259,6 +259,10 @@ static int sti_cpufreq_init(void)
>  {
>   int ret;
> 
> + if ((!of_machine_is_compatible("st,stih407")) &&
> + (!of_machine_is_compatible("st,stih410")))
> + return -ENODEV;
> +
>   ddata.cpu = get_cpu_device(0);
>   if (!ddata.cpu) {
>   dev_err(ddata.cpu, "Failed to get device for CPU0\n");

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH v2] cpufreq: st: enable selective initialization based on the platform

2016-04-28 Thread Lee Jones
On Wed, 27 Apr 2016, Sudeep Holla wrote:

> The sti-cpufreq does unconditional registration of the cpufreq-dt driver
> which causes issue on an multi-platform build. For example, on Vexpress
> TC2 platform, we get the following error on boot:
> 
> cpu cpu0: OPP-v2 not supported
> cpu cpu0: Not doing voltage scaling
> cpu: dev_pm_opp_of_cpumask_add_table: couldn't find opp table
>   for cpu:0, -19
> cpu cpu0: dev_pm_opp_get_max_volt_latency: Invalid regulator (-6)
> ...
> arm_big_little: bL_cpufreq_register: Failed registering platform driver:
>   vexpress-spc, err: -17
> 
> The actual driver fails to initialise as cpufreq-dt is probed
> successfully, which is incorrect. This issue can happen to any platform
> not using cpufreq-dt in a multi-platform build.
> 
> This patch adds a check to do selective initialization of the driver.
> 
> Cc: Lee Jones 
> Cc: "Rafael J. Wysocki" 
> Cc: Viresh Kumar 
> Cc: linux...@vger.kernel.org
> Fixes: ab0ea257fc58 ("cpufreq: st: Provide runtime initialised driver for 
> ST's platforms")
> Signed-off-by: Sudeep Holla 
> ---
>  drivers/cpufreq/sti-cpufreq.c | 4 
>  1 file changed, 4 insertions(+)
> 
> v1->v2:
>   - Updated compatible strings as per Lee's confirmation

Acked-by: Lee Jones 

> diff --git a/drivers/cpufreq/sti-cpufreq.c b/drivers/cpufreq/sti-cpufreq.c
> index a9c659f58974..04042038ec4b 100644
> --- a/drivers/cpufreq/sti-cpufreq.c
> +++ b/drivers/cpufreq/sti-cpufreq.c
> @@ -259,6 +259,10 @@ static int sti_cpufreq_init(void)
>  {
>   int ret;
> 
> + if ((!of_machine_is_compatible("st,stih407")) &&
> + (!of_machine_is_compatible("st,stih410")))
> + return -ENODEV;
> +
>   ddata.cpu = get_cpu_device(0);
>   if (!ddata.cpu) {
>   dev_err(ddata.cpu, "Failed to get device for CPU0\n");

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH v2] cpufreq: st: enable selective initialization based on the platform

2016-04-27 Thread Viresh Kumar
On 27-04-16, 17:18, Sudeep Holla wrote:
> The sti-cpufreq does unconditional registration of the cpufreq-dt driver
> which causes issue on an multi-platform build. For example, on Vexpress
> TC2 platform, we get the following error on boot:
> 
> cpu cpu0: OPP-v2 not supported
> cpu cpu0: Not doing voltage scaling
> cpu: dev_pm_opp_of_cpumask_add_table: couldn't find opp table
>   for cpu:0, -19
> cpu cpu0: dev_pm_opp_get_max_volt_latency: Invalid regulator (-6)
> ...
> arm_big_little: bL_cpufreq_register: Failed registering platform driver:
>   vexpress-spc, err: -17
> 
> The actual driver fails to initialise as cpufreq-dt is probed
> successfully, which is incorrect. This issue can happen to any platform
> not using cpufreq-dt in a multi-platform build.
> 
> This patch adds a check to do selective initialization of the driver.
> 
> Cc: Lee Jones 
> Cc: "Rafael J. Wysocki" 
> Cc: Viresh Kumar 
> Cc: linux...@vger.kernel.org
> Fixes: ab0ea257fc58 ("cpufreq: st: Provide runtime initialised driver for 
> ST's platforms")
> Signed-off-by: Sudeep Holla 
> ---
>  drivers/cpufreq/sti-cpufreq.c | 4 
>  1 file changed, 4 insertions(+)
> 
> v1->v2:
>   - Updated compatible strings as per Lee's confirmation
> 
> diff --git a/drivers/cpufreq/sti-cpufreq.c b/drivers/cpufreq/sti-cpufreq.c
> index a9c659f58974..04042038ec4b 100644
> --- a/drivers/cpufreq/sti-cpufreq.c
> +++ b/drivers/cpufreq/sti-cpufreq.c
> @@ -259,6 +259,10 @@ static int sti_cpufreq_init(void)
>  {
>   int ret;
> 
> + if ((!of_machine_is_compatible("st,stih407")) &&
> + (!of_machine_is_compatible("st,stih410")))
> + return -ENODEV;
> +
>   ddata.cpu = get_cpu_device(0);
>   if (!ddata.cpu) {
>   dev_err(ddata.cpu, "Failed to get device for CPU0\n");

Acked-by: Viresh Kumar 

-- 
viresh


Re: [PATCH v2] cpufreq: st: enable selective initialization based on the platform

2016-04-27 Thread Viresh Kumar
On 27-04-16, 17:18, Sudeep Holla wrote:
> The sti-cpufreq does unconditional registration of the cpufreq-dt driver
> which causes issue on an multi-platform build. For example, on Vexpress
> TC2 platform, we get the following error on boot:
> 
> cpu cpu0: OPP-v2 not supported
> cpu cpu0: Not doing voltage scaling
> cpu: dev_pm_opp_of_cpumask_add_table: couldn't find opp table
>   for cpu:0, -19
> cpu cpu0: dev_pm_opp_get_max_volt_latency: Invalid regulator (-6)
> ...
> arm_big_little: bL_cpufreq_register: Failed registering platform driver:
>   vexpress-spc, err: -17
> 
> The actual driver fails to initialise as cpufreq-dt is probed
> successfully, which is incorrect. This issue can happen to any platform
> not using cpufreq-dt in a multi-platform build.
> 
> This patch adds a check to do selective initialization of the driver.
> 
> Cc: Lee Jones 
> Cc: "Rafael J. Wysocki" 
> Cc: Viresh Kumar 
> Cc: linux...@vger.kernel.org
> Fixes: ab0ea257fc58 ("cpufreq: st: Provide runtime initialised driver for 
> ST's platforms")
> Signed-off-by: Sudeep Holla 
> ---
>  drivers/cpufreq/sti-cpufreq.c | 4 
>  1 file changed, 4 insertions(+)
> 
> v1->v2:
>   - Updated compatible strings as per Lee's confirmation
> 
> diff --git a/drivers/cpufreq/sti-cpufreq.c b/drivers/cpufreq/sti-cpufreq.c
> index a9c659f58974..04042038ec4b 100644
> --- a/drivers/cpufreq/sti-cpufreq.c
> +++ b/drivers/cpufreq/sti-cpufreq.c
> @@ -259,6 +259,10 @@ static int sti_cpufreq_init(void)
>  {
>   int ret;
> 
> + if ((!of_machine_is_compatible("st,stih407")) &&
> + (!of_machine_is_compatible("st,stih410")))
> + return -ENODEV;
> +
>   ddata.cpu = get_cpu_device(0);
>   if (!ddata.cpu) {
>   dev_err(ddata.cpu, "Failed to get device for CPU0\n");

Acked-by: Viresh Kumar 

-- 
viresh


[PATCH v2] cpufreq: st: enable selective initialization based on the platform

2016-04-27 Thread Sudeep Holla
The sti-cpufreq does unconditional registration of the cpufreq-dt driver
which causes issue on an multi-platform build. For example, on Vexpress
TC2 platform, we get the following error on boot:

cpu cpu0: OPP-v2 not supported
cpu cpu0: Not doing voltage scaling
cpu: dev_pm_opp_of_cpumask_add_table: couldn't find opp table
for cpu:0, -19
cpu cpu0: dev_pm_opp_get_max_volt_latency: Invalid regulator (-6)
...
arm_big_little: bL_cpufreq_register: Failed registering platform driver:
vexpress-spc, err: -17

The actual driver fails to initialise as cpufreq-dt is probed
successfully, which is incorrect. This issue can happen to any platform
not using cpufreq-dt in a multi-platform build.

This patch adds a check to do selective initialization of the driver.

Cc: Lee Jones 
Cc: "Rafael J. Wysocki" 
Cc: Viresh Kumar 
Cc: linux...@vger.kernel.org
Fixes: ab0ea257fc58 ("cpufreq: st: Provide runtime initialised driver for ST's 
platforms")
Signed-off-by: Sudeep Holla 
---
 drivers/cpufreq/sti-cpufreq.c | 4 
 1 file changed, 4 insertions(+)

v1->v2:
- Updated compatible strings as per Lee's confirmation

diff --git a/drivers/cpufreq/sti-cpufreq.c b/drivers/cpufreq/sti-cpufreq.c
index a9c659f58974..04042038ec4b 100644
--- a/drivers/cpufreq/sti-cpufreq.c
+++ b/drivers/cpufreq/sti-cpufreq.c
@@ -259,6 +259,10 @@ static int sti_cpufreq_init(void)
 {
int ret;

+   if ((!of_machine_is_compatible("st,stih407")) &&
+   (!of_machine_is_compatible("st,stih410")))
+   return -ENODEV;
+
ddata.cpu = get_cpu_device(0);
if (!ddata.cpu) {
dev_err(ddata.cpu, "Failed to get device for CPU0\n");
--
1.9.1



[PATCH v2] cpufreq: st: enable selective initialization based on the platform

2016-04-27 Thread Sudeep Holla
The sti-cpufreq does unconditional registration of the cpufreq-dt driver
which causes issue on an multi-platform build. For example, on Vexpress
TC2 platform, we get the following error on boot:

cpu cpu0: OPP-v2 not supported
cpu cpu0: Not doing voltage scaling
cpu: dev_pm_opp_of_cpumask_add_table: couldn't find opp table
for cpu:0, -19
cpu cpu0: dev_pm_opp_get_max_volt_latency: Invalid regulator (-6)
...
arm_big_little: bL_cpufreq_register: Failed registering platform driver:
vexpress-spc, err: -17

The actual driver fails to initialise as cpufreq-dt is probed
successfully, which is incorrect. This issue can happen to any platform
not using cpufreq-dt in a multi-platform build.

This patch adds a check to do selective initialization of the driver.

Cc: Lee Jones 
Cc: "Rafael J. Wysocki" 
Cc: Viresh Kumar 
Cc: linux...@vger.kernel.org
Fixes: ab0ea257fc58 ("cpufreq: st: Provide runtime initialised driver for ST's 
platforms")
Signed-off-by: Sudeep Holla 
---
 drivers/cpufreq/sti-cpufreq.c | 4 
 1 file changed, 4 insertions(+)

v1->v2:
- Updated compatible strings as per Lee's confirmation

diff --git a/drivers/cpufreq/sti-cpufreq.c b/drivers/cpufreq/sti-cpufreq.c
index a9c659f58974..04042038ec4b 100644
--- a/drivers/cpufreq/sti-cpufreq.c
+++ b/drivers/cpufreq/sti-cpufreq.c
@@ -259,6 +259,10 @@ static int sti_cpufreq_init(void)
 {
int ret;

+   if ((!of_machine_is_compatible("st,stih407")) &&
+   (!of_machine_is_compatible("st,stih410")))
+   return -ENODEV;
+
ddata.cpu = get_cpu_device(0);
if (!ddata.cpu) {
dev_err(ddata.cpu, "Failed to get device for CPU0\n");
--
1.9.1