linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] exynos: pmu: use PS_HOLD based poweroff for all supported SoCs
@ 2015-02-09  7:25 Marek Szyprowski
  2015-02-09  9:06 ` Krzysztof Kozlowski
  2015-02-09 20:24 ` Tobias Jakobi
  0 siblings, 2 replies; 8+ messages in thread
From: Marek Szyprowski @ 2015-02-09  7:25 UTC (permalink / raw)
  To: linux-arm-kernel

PS_HOLD based power off procedure is common for all Exynos SoCs, so use
it for every Exynos SoC.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 arch/arm/mach-exynos/pmu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c
index c15761ca2f18..e812c1c85624 100644
--- a/arch/arm/mach-exynos/pmu.c
+++ b/arch/arm/mach-exynos/pmu.c
@@ -681,7 +681,7 @@ static unsigned int const exynos5420_list_disable_pmu_reg[] = {
 	EXYNOS5420_CMU_RESET_FSYS_SYS_PWR_REG,
 };
 
-static void exynos5_power_off(void)
+static void exynos_power_off(void)
 {
 	unsigned int tmp;
 
@@ -872,8 +872,6 @@ static void exynos5420_pmu_init(void)
 			EXYNOS5420_ARM_INTR_SPREAD_USE_STANDBYWFI);
 
 	pmu_raw_writel(0x1, EXYNOS5420_UP_SCHEDULER);
-
-	pm_power_off = exynos5_power_off;
 	pr_info("EXYNOS5420 PMU initialized\n");
 }
 
@@ -984,6 +982,8 @@ static int exynos_pmu_probe(struct platform_device *pdev)
 	if (ret)
 		dev_warn(dev, "can't register restart handler err=%d\n", ret);
 
+	pm_power_off = exynos_power_off;
+
 	dev_dbg(dev, "Exynos PMU Driver probe done\n");
 	return 0;
 }
-- 
1.9.2

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

* [PATCH] exynos: pmu: use PS_HOLD based poweroff for all supported SoCs
  2015-02-09  7:25 [PATCH] exynos: pmu: use PS_HOLD based poweroff for all supported SoCs Marek Szyprowski
@ 2015-02-09  9:06 ` Krzysztof Kozlowski
  2015-02-09 10:58   ` Krzysztof Kozlowski
  2015-02-09 20:24 ` Tobias Jakobi
  1 sibling, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2015-02-09  9:06 UTC (permalink / raw)
  To: linux-arm-kernel

2015-02-09 8:25 GMT+01:00 Marek Szyprowski <m.szyprowski@samsung.com>:
> PS_HOLD based power off procedure is common for all Exynos SoCs, so use
> it for every Exynos SoC.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  arch/arm/mach-exynos/pmu.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

I tried this on Trats2 board (Exynos 4412) and message "Power down
failed, please power off system manually." appears. Is it expected? Or
am I missing some patches (I applied this on top of next-20150129)?

Best regards,
Krzysztof

>
> diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c
> index c15761ca2f18..e812c1c85624 100644
> --- a/arch/arm/mach-exynos/pmu.c
> +++ b/arch/arm/mach-exynos/pmu.c
> @@ -681,7 +681,7 @@ static unsigned int const exynos5420_list_disable_pmu_reg[] = {
>         EXYNOS5420_CMU_RESET_FSYS_SYS_PWR_REG,
>  };
>
> -static void exynos5_power_off(void)
> +static void exynos_power_off(void)
>  {
>         unsigned int tmp;
>
> @@ -872,8 +872,6 @@ static void exynos5420_pmu_init(void)
>                         EXYNOS5420_ARM_INTR_SPREAD_USE_STANDBYWFI);
>
>         pmu_raw_writel(0x1, EXYNOS5420_UP_SCHEDULER);
> -
> -       pm_power_off = exynos5_power_off;
>         pr_info("EXYNOS5420 PMU initialized\n");
>  }
>
> @@ -984,6 +982,8 @@ static int exynos_pmu_probe(struct platform_device *pdev)
>         if (ret)
>                 dev_warn(dev, "can't register restart handler err=%d\n", ret);
>
> +       pm_power_off = exynos_power_off;
> +
>         dev_dbg(dev, "Exynos PMU Driver probe done\n");
>         return 0;
>  }
> --
> 1.9.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] exynos: pmu: use PS_HOLD based poweroff for all supported SoCs
  2015-02-09  9:06 ` Krzysztof Kozlowski
