Re: [next] Odroid XU3 boot fail after cpufreq: dt: Use dev_pm_opp_set_rate() to switch frequency

2016-02-13 Thread Krzysztof Kozlowski
W dniu 14.02.2016 o 14:22, Viresh Kumar pisze:
> On 14-02-16, 13:56, Krzysztof Kozlowski wrote:
>> Hi all,
>>
>> Recently Odroid XU3 failed to boot on linux-next
>> on multi_v7 defconfig. exynos defconfig boots fine.
>>
>> Probably the "cpufreq: dt: Use dev_pm_opp_set_rate() to
>> switch frequency" is important here:
>> commit 78c3ba5df96c875b1668e1cd3ee0a69e62454f32
>> Author: Viresh Kumar 
>> Date:   Tue Feb 9 10:30:46 2016 +0530
>>
>> cpufreq: dt: Use dev_pm_opp_set_rate() to switch frequency
>> 
>> OPP core supports frequency/voltage changes based on the target
>> frequency now, use that instead of open coding the same in cpufreq-dt
>> driver.
>> 
>> Signed-off-by: Viresh Kumar 
>> Reviewed-by: Stephen Boyd 
>> Signed-off-by: Rafael J. Wysocki 
> 
> Can you please try the below untested patch please ?

Thanks for quick reply. The patch fixed the problem.

Tested-by: Krzysztof Kozlowski 

Best regards,
Krzysztof

> diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
> index d7cd4e265766..a97b333036c9 100644
> --- a/drivers/base/power/opp/core.c
> +++ b/drivers/base/power/opp/core.c
> @@ -1156,9 +1156,15 @@ static int opp_parse_supplies(struct dev_pm_opp *opp, 
> struct device *dev,
>   return -EINVAL;
>   }
>  
> - opp->u_volt = microvolt[0];
> - opp->u_volt_min = microvolt[1];
> - opp->u_volt_max = microvolt[2];
> + if (count == 1) {
> + opp->u_volt = microvolt[0];
> + opp->u_volt_min = opp->u_volt;
> + opp->u_volt_max = opp->u_volt;
> + } else {
> + opp->u_volt = microvolt[0];
> + opp->u_volt_min = microvolt[1];
> + opp->u_volt_max = microvolt[2];
> + }
>  
>   /* Search for "opp-microamp-" */
>   prop = NULL;
> 



Re: [next] Odroid XU3 boot fail after cpufreq: dt: Use dev_pm_opp_set_rate() to switch frequency

2016-02-13 Thread Viresh Kumar
On 14-02-16, 13:56, Krzysztof Kozlowski wrote:
> Hi all,
> 
> Recently Odroid XU3 failed to boot on linux-next
> on multi_v7 defconfig. exynos defconfig boots fine.
> 
> Probably the "cpufreq: dt: Use dev_pm_opp_set_rate() to
> switch frequency" is important here:
> commit 78c3ba5df96c875b1668e1cd3ee0a69e62454f32
> Author: Viresh Kumar 
> Date:   Tue Feb 9 10:30:46 2016 +0530
> 
> cpufreq: dt: Use dev_pm_opp_set_rate() to switch frequency
> 
> OPP core supports frequency/voltage changes based on the target
> frequency now, use that instead of open coding the same in cpufreq-dt
> driver.
> 
> Signed-off-by: Viresh Kumar 
> Reviewed-by: Stephen Boyd 
> Signed-off-by: Rafael J. Wysocki 

Can you please try the below untested patch please ?

diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
index d7cd4e265766..a97b333036c9 100644
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -1156,9 +1156,15 @@ static int opp_parse_supplies(struct dev_pm_opp *opp, 
struct device *dev,
return -EINVAL;
}
 
-   opp->u_volt = microvolt[0];
-   opp->u_volt_min = microvolt[1];
-   opp->u_volt_max = microvolt[2];
+   if (count == 1) {
+   opp->u_volt = microvolt[0];
+   opp->u_volt_min = opp->u_volt;
+   opp->u_volt_max = opp->u_volt;
+   } else {
+   opp->u_volt = microvolt[0];
+   opp->u_volt_min = microvolt[1];
+   opp->u_volt_max = microvolt[2];
+   }
 
