lkml.org 
[lkml]   [2014]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RESEND PATCH v2] ARM: exynos4: hotplug: Fix CPU idle clock down after CPU off
Hi Krzysztof,

Please see my comment below.

On 16.07.2014 10:23, Krzysztof Kozlowski wrote:
> On Exynos4 USE_DELAYED_RESET_ASSERTION must be set in
> ARM_COREx_OPTION register during CPU power down. This is the proper way
> of powering down CPU on Exynos4.
>
> Additionally on Exynos4212 without this the CPU clock down feature won't
> work after powering down some CPU and the online CPUs will work at full
> frequency chosen by CPUfreq governor.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

[snip]

> @@ -36,6 +36,14 @@ static inline void cpu_leave_lowpower(void)
> : "=&r" (v)
> : "Ir" (CR_C), "Ir" (0x40)
> : "cc");
> +
> + if (soc_is_exynos4()) {
> + unsigned int tmp;
> +
> + tmp = __raw_readl(EXYNOS_ARM_CORE_OPTION(core_id));
> + tmp &= ~(S5P_USE_DELAYED_RESET_ASSERTION);
> + __raw_writel(tmp, EXYNOS_ARM_CORE_OPTION(core_id));
> + }

This code is executed only if the CPU doesn't manage to power off before
already receiving a wake-up event. Otherwise the context is lost after
wfi(), as the core power is being cut down.

The normal wake-up path goes through platsmp's exynos_boot_secondary()
and I believe that setting of S5P_USE_DELAYED_RESET_ASSERTION should be
taken care there as well.

Best regards,
Tomasz


\
 
 \ /
  Last update: 2014-07-16 13:21    [W:0.069 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site