Re: [PATCH v5 2/5] ARM: EXYNOS: use generic exynos cpu power control functions

2014-05-13 Thread Abhilash Kesavan
Hi Kukjin,

On Tue, May 13, 2014 at 7:58 AM, Kukjin Kim  wrote:
> Abhilash Kesavan wrote:
>>
>> From: Leela Krishna Amudala 
>>
>> Use generic exynos cpu power control functions to power up/down
>> and to know the status of the cpu.
>>
>> Signed-off-by: Leela Krishna Amudala 
>
> Same as previous comment.
>
>> ---
>>  arch/arm/mach-exynos/platsmp.c |9 +++--
>>  1 file changed, 3 insertions(+), 6 deletions(-)
>>
>> diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-
>> exynos/platsmp.c
>> index 0aac032..d442a66 100644
>> --- a/arch/arm/mach-exynos/platsmp.c
>> +++ b/arch/arm/mach-exynos/platsmp.c
>> @@ -130,15 +130,12 @@ static int exynos_boot_secondary(unsigned int cpu,
>> struct task_struct *idle)
>>*/
>>   write_pen_release(phys_cpu);
>>
>> - if (!(__raw_readl(S5P_ARM_CORE1_STATUS) & S5P_CORE_LOCAL_PWR_EN)) {
>> - __raw_writel(S5P_CORE_LOCAL_PWR_EN,
>> -  S5P_ARM_CORE1_CONFIGURATION);
>> -
>> + if (!exynos_cpu_power_state(cpu)) {
>> + exynos_cpu_powerup(cpu);
>>   timeout = 10;
>>
>>   /* wait max 10 ms until cpu1 is on */
>> - while ((__raw_readl(S5P_ARM_CORE1_STATUS)
>> - & S5P_CORE_LOCAL_PWR_EN) != S5P_CORE_LOCAL_PWR_EN) {
>> + while (exynos_cpu_power_state(cpu) != S5P_CORE_LOCAL_PWR_EN)
>> {
>>   if (timeout-- == 0)
>>   break;
>>
>> --
>
> You may cleanup the definitions of 'S5P_ARM_CORE1_CONFIGURATION/STATUS' in
> regs-pmu.h once hotplug.c uses the generic power control functions.
OK, will re-post a new version rebased on your for-next branch soon.

Regards,
Abhilash
>
> - Kukjin
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH v5 2/5] ARM: EXYNOS: use generic exynos cpu power control functions

2014-05-12 Thread Kukjin Kim
Abhilash Kesavan wrote:
> 
> From: Leela Krishna Amudala 
> 
> Use generic exynos cpu power control functions to power up/down
> and to know the status of the cpu.
> 
> Signed-off-by: Leela Krishna Amudala 

Same as previous comment.

> ---
>  arch/arm/mach-exynos/platsmp.c |9 +++--
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-
> exynos/platsmp.c
> index 0aac032..d442a66 100644
> --- a/arch/arm/mach-exynos/platsmp.c
> +++ b/arch/arm/mach-exynos/platsmp.c
> @@ -130,15 +130,12 @@ static int exynos_boot_secondary(unsigned int cpu,
> struct task_struct *idle)
>*/
>   write_pen_release(phys_cpu);
> 
> - if (!(__raw_readl(S5P_ARM_CORE1_STATUS) & S5P_CORE_LOCAL_PWR_EN)) {
> - __raw_writel(S5P_CORE_LOCAL_PWR_EN,
> -  S5P_ARM_CORE1_CONFIGURATION);
> -
> + if (!exynos_cpu_power_state(cpu)) {
> + exynos_cpu_powerup(cpu);
>   timeout = 10;
> 
>   /* wait max 10 ms until cpu1 is on */
> - while ((__raw_readl(S5P_ARM_CORE1_STATUS)
> - & S5P_CORE_LOCAL_PWR_EN) != S5P_CORE_LOCAL_PWR_EN) {
> + while (exynos_cpu_power_state(cpu) != S5P_CORE_LOCAL_PWR_EN)
> {
>   if (timeout-- == 0)
>   break;
> 
> --

You may cleanup the definitions of 'S5P_ARM_CORE1_CONFIGURATION/STATUS' in
regs-pmu.h once hotplug.c uses the generic power control functions.

- Kukjin

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v5 2/5] ARM: EXYNOS: use generic exynos cpu power control functions

2014-05-05 Thread Abhilash Kesavan
From: Leela Krishna Amudala 

Use generic exynos cpu power control functions to power up/down
and to know the status of the cpu.

Signed-off-by: Leela Krishna Amudala 
---
 arch/arm/mach-exynos/platsmp.c |9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index 0aac032..d442a66 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -130,15 +130,12 @@ static int exynos_boot_secondary(unsigned int cpu, struct 
task_struct *idle)
 */
write_pen_release(phys_cpu);
 
-   if (!(__raw_readl(S5P_ARM_CORE1_STATUS) & S5P_CORE_LOCAL_PWR_EN)) {
-   __raw_writel(S5P_CORE_LOCAL_PWR_EN,
-S5P_ARM_CORE1_CONFIGURATION);
-
+   if (!exynos_cpu_power_state(cpu)) {
+   exynos_cpu_powerup(cpu);
timeout = 10;
 
/* wait max 10 ms until cpu1 is on */
-   while ((__raw_readl(S5P_ARM_CORE1_STATUS)
-   & S5P_CORE_LOCAL_PWR_EN) != S5P_CORE_LOCAL_PWR_EN) {
+   while (exynos_cpu_power_state(cpu) != S5P_CORE_LOCAL_PWR_EN) {
if (timeout-- == 0)
break;
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html