/* Search for "opp-microamp-" */
prop = NULL;

-- 
viresh


[next] Odroid XU3 boot fail after cpufreq: dt: Use dev_pm_opp_set_rate() to switch frequency

2016-02-13 Thread Krzysztof Kozlowski
Hi all,

Recently Odroid XU3 failed to boot on linux-next
on multi_v7 defconfig. exynos defconfig boots fine.

Probably the "cpufreq: dt: Use dev_pm_opp_set_rate() to
switch frequency" is important here:
commit 78c3ba5df96c875b1668e1cd3ee0a69e62454f32
Author: Viresh Kumar 
Date:   Tue Feb 9 10:30:46 2016 +0530

cpufreq: dt: Use dev_pm_opp_set_rate() to switch frequency

OPP core supports frequency/voltage changes based on the target
frequency now, use that instead of open coding the same in cpufreq-dt
driver.

Signed-off-by: Viresh Kumar 
Reviewed-by: Stephen Boyd 
Signed-off-by: Rafael J. Wysocki 


Full log:
http://www.krzk.eu/builders/boot-odroid-xu3-multi_v7/builds/276/steps/Boot%20odroid/logs/serial

dmesg:
Feb 14 10:29:58 [1.620308] vdd_ldo9: ramp_delay not set
Feb 14 10:29:58 [1.631144] vdd_ldo13: ramp_delay not set
Feb 14 10:29:58 [1.638523] vdd_ldo15: ramp_delay not set
Feb 14 10:29:58 [1.649500] vdd_sd: ramp_delay not set
Feb 14 10:29:58 [1.712318] [ cut here ]
Feb 14 10:29:58 [1.715490] kernel BUG at ../drivers/regulator/core.c:216!
...
Feb 14 10:29:58 [2.109871] [] (regulator_check_voltage) from 
[] (regulator_set_voltage_unlocked+0x58/0x230)
Feb 14 10:29:58 [2.12] [] (regulator_set_voltage_unlocked) 
from [] (regulator_set_voltage+0x28/0x54)
Feb 14 10:29:58 [2.129880] [] (regulator_set_voltage) from 
[] (_set_opp_voltage+0x30/0x98)
Feb 14 10:29:58 [2.138543] [] (_set_opp_voltage) from 
[] (dev_pm_opp_set_rate+0xf0/0x28c)
Feb 14 10:29:58 [2.147126] [] (dev_pm_opp_set_rate) from 
[] (__cpufreq_driver_target+0x184/0x2b4)
Feb 14 10:29:58 [2.156394] [] (__cpufreq_driver_target) from 
[] (dbs_check_cpu+0x1b0/0x1f4)
Feb 14 10:29:58 [2.165143] [] (dbs_check_cpu) from [] 
(cpufreq_governor_dbs+0x324/0x5c4)
Feb 14 10:29:58 [2.173637] [] (cpufreq_governor_dbs) from 
[] (__cpufreq_governor+0xe4/0x1ec)
Feb 14 10:29:58 [2.182477] [] (__cpufreq_governor) from 
[] (cpufreq_init_policy+0x64/0x8c)
Feb 14 10:29:58 [2.191141] [] (cpufreq_init_policy) from 
[] (cpufreq_online+0x2fc/0x708)
Feb 14 10:29:58 [2.199634] [] (cpufreq_online) from [] 
(subsys_interface_register+0x94/0xd8)
Feb 14 10:29:58 [2.208472] [] (subsys_interface_register) from 
[] (cpufreq_register_driver+0x14c/0x19c)
Feb 14 10:29:58 [2.218263] [] (cpufreq_register_driver) from 
[] (dt_cpufreq_probe+0x70/0xec)
Feb 14 10:29:59 [2.227104] [] (dt_cpufreq_probe) from 
[] (platform_drv_probe+0x4c/0xb0)
Feb 14 10:29:59 [2.235508] [] (platform_drv_probe) from 
[] (driver_probe_device+0x214/0x2c0)
Feb 14 10:29:59 [2.244345] [] (driver_probe_device) from 
[] (__driver_attach+0x8c/0x90)
Feb 14 10:29:59 [2.252750] [] (__driver_attach) from [] 
(bus_for_each_dev+0x68/0x9c)
Feb 14 10:29:59 [2.260895] [] (bus_for_each_dev) from 
[] (bus_add_driver+0x1a0/0x218)
Feb 14 10:29:59 [2.269128] [] (bus_add_driver) from [] 
(driver_register+0x78/0xf8)
Feb 14 10:29:59 [2.277103] [] (driver_register) from [] 
(do_one_initcall+0x90/0x1d8)
Feb 14 10:29:59 [2.285254] [] (do_one_initcall) from [] 
(kernel_init_freeable+0x15c/0x1fc)
Feb 14 10:29:59 [2.293918] [] (kernel_init_freeable) from 
[] (kernel_init+0x8/0xf0)
Feb 14 10:29:59 [2.301975] [] (kernel_init) from [] 
(ret_from_fork+0x14/0x3c)
Feb 14 10:29:59 [2.309508] Code: e1550004 baeb e3a0 e8bd8070 
(e7f001f2) 
Feb 14 10:29:59 [2.315585] ---[ end trace 42d99689dedcb6cb ]---


