diff mbox

[V2,2/2] ARM: EXYNOS: cpuidle: Allow C1 state only in supported SOC's.

Message ID 1371036526-16589-3-git-send-email-amit.daniel@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Amit Kachhap June 12, 2013, 11:28 a.m. UTC
This patch registers the basic C0 state for all exynos SOC's but
limits the C1(AFTR -Arm off top running) state in only the supported
SOC's(ie. EXYNOS 4210, 4212, 4412 and 5250).

Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
---
 arch/arm/mach-exynos/cpuidle.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Comments

kgene@kernel.org July 24, 2013, 5:15 a.m. UTC | #1
Amit Daniel Kachhap wrote:
> 
> This patch registers the basic C0 state for all exynos SOC's but
> limits the C1(AFTR -Arm off top running) state in only the supported
> SOC's(ie. EXYNOS 4210, 4212, 4412 and 5250).
> 
> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
> ---
>  arch/arm/mach-exynos/cpuidle.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-
> exynos/cpuidle.c
> index 2d071c6..ccb2b48 100644
> --- a/arch/arm/mach-exynos/cpuidle.c
> +++ b/arch/arm/mach-exynos/cpuidle.c
> @@ -176,7 +176,9 @@ static int __init exynos4_init_cpuidle(void)
>  		device->cpu = cpu_id;
> 
>  		/* Support IDLE only */
> -		if (cpu_id != 0)
> +		if (!(soc_is_exynos4210() || soc_is_exynos4212() ||
> +			soc_is_exynos4412() || soc_is_exynos5250()) ||
> +			cpu_id != 0)

How about exynos5420?

So...

+		if (soc_is_exynos5440() || cpu_id !=0) ?

>  			device->state_count = 1;
> 
>  		ret = cpuidle_register_device(device);
> --
> 1.7.1

- Kukjin
Amit Kachhap July 24, 2013, 5:59 a.m. UTC | #2
Hi,

On Wed, Jul 24, 2013 at 10:45 AM, Kukjin Kim <kgene@kernel.org> wrote:
> Amit Daniel Kachhap wrote:
>>
>> This patch registers the basic C0 state for all exynos SOC's but
>> limits the C1(AFTR -Arm off top running) state in only the supported
>> SOC's(ie. EXYNOS 4210, 4212, 4412 and 5250).
>>
>> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
>> ---
>>  arch/arm/mach-exynos/cpuidle.c |    4 +++-
>>  1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-
>> exynos/cpuidle.c
>> index 2d071c6..ccb2b48 100644
>> --- a/arch/arm/mach-exynos/cpuidle.c
>> +++ b/arch/arm/mach-exynos/cpuidle.c
>> @@ -176,7 +176,9 @@ static int __init exynos4_init_cpuidle(void)
>>               device->cpu = cpu_id;
>>
>>               /* Support IDLE only */
>> -             if (cpu_id != 0)
>> +             if (!(soc_is_exynos4210() || soc_is_exynos4212() ||
>> +                     soc_is_exynos4412() || soc_is_exynos5250()) ||
>> +                     cpu_id != 0)
>
> How about exynos5420?
>
> So...
>
> +               if (soc_is_exynos5440() || cpu_id !=0) ?
This is fine.

Thanks,
Amit
>
>>                       device->state_count = 1;
>>
>>               ret = cpuidle_register_device(device);
>> --
>> 1.7.1
>
> - Kukjin
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
kgene@kernel.org July 24, 2013, 7:36 a.m. UTC | #3
amit daniel kachhap wrote:

[...]

> >>               /* Support IDLE only */
> >> -             if (cpu_id != 0)
> >> +             if (!(soc_is_exynos4210() || soc_is_exynos4212() ||
> >> +                     soc_is_exynos4412() || soc_is_exynos5250()) ||
> >> +                     cpu_id != 0)
> >
> > How about exynos5420?
> >
> > So...
> >
> > +               if (soc_is_exynos5440() || cpu_id !=0) ?
> This is fine.
> 
So, you will re-send?

- Kukjin
Amit Kachhap July 24, 2013, 9:55 a.m. UTC | #4
On Wed, Jul 24, 2013 at 1:06 PM, Kukjin Kim <kgene@kernel.org> wrote:
> amit daniel kachhap wrote:
>
> [...]
>
>> >>               /* Support IDLE only */
>> >> -             if (cpu_id != 0)
>> >> +             if (!(soc_is_exynos4210() || soc_is_exynos4212() ||
>> >> +                     soc_is_exynos4412() || soc_is_exynos5250()) ||
>> >> +                     cpu_id != 0)
>> >
>> > How about exynos5420?
>> >
>> > So...
>> >
>> > +               if (soc_is_exynos5440() || cpu_id !=0) ?
>> This is fine.
>>
> So, you will re-send?
Just submitted the patch with this change.

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

Patch

diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index 2d071c6..ccb2b48 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -176,7 +176,9 @@  static int __init exynos4_init_cpuidle(void)
 		device->cpu = cpu_id;
 
 		/* Support IDLE only */
-		if (cpu_id != 0)
+		if (!(soc_is_exynos4210() || soc_is_exynos4212() ||
+			soc_is_exynos4412() || soc_is_exynos5250()) ||
+			cpu_id != 0)
 			device->state_count = 1;
 
 		ret = cpuidle_register_device(device);