All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PM / devfreq: exynos-bus: Suspend all devices on system shutdown
       [not found] <CGME20190321090120eucas1p1d5122777e84f4e3c965946a8c5aead8b@eucas1p1.samsung.com>
@ 2019-03-21  9:01 ` Marek Szyprowski
  2019-03-21  9:19   ` Chanwoo Choi
  0 siblings, 1 reply; 5+ messages in thread
From: Marek Szyprowski @ 2019-03-21  9:01 UTC (permalink / raw)
  To: linux-kernel, linux-pm, linux-samsung-soc
  Cc: Marek Szyprowski, MyungJoo Ham, Chanwoo Choi,
	Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Lukasz Luba,
	Markus Reichl

Force all Exynos buses to safe operation points before doing the system
reboot operation. There are board on which some aggressive power saving
operation points are behind the capabilities of the bootloader to properly
reset the hardware and boot the board. This way one can avoid board crash
early after reboot.

This fixes reboot issue on OdroidU3 board both with eMMC and SD boot.

Reported-by: Markus Reichl <m.reichl@fivetechno.de>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
This is an alternative to https://patchwork.kernel.org/patch/10781433/
limited only to Exynos-bus driver.
---
 drivers/devfreq/exynos-bus.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
index c25658b26598..486cc5b422f1 100644
--- a/drivers/devfreq/exynos-bus.c
+++ b/drivers/devfreq/exynos-bus.c
@@ -514,6 +514,13 @@ static int exynos_bus_probe(struct platform_device *pdev)
 	return ret;
 }
 