@ 2015-02-09 10:58   ` Krzysztof Kozlowski
  2015-03-20 15:11     ` Marek Szyprowski
  0 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2015-02-09 10:58 UTC (permalink / raw)
  To: linux-arm-kernel

2015-02-09 10:06 GMT+01:00 Krzysztof Kozlowski <k.kozlowski@samsung.com>:
> 2015-02-09 8:25 GMT+01:00 Marek Szyprowski <m.szyprowski@samsung.com>:
>> PS_HOLD based power off procedure is common for all Exynos SoCs, so use
>> it for every Exynos SoC.
>>
>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> ---
>>  arch/arm/mach-exynos/pmu.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> I tried this on Trats2 board (Exynos 4412) and message "Power down
> failed, please power off system manually." appears. Is it expected? Or
> am I missing some patches (I applied this on top of next-20150129)?

It was my fault (I left attached JIG cable which prevents power off).
Now it works fine.

Tested on Trats2 (Exynos4412):
Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Patch also looks good, so:
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Best regards,
Krzysztof

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

* [PATCH] exynos: pmu: use PS_HOLD based poweroff for all supported SoCs
  2015-02-09  7:25 [PATCH] exynos: pmu: use PS_HOLD based poweroff for all supported SoCs Marek Szyprowski
  2015-02-09  9:06 ` Krzysztof Kozlowski
@ 2015-02-09 20:24 ` Tobias Jakobi
  1 sibling, 0 replies; 8+ messages in thread
From: Tobias Jakobi @ 2015-02-09 20:24 UTC (permalink / raw)
  To: linux-arm-kernel

Marek Szyprowski wrote:
> PS_HOLD based power off procedure is common for all Exynos SoCs, so use
> it for every Exynos SoC.


Tested on my Odroid-X2 and it seems to solve the 'heating issue' when
the system is shut down but left on the AC adapter.

With best wishes,
Tobias

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

* [PATCH] exynos: pmu: use PS_HOLD based poweroff for all supported SoCs
  2015-02-09 10:58   ` Krzysztof Kozlowski
@ 2015-03-20 15:11     ` Marek Szyprowski
  2015-03-20 16:03       ` Tobias Jakobi
  2015-03-24  8:06       ` Kukjin Kim
  0 siblings, 2 replies; 8+ messages in thread
From: Marek Szyprowski @ 2015-03-20 15:11 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

On 2015-02-09 11:58, Krzysztof Kozlowski wrote:
> 2015-02-09 10:06 GMT+01:00 Krzysztof Kozlowski <k.kozlowski@samsung.com>:
>> 2015-02-09 8:25 GMT+01:00 Marek Szyprowski <m.szyprowski@samsung.com>:
>>> PS_HOLD based power off procedure is common for all Exynos SoCs, so use
>>> it for every Exynos SoC.
>>>
>>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>>> ---
>>>   arch/arm/mach-exynos/pmu.c | 6 +++---
>>>   1 file changed, 3 insertions(+), 3 deletions(-)
>> I tried this on Trats2 board (Exynos 4412) and message "Power down
>> failed, please power off system manually." appears. Is it expected? Or
>> am I missing some patches (I applied this on top of next-20150129)?
> It was my fault (I left attached JIG cable which prevents power off).
> Now it works fine.
>
> Tested on Trats2 (Exynos4412):
> Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
>
> Patch also looks good, so:
> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Gentle ping for merging this in v4.1-next...

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

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