Device boots fine after reverting last three opp patches:
1. dd02a3d920083b6cb0ee4f0eaf2c599b740bf5fe
2. df2c8ec28e73d47392b8cb24828c15c54819da41
3. 78c3ba5df96c875b1668e1cd3ee0a69e62454f32


More details:
1. multi_v7_defconfig with enabled IPV6,NFS_V4,SENSORS_PWM_FAN,PWM_SAMSUNG
and disabled LEDS_TRIGGER_HEARTBEAT.
2. exynos5422-odroidxu3-lite.dts
3. The OPP used for cpufreq-dt are a combination of:
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/arch/arm/boot/dts/exynos5420.dtsi
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/arch/arm/boot/dts/exynos5422-cpus.dtsi
4. Reproduced recently on next-20160212. First encountered on next-20160211.

Any ideas?

Best regards,
Krzysztof


[next] Odroid XU3 boot fail after cpufreq: dt: Use dev_pm_opp_set_rate() to switch frequency

2016-02-13 Thread Krzysztof Kozlowski
Hi all,

Recently Odroid XU3 failed to boot on linux-next
on multi_v7 defconfig. exynos defconfig boots fine.

Probably the "cpufreq: dt: Use dev_pm_opp_set_rate() to
switch frequency" is important here:
commit 78c3ba5df96c875b1668e1cd3ee0a69e62454f32
Author: Viresh Kumar 
Date:   Tue Feb 9 10:30:46 2016 +0530

cpufreq: dt: Use dev_pm_opp_set_rate() to switch frequency

OPP core supports frequency/voltage changes based on the target
frequency now, use that instead of open coding the same in cpufreq-dt
driver.

Signed-off-by: Viresh Kumar 
Reviewed-by: Stephen Boyd 
Signed-off-by: Rafael J. Wysocki 


Full log:
http://www.krzk.eu/builders/boot-odroid-xu3-multi_v7/builds/276/steps/Boot%20odroid/logs/serial