+static void exynos_bus_shutdown(struct platform_device *pdev)
+{
+	struct exynos_bus *bus = dev_get_drvdata(&pdev->dev);
+
+	devfreq_suspend_device(bus->devfreq);
+}
+
 #ifdef CONFIG_PM_SLEEP
 static int exynos_bus_resume(struct device *dev)
 {
@@ -556,6 +563,7 @@ MODULE_DEVICE_TABLE(of, exynos_bus_of_match);
 
 static struct platform_driver exynos_bus_platdrv = {
 	.probe		= exynos_bus_probe,
+	.shutdown	= exynos_bus_shutdown,
 	.driver = {
 		.name	= "exynos-bus",
 		.pm	= &exynos_bus_pm,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] PM / devfreq: exynos-bus: Suspend all devices on system shutdown
  2019-03-21  9:01 ` [PATCH] PM / devfreq: exynos-bus: Suspend all devices on system shutdown Marek Szyprowski
@ 2019-03-21  9:19   ` Chanwoo Choi
  2019-03-21  9:29     ` Marek Szyprowski
       [not found]     ` <CGME20190321090120eucas1p1d5122777e84f4e3c965946a8c5aead8b@epcms1p7>
  0 siblings, 2 replies; 5+ messages in thread
From: Chanwoo Choi @ 2019-03-21  9:19 UTC (permalink / raw)
  To: Marek Szyprowski, linux-kernel, linux-pm, linux-samsung-soc
  Cc: MyungJoo Ham, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
	Lukasz Luba, Markus Reichl

Hi Marek,

On 19. 3. 21. 오후 6:01, Marek Szyprowski wrote:
> Force all Exynos buses to safe operation points before doing the system
> reboot operation. There are board on which some aggressive power saving
> operation points are behind the capabilities of the bootloader to properly
> reset the hardware and boot the board. This way one can avoid board crash
> early after reboot.
> 
> This fixes reboot issue on OdroidU3 board both with eMMC and SD boot.
> 
> Reported-by: Markus Reichl <m.reichl@fivetechno.de>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> This is an alternative to https://patchwork.kernel.org/patch/10781433/
> limited only to Exynos-bus driver.
> ---
>  drivers/devfreq/exynos-bus.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
> index c25658b26598..486cc5b422f1 100644
> --- a/drivers/devfreq/exynos-bus.c
> +++ b/drivers/devfreq/exynos-bus.c
> @@ -514,6 +514,13 @@ static int exynos_bus_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> +static void exynos_bus_shutdown(struct platform_device *pdev)
> +{
> +	struct exynos_bus *bus = dev_get_drvdata(&pdev->dev);
> +
> +	devfreq_suspend_device(bus->devfreq);
> +}
> +
>  #ifdef CONFIG_PM_SLEEP
>  static int exynos_bus_resume(struct device *dev)
>  {
> @@ -556,6 +563,7 @@ MODULE_DEVICE_TABLE(of, exynos_bus_of_match);
>  
>  static struct platform_driver exynos_bus_platdrv = {
>  	.probe		= exynos_bus_probe,
> +	.shutdown	= exynos_bus_shutdown,
>  	.driver = {
>  		.name	= "exynos-bus",
>  		.pm	= &exynos_bus_pm,
> 

Actually, I already agreed the previous patch.
Also, it looks good to me.

Acked-by: Chanwoo Choi <cw00.choi@samsung.com>

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] PM / devfreq: exynos-bus: Suspend all devices on system shutdown
  2019-03-21  9:19   ` Chanwoo Choi
@ 2019-03-21  9:29     ` Marek Szyprowski
       [not found]     ` <CGME20190321090120eucas1p1d5122777e84f4e3c965946a8c5aead8b@epcms1p7>
  1 sibling, 0 replies; 5+ messages in thread
From: Marek Szyprowski @ 2019-03-21  9:29 UTC (permalink / raw)
  To: Chanwoo Choi, linux-kernel, linux-pm, linux-samsung-soc
  Cc: MyungJoo Ham, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
	Lukasz Luba, Markus Reichl

Hi Chanwoo,

On 2019-03-21 10:19, Chanwoo Choi wrote:
> On 19. 3. 21. 오후 6:01, Marek Szyprowski wrote:
>> Force all Exynos buses to safe operation points before doing the system
>> reboot operation. There are board on which some aggressive power saving
>> operation points are behind the capabilities of the bootloader to properly
>> reset the hardware and boot the board. This way one can avoid board crash
>> early after reboot.
>>
>> This fixes reboot issue on OdroidU3 board both with eMMC and SD boot.
>>
>> Reported-by: Markus Reichl <m.reichl@fivetechno.de>
>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> ---
>> This is an alternative to https://patchwork.kernel.org/patch/10781433/
>> limited only to Exynos-bus driver.
>> ---
>>   drivers/devfreq/exynos-bus.c | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
>> index c25658b26598..486cc5b422f1 100644
>> --- a/drivers/devfreq/exynos-bus.c
>> +++ b/drivers/devfreq/exynos-bus.c
>> @@ -514,6 +514,13 @@ static int exynos_bus_probe(struct platform_device *pdev)
>>   	return ret;
>>   }
>>   
>> +static void exynos_bus_shutdown(struct platform_device *pdev)
>> +{
>> +	struct exynos_bus *bus = dev_get_drvdata(&pdev->dev);
>> +
>> +	devfreq_suspend_device(bus->devfreq);
>> +}
>> +
>>   #ifdef CONFIG_PM_SLEEP
>>   static int exynos_bus_resume(struct device *dev)
>>   {
>> @@ -556,6 +563,7 @@ MODULE_DEVICE_TABLE(of, exynos_bus_of_match);
>>   
>>   static struct platform_driver exynos_bus_platdrv = {
>>   	.probe		= exynos_bus_probe,
>> +	.shutdown	= exynos_bus_shutdown,
>>   	.driver = {
>>   		.name	= "exynos-bus",
>>   		.pm	= &exynos_bus_pm,
>>
> Actually, I already agreed the previous patch.
> Also, it looks good to me.

Yes, I know, but MyungJoo had some objections, that's why I prepared 
alternative version.

> Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
>
Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Re: [PATCH] PM / devfreq: exynos-bus: Suspend all devices on system shutdown
       [not found]     ` <CGME20190321090120eucas1p1d5122777e84f4e3c965946a8c5aead8b@epcms1p7>
@ 2019-03-25  4:38         ` MyungJoo Ham
  0 siblings, 0 replies; 5+ messages in thread
From: MyungJoo Ham @ 2019-03-25  4:38 UTC (permalink / raw)
  To: Marek Szyprowski, Chanwoo Choi, linux-kernel, linux-pm,
	linux-samsung-soc
  Cc: Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Lukasz Luba,
	Markus Reichl

>Hi Chanwoo,
>
>On 2019-03-21 10:19, Chanwoo Choi wrote:
>> On 19. 3. 21. 오후 6:01, Marek Szyprowski wrote:
>>> Force all Exynos buses to safe operation points before doing the system
>>> reboot operation. There are board on which some aggressive power saving
>>> operation points are behind the capabilities of the bootloader to properly
>>> reset the hardware and boot the board. This way one can avoid board crash
>>> early after reboot.
>>>
>>> This fixes reboot issue on OdroidU3 board both with eMMC and SD boot.
>>>
>>> Reported-by: Markus Reichl <m.reichl@fivetechno.de>
>>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>>> ---
>>> This is an alternative to https://patchwork.kernel.org/patch/10781433/
>>> limited only to Exynos-bus driver.
>>> ---
>>>   drivers/devfreq/exynos-bus.c | 8 ++++++++
>>>   1 file changed, 8 insertions(+)
>>>
>>> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
>>> index c25658b26598..486cc5b422f1 100644
>>> --- a/drivers/devfreq/exynos-bus.c
>>> +++ b/drivers/devfreq/exynos-bus.c
>>> @@ -514,6 +514,13 @@ static int exynos_bus_probe(struct platform_device *pdev)
>>>   	return ret;
>>>   }
>>>   
>>> +static void exynos_bus_shutdown(struct platform_device *pdev)
>>> +{
>>> +	struct exynos_bus *bus = dev_get_drvdata(&pdev->dev);
>>> +
>>> +	devfreq_suspend_device(bus->devfreq);
>>> +}
>>> +
>>>   #ifdef CONFIG_PM_SLEEP
>>>   static int exynos_bus_resume(struct device *dev)
>>>   {
>>> @@ -556,6 +563,7 @@ MODULE_DEVICE_TABLE(of, exynos_bus_of_match);
>>>   
>>>   static struct platform_driver exynos_bus_platdrv = {
>>>   	.probe		= exynos_bus_probe,
>>> +	.shutdown	= exynos_bus_shutdown,
>>>   	.driver = {
>>>   		.name	= "exynos-bus",
>>>   		.pm	= &exynos_bus_pm,
>>>
>> Actually, I already agreed the previous patch.
>> Also, it looks good to me.
>
>Yes, I know, but MyungJoo had some objections, that's why I prepared 
>alternative version.
>
>> Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
>>

This has become looking good now :)


Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>


Cheers,
MyungJoo


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Re: [PATCH] PM / devfreq: exynos-bus: Suspend all devices on system shutdown
@ 2019-03-25  4:38         ` MyungJoo Ham
  0 siblings, 0 replies; 5+ messages in thread
From: MyungJoo Ham @ 2019-03-25  4:38 UTC (permalink / raw)
  To: Marek Szyprowski, Chanwoo Choi, linux-kernel, linux-pm,
	linux-samsung-soc
  Cc: Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Lukasz Luba,
	Markus Reichl

>Hi Chanwoo,
>
>On 2019-03-21 10:19, Chanwoo Choi wrote:
>> On 19. 3. 21. 오후 6:01, Marek Szyprowski wrote:
>>> Force all Exynos buses to safe operation points before doing the system
>>> reboot operation. There are board on which some aggressive power saving
>>> operation points are behind the capabilities of the bootloader to properly
>>> reset the hardware and boot the board. This way one can avoid board crash
>>> early after reboot.
>>>
>>> This fixes reboot issue on OdroidU3 board both with eMMC and SD boot.
>>>
>>> Reported-by: Markus Reichl <m.reichl@fivetechno.de>
>>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>>> ---
>>> This is an alternative to https://patchwork.kernel.org/patch/10781433/
>>> limited only to Exynos-bus driver.
>>> ---
>>>   drivers/devfreq/exynos-bus.c | 8 ++++++++
>>>   1 file changed, 8 insertions(+)
>>>
>>> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
>>> index c25658b26598..486cc5b422f1 100644
>>> --- a/drivers/devfreq/exynos-bus.c
>>> +++ b/drivers/devfreq/exynos-bus.c
>>> @@ -514,6 +514,13 @@ static int exynos_bus_probe(struct platform_device *pdev)
>>>   	return ret;
>>>   }
>>>   
>>> +static void exynos_bus_shutdown(struct platform_device *pdev)
>>> +{
>>> +	struct exynos_bus *bus = dev_get_drvdata(&pdev->dev);
>>> +
>>> +	devfreq_suspend_device(bus->devfreq);
>>> +}
>>> +
>>>   #ifdef CONFIG_PM_SLEEP
>>>   static int exynos_bus_resume(struct device *dev)
>>>   {
>>> @@ -556,6 +563,7 @@ MODULE_DEVICE_TABLE(of, exynos_bus_of_match);
>>>   
>>>   static struct platform_driver exynos_bus_platdrv = {
>>>   	.probe		= exynos_bus_probe,
>>> +	.shutdown	= exynos_bus_shutdown,
>>>   	.driver = {
>>>   		.name	= "exynos-bus",
>>>   		.pm	= &exynos_bus_pm,
>>>
>> Actually, I already agreed the previous patch.
>> Also, it looks good to me.
>
>Yes, I know, but MyungJoo had some objections, that's why I prepared 
>alternative version.
>
>> Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
>>

This has become looking good now :)


Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>


Cheers,
MyungJoo


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-03-25  4:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20190321090120eucas1p1d5122777e84f4e3c965946a8c5aead8b@eucas1p1.samsung.com>
2019-03-21  9:01 ` [PATCH] PM / devfreq: exynos-bus: Suspend all devices on system shutdown Marek Szyprowski
2019-03-21  9:19   ` Chanwoo Choi
2019-03-21  9:29     ` Marek Szyprowski
     [not found]     ` <CGME20190321090120eucas1p1d5122777e84f4e3c965946a8c5aead8b@epcms1p7>
2019-03-25  4:38       ` MyungJoo Ham
2019-03-25  4:38         ` MyungJoo Ham

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.