diff mbox

[RFC/PATCH,1/4] ARM: cpuidle: Add cpuidle support for R-Car Gen2 series

Message ID 1428292244-2160-2-git-send-email-keita.kobayashi.ym@renesas.com (mailing list archive)
State RFC
Delegated to: Simon Horman
Headers show

Commit Message

keita kobayashi April 6, 2015, 3:50 a.m. UTC
Define ARM_RCAR_CPUIDLE config item to enable cpuidle
support for Renesas R-Car Gen2 SoCs.

Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
---
 drivers/cpuidle/Kconfig.arm | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Simon Horman April 7, 2015, 1:44 a.m. UTC | #1
On Mon, Apr 06, 2015 at 12:50:41PM +0900, Keita Kobayashi wrote:
> Define ARM_RCAR_CPUIDLE config item to enable cpuidle
> support for Renesas R-Car Gen2 SoCs.
> 
> Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
> ---
>  drivers/cpuidle/Kconfig.arm | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/cpuidle/Kconfig.arm b/drivers/cpuidle/Kconfig.arm
> index 21340e0..ea9d61e 100644
> --- a/drivers/cpuidle/Kconfig.arm
> +++ b/drivers/cpuidle/Kconfig.arm
> @@ -74,3 +74,11 @@ config ARM_MVEBU_V7_CPUIDLE
>  	depends on ARCH_MVEBU && !ARM64
>  	help
>  	  Select this to enable cpuidle on Armada 370, 38x and XP processors.
> +
> +config ARM_RCAR_CPUIDLE
> +	bool "CPU Idle Driver for the R-Car SoCs"
> +	depends on ARCH_RCAR_GEN2
> +	select ARM_CPUIDLE
> +	select ARM_CPU_SUSPEND
> +	help
> +	  Select this to enable cpuidle for R-Car SoCs

I hate to be the harbinger of bad news but I don't believe this will
reliably work because ARM_CPUIDLE selects DT_IDLE_STATES and I believe that
Kconfig does not support recursive selection[1].

[1] http://lkml.iu.edu/hypermail/linux/kernel/1412.0/04004.html

I suggest changing select ARM_CPUIDLE to depends on ARM_CPUIDLE.
I would be tempted to make the same change for ARM_CPU_SUSPEND too.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
keita kobayashi April 7, 2015, 5:48 a.m. UTC | #2
Hi Simon

Thank you for your feedback.

(2015/04/07 10:44), Simon Horman wrote:

> On Mon, Apr 06, 2015 at 12:50:41PM +0900, Keita Kobayashi wrote:
>> Define ARM_RCAR_CPUIDLE config item to enable cpuidle
>> support for Renesas R-Car Gen2 SoCs.
>>
>> Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
>> ---
>>  drivers/cpuidle/Kconfig.arm | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/cpuidle/Kconfig.arm b/drivers/cpuidle/Kconfig.arm
>> index 21340e0..ea9d61e 100644
>> --- a/drivers/cpuidle/Kconfig.arm
>> +++ b/drivers/cpuidle/Kconfig.arm
>> @@ -74,3 +74,11 @@ config ARM_MVEBU_V7_CPUIDLE
>>  	depends on ARCH_MVEBU && !ARM64
>>  	help
>>  	  Select this to enable cpuidle on Armada 370, 38x and XP processors.
>> +
>> +config ARM_RCAR_CPUIDLE
>> +	bool "CPU Idle Driver for the R-Car SoCs"
>> +	depends on ARCH_RCAR_GEN2
>> +	select ARM_CPUIDLE
>> +	select ARM_CPU_SUSPEND
>> +	help
>> +	  Select this to enable cpuidle for R-Car SoCs
> 
> I hate to be the harbinger of bad news but I don't believe this will
> reliably work because ARM_CPUIDLE selects DT_IDLE_STATES and I believe that
> Kconfig does not support recursive selection[1].
> 
> [1] http://lkml.iu.edu/hypermail/linux/kernel/1412.0/04004.html
> 
> I suggest changing select ARM_CPUIDLE to depends on ARM_CPUIDLE.
> I would be tempted to make the same change for ARM_CPU_SUSPEND too.

I will fix it with V2 patch.

Regards.
Keita Kobayashi
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" 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/drivers/cpuidle/Kconfig.arm b/drivers/cpuidle/Kconfig.arm
index 21340e0..ea9d61e 100644
--- a/drivers/cpuidle/Kconfig.arm
+++ b/drivers/cpuidle/Kconfig.arm
@@ -74,3 +74,11 @@  config ARM_MVEBU_V7_CPUIDLE
 	depends on ARCH_MVEBU && !ARM64
 	help
 	  Select this to enable cpuidle on Armada 370, 38x and XP processors.
+
+config ARM_RCAR_CPUIDLE
+	bool "CPU Idle Driver for the R-Car SoCs"
+	depends on ARCH_RCAR_GEN2
+	select ARM_CPUIDLE
+	select ARM_CPU_SUSPEND
+	help
+	  Select this to enable cpuidle for R-Car SoCs