dmesg:
Feb 14 10:29:58 [1.620308] vdd_ldo9: ramp_delay not set
Feb 14 10:29:58 [1.631144] vdd_ldo13: ramp_delay not set
Feb 14 10:29:58 [1.638523] vdd_ldo15: ramp_delay not set
Feb 14 10:29:58 [1.649500] vdd_sd: ramp_delay not set
Feb 14 10:29:58 [1.712318] [ cut here ]
Feb 14 10:29:58 [1.715490] kernel BUG at ../drivers/regulator/core.c:216!
...
Feb 14 10:29:58 [2.109871] [] (regulator_check_voltage) from 
[] (regulator_set_voltage_unlocked+0x58/0x230)
Feb 14 10:29:58 [2.12] [] (regulator_set_voltage_unlocked) 
from [] (regulator_set_voltage+0x28/0x54)
Feb 14 10:29:58 [2.129880] [] (regulator_set_voltage) from 
[] (_set_opp_voltage+0x30/0x98)
Feb 14 10:29:58 [2.138543] [] (_set_opp_voltage) from 
[] (dev_pm_opp_set_rate+0xf0/0x28c)
Feb 14 10:29:58 [2.147126] [] (dev_pm_opp_set_rate) from 
[] (__cpufreq_driver_target+0x184/0x2b4)
Feb 14 10:29:58 [2.156394] [] (__cpufreq_driver_target) from 
[] (dbs_check_cpu+0x1b0/0x1f4)
Feb 14 10:29:58 [2.165143] [] (dbs_check_cpu) from [] 
(cpufreq_governor_dbs+0x324/0x5c4)
Feb 14 10:29:58 [2.173637] [] (cpufreq_governor_dbs) from 
[] (__cpufreq_governor+0xe4/0x1ec)
Feb 14 10:29:58 [2.182477] [] (__cpufreq_governor) from 
[] (cpufreq_init_policy+0x64/0x8c)
Feb 14 10:29:58 [2.191141] [] (cpufreq_init_policy) from 
[] (cpufreq_online+0x2fc/0x708)
Feb 14 10:29:58 [2.199634] [] (cpufreq_online) from [] 
(subsys_interface_register+0x94/0xd8)
Feb 14 10:29:58 [2.208472] [] (subsys_interface_register) from 
[] (cpufreq_register_driver+0x14c/0x19c)
Feb 14 10:29:58 [2.218263] [] (cpufreq_register_driver) from 
[] (dt_cpufreq_probe+0x70/0xec)
Feb 14 10:29:59 [2.227104] [] (dt_cpufreq_probe) from 
[] (platform_drv_probe+0x4c/0xb0)
Feb 14 10:29:59 [2.235508] [] (platform_drv_probe) from 
[] (driver_probe_device+0x214/0x2c0)
Feb 14 10:29:59 [2.244345] [] (driver_probe_device) from 
[] (__driver_attach+0x8c/0x90)
Feb 14 10:29:59 [2.252750] [] (__driver_attach) from [] 
(bus_for_each_dev+0x68/0x9c)
Feb 14 10:29:59 [2.260895] [] (bus_for_each_dev) from 
[] (bus_add_driver+0x1a0/0x218)
Feb 14 10:29:59 [2.269128] [] (bus_add_driver) from [] 
(driver_register+0x78/0xf8)
Feb 14 10:29:59 [2.277103] [] (driver_register) from [] 
(do_one_initcall+0x90/0x1d8)
Feb 14 10:29:59 [2.285254] [] (do_one_initcall) from [] 
(kernel_init_freeable+0x15c/0x1fc)
Feb 14 10:29:59 [2.293918] [] (kernel_init_freeable) from 
[] (kernel_init+0x8/0xf0)
Feb 14 10:29:59 [2.301975] [] (kernel_init) from [] 
(ret_from_fork+0x14/0x3c)
Feb 14 10:29:59 [2.309508] Code: e1550004 baeb e3a0 e8bd8070 
(e7f001f2) 
Feb 14 10:29:59 [2.315585] ---[ end trace 42d99689dedcb6cb ]---


Device boots fine after reverting last three opp patches:
1. dd02a3d920083b6cb0ee4f0eaf2c599b740bf5fe
2. df2c8ec28e73d47392b8cb24828c15c54819da41
3. 78c3ba5df96c875b1668e1cd3ee0a69e62454f32


More details:
1. multi_v7_defconfig with enabled IPV6,NFS_V4,SENSORS_PWM_FAN,PWM_SAMSUNG
and disabled LEDS_TRIGGER_HEARTBEAT.
2. exynos5422-odroidxu3-lite.dts
3. The OPP used for cpufreq-dt are a combination of:
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/arch/arm/boot/dts/exynos5420.dtsi
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/arch/arm/boot/dts/exynos5422-cpus.dtsi
4. Reproduced recently on next-20160212. First encountered on next-20160211.

Any ideas?

Best regards,
Krzysztof


Re: [next] Odroid XU3 boot fail after cpufreq: dt: Use dev_pm_opp_set_rate() to switch frequency