* [PATCH] exynos: pmu: use PS_HOLD based poweroff for all supported SoCs
  2015-03-20 15:11     ` Marek Szyprowski
@ 2015-03-20 16:03       ` Tobias Jakobi
  2015-03-24  8:06       ` Kukjin Kim
  1 sibling, 0 replies; 8+ messages in thread
From: Tobias Jakobi @ 2015-03-20 16:03 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Marek,

On 2015-03-20 16:11, Marek Szyprowski wrote:
>> It was my fault (I left attached JIG cable which prevents power off).
>> Now it works fine.
>> 
>> Tested on Trats2 (Exynos4412):
>> Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
>> 
>> Patch also looks good, so:
>> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> 
> Gentle ping for merging this in v4.1-next...
> 
> Best regards
I'd say that this is even a candidate for 4.0.0. Like I reported 
earlier, the SoC gets really hot without proper shutdown, so definitely 
something you don't want for a not properly cooled system (U3 without 
the fan running e.g.).

With best wishes,
Tobias

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

* [PATCH] exynos: pmu: use PS_HOLD based poweroff for all supported SoCs
  2015-03-20 15:11     ` Marek Szyprowski
  2015-03-20 16:03       ` Tobias Jakobi
@ 2015-03-24  8:06       ` Kukjin Kim
  2015-05-20  6:31         ` Krzysztof Kozlowski
  1 sibling, 1 reply; 8+ messages in thread
From: Kukjin Kim @ 2015-03-24  8:06 UTC (permalink / raw)
  To: linux-arm-kernel

Marek Szyprowski wrote:
> 
> Hello,
> 
Hi,

> On 2015-02-09 11:58, Krzysztof Kozlowski wrote:
> > 2015-02-09 10:06 GMT+01:00 Krzysztof Kozlowski <k.kozlowski@samsung.com>:
> >> 2015-02-09 8:25 GMT+01:00 Marek Szyprowski <m.szyprowski@samsung.com>:
> >>> PS_HOLD based power off procedure is common for all Exynos SoCs, so use
> >>> it for every Exynos SoC.
> >>>
> >>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> >>> ---
> >>>   arch/arm/mach-exynos/pmu.c | 6 +++---
> >>>   1 file changed, 3 insertions(+), 3 deletions(-)
> >> I tried this on Trats2 board (Exynos 4412) and message "Power down
> >> failed, please power off system manually." appears. Is it expected? Or
> >> am I missing some patches (I applied this on top of next-20150129)?
> > It was my fault (I left attached JIG cable which prevents power off).
> > Now it works fine.
> >
> > Tested on Trats2 (Exynos4412):
> > Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> >
> > Patch also looks good, so:
> > Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> 
> Gentle ping for merging this in v4.1-next...
> 
OK, I'll queue this into v4.1-next/mach-samsung.

Just note, some newer SoC has different poweroff scheme not just using PS_HOLD
based so maybe we need to revisit the poweroff later ;-)

Thanks,
Kukjin

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

* [PATCH] exynos: pmu: use PS_HOLD based poweroff for all supported SoCs
  2015-03-24  8:06       ` Kukjin Kim
@ 2015-05-20  6:31         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2015-05-20  6:31 UTC (permalink / raw)
  To: linux-arm-kernel

2015-03-24 17:06 GMT+09:00 Kukjin Kim <kgene@kernel.org>:
> Marek Szyprowski wrote:
>>
>> Hello,
>>
> Hi,
>
>> On 2015-02-09 11:58, Krzysztof Kozlowski wrote:
>> > 2015-02-09 10:06 GMT+01:00 Krzysztof Kozlowski <k.kozlowski@samsung.com>:
>> >> 2015-02-09 8:25 GMT+01:00 Marek Szyprowski <m.szyprowski@samsung.com>:
>> >>> PS_HOLD based power off procedure is common for all Exynos SoCs, so use
>> >>> it for every Exynos SoC.
>> >>>
>> >>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> >>> ---
>> >>>   arch/arm/mach-exynos/pmu.c | 6 +++---
>> >>>   1 file changed, 3 insertions(+), 3 deletions(-)
>> >> I tried this on Trats2 board (Exynos 4412) and message "Power down
>> >> failed, please power off system manually." appears. Is it expected? Or
>> >> am I missing some patches (I applied this on top of next-20150129)?
>> > It was my fault (I left attached JIG cable which prevents power off).
>> > Now it works fine.
>> >
>> > Tested on Trats2 (Exynos4412):
>> > Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
>> >
>> > Patch also looks good, so:
>> > Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
>>
>> Gentle ping for merging this in v4.1-next...
>>
> OK, I'll queue this into v4.1-next/mach-samsung.

This patch is waiting enough time and it missed the 4.1. Kukjin, could
you apply it for 4.2? I'll apply it anyway to my tree.

Best regards,
Krzysztof

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

end of thread, other threads:[~2015-05-20  6:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-09  7:25 [PATCH] exynos: pmu: use PS_HOLD based poweroff for all supported SoCs Marek Szyprowski
2015-02-09  9:06 ` Krzysztof Kozlowski
2015-02-09 10:58   ` Krzysztof Kozlowski
2015-03-20 15:11     ` Marek Szyprowski
2015-03-20 16:03       ` Tobias Jakobi
2015-03-24  8:06       ` Kukjin Kim
2015-05-20  6:31         ` Krzysztof Kozlowski
2015-02-09 20:24 ` Tobias Jakobi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).