2016-02-13 Thread Viresh Kumar
On 14-02-16, 13:56, Krzysztof Kozlowski wrote:
> Hi all,
> 
> Recently Odroid XU3 failed to boot on linux-next
> on multi_v7 defconfig. exynos defconfig boots fine.
> 
> Probably the "cpufreq: dt: Use dev_pm_opp_set_rate() to
> switch frequency" is important here:
> commit 78c3ba5df96c875b1668e1cd3ee0a69e62454f32
> Author: Viresh Kumar 
> Date:   Tue Feb 9 10:30:46 2016 +0530
> 
> cpufreq: dt: Use dev_pm_opp_set_rate() to switch frequency
> 
> OPP core supports frequency/voltage changes based on the target
> frequency now, use that instead of open coding the same in cpufreq-dt
> driver.
> 
> Signed-off-by: Viresh Kumar 
> Reviewed-by: Stephen Boyd 
> Signed-off-by: Rafael J. Wysocki 

Can you please try the below untested patch please ?

diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
index d7cd4e265766..a97b333036c9 100644
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -1156,9 +1156,15 @@ static int opp_parse_supplies(struct dev_pm_opp *opp, 
struct device *dev,
return -EINVAL;
}
 
-   opp->u_volt = microvolt[0];
-   opp->u_volt_min = microvolt[1];
-   opp->u_volt_max = microvolt[2];
+   if (count == 1) {
+   opp->u_volt = microvolt[0];
+   opp->u_volt_min = opp->u_volt;
+   opp->u_volt_max = opp->u_volt;
+   } else {
+   opp->u_volt = microvolt[0];
+   opp->u_volt_min = microvolt[1];
+   opp->u_volt_max = microvolt[2];
+   }
 
/* Search for "opp-microamp-" */
prop = NULL;

-- 
viresh


Re: [next] Odroid XU3 boot fail after cpufreq: dt: Use dev_pm_opp_set_rate() to switch frequency

2016-02-13 Thread Krzysztof Kozlowski
W dniu 14.02.2016 o 14:22, Viresh Kumar pisze:
> On 14-02-16, 13:56, Krzysztof Kozlowski wrote:
>> Hi all,
>>
>> Recently Odroid XU3 failed to boot on linux-next
>> on multi_v7 defconfig. exynos defconfig boots fine.
>>
>> Probably the "cpufreq: dt: Use dev_pm_opp_set_rate() to
>> switch frequency" is important here:
>> commit 78c3ba5df96c875b1668e1cd3ee0a69e62454f32
>> Author: Viresh Kumar 
>> Date:   Tue Feb 9 10:30:46 2016 +0530
>>
>> cpufreq: dt: Use dev_pm_opp_set_rate() to switch frequency
>> 
>> OPP core supports frequency/voltage changes based on the target
>> frequency now, use that instead of open coding the same in cpufreq-dt
>> driver.
>> 
>> Signed-off-by: Viresh Kumar 
>> Reviewed-by: Stephen Boyd 
>> Signed-off-by: Rafael J. Wysocki 
> 
> Can you please try the below untested patch please ?

Thanks for quick reply. The patch fixed the problem.

Tested-by: Krzysztof Kozlowski 

Best regards,
Krzysztof

> diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
> index d7cd4e265766..a97b333036c9 100644
> --- a/drivers/base/power/opp/core.c
> +++ b/drivers/base/power/opp/core.c
> @@ -1156,9 +1156,15 @@ static int opp_parse_supplies(struct dev_pm_opp *opp, 
> struct device *dev,
>   return -EINVAL;
>   }
>  
> - opp->u_volt = microvolt[0];
> - opp->u_volt_min = microvolt[1];
> - opp->u_volt_max = microvolt[2];
> + if (count == 1) {
> + opp->u_volt = microvolt[0];
> + opp->u_volt_min = opp->u_volt;
> + opp->u_volt_max = opp->u_volt;
> + } else {
> + opp->u_volt = microvolt[0];
> + opp->u_volt_min = microvolt[1];
> + opp->u_volt_max = microvolt[2];
> + }
>  
>   /* Search for "opp-microamp-" */
>   prop = NULL;
>