* [RFC/PATCH 0/4] Add cpuidle support for r8a7791
@ 2015-04-06 3:50 ` Keita Kobayashi
0 siblings, 0 replies; 18+ messages in thread
From: Keita Kobayashi @ 2015-04-06 3:50 UTC (permalink / raw)
To: horms, rjw, daniel.lezcano
Cc: linux-sh, linux-pm, magnus.damm, Keita Kobayashi
Hello
These patches add cpuidle support for Renesas r8a7791 SoC.
The r8a7791 cpuidle supports WFI and the cpu power state(Core-Standby)
using Generic ARM CPU idle driver(cpuidle-arm).
Based on : next-20150402
Tested on : koelsch board
Keita Kobayashi (4):
ARM: cpuidle: Add cpuidle support for R-Car Gen2 series
ARM: shmobile: Add cpuidle_ops for R-Car cpuidle
ARM: shmobile: dtsi: Add cpuidle parameters into each cpu for r8a7791
ARM: shmobile: Enable Renesas R-Car cpuidle for shmobile_defconfig
arch/arm/boot/dts/r8a7791.dtsi | 13 +++++++++++++
arch/arm/configs/shmobile_defconfig | 2 ++
arch/arm/mach-shmobile/platsmp-apmu.c | 11 +++++++++--
arch/arm/mach-shmobile/platsmp-apmu.h | 1 +
arch/arm/mach-shmobile/pm-rcar-gen2.c | 17 +++++++++++++++++
drivers/cpuidle/Kconfig.arm | 8 ++++++++
6 files changed, 50 insertions(+), 2 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* [RFC/PATCH 0/4] Add cpuidle support for r8a7791
@ 2015-04-06 3:50 ` Keita Kobayashi
0 siblings, 0 replies; 18+ messages in thread
From: Keita Kobayashi @ 2015-04-06 3:50 UTC (permalink / raw)
To: horms, rjw, daniel.lezcano
Cc: linux-sh, linux-pm, magnus.damm, Keita Kobayashi
Hello
These patches add cpuidle support for Renesas r8a7791 SoC.
The r8a7791 cpuidle supports WFI and the cpu power state(Core-Standby)
using Generic ARM CPU idle driver(cpuidle-arm).
Based on : next-20150402
Tested on : koelsch board
Keita Kobayashi (4):
ARM: cpuidle: Add cpuidle support for R-Car Gen2 series
ARM: shmobile: Add cpuidle_ops for R-Car cpuidle
ARM: shmobile: dtsi: Add cpuidle parameters into each cpu for r8a7791
ARM: shmobile: Enable Renesas R-Car cpuidle for shmobile_defconfig
arch/arm/boot/dts/r8a7791.dtsi | 13 +++++++++++++
arch/arm/configs/shmobile_defconfig | 2 ++
arch/arm/mach-shmobile/platsmp-apmu.c | 11 +++++++++--
arch/arm/mach-shmobile/platsmp-apmu.h | 1 +
arch/arm/mach-shmobile/pm-rcar-gen2.c | 17 +++++++++++++++++
drivers/cpuidle/Kconfig.arm | 8 ++++++++
6 files changed, 50 insertions(+), 2 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* [RFC/PATCH 1/4] ARM: cpuidle: Add cpuidle support for R-Car Gen2 series
2015-04-06 3:50 ` Keita Kobayashi
@ 2015-04-06 3:50 ` Keita Kobayashi
-1 siblings, 0 replies; 18+ messages in thread
From: Keita Kobayashi @ 2015-04-06 3:50 UTC (permalink / raw)
To: horms, rjw, daniel.lezcano
Cc: linux-sh, linux-pm, magnus.damm, Keita Kobayashi
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
--
1.9.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [RFC/PATCH 1/4] ARM: cpuidle: Add cpuidle support for R-Car Gen2 series
@ 2015-04-06 3:50 ` Keita Kobayashi
0 siblings, 0 replies; 18+ messages in thread
From: Keita Kobayashi @ 2015-04-06 3:50 UTC (permalink / raw)
To: horms, rjw, daniel.lezcano
Cc: linux-sh, linux-pm, magnus.damm, Keita Kobayashi
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
--
1.9.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [RFC/PATCH 2/4] ARM: shmobile: Add cpuidle_ops for R-Car cpuidle
2015-04-06 3:50 ` Keita Kobayashi
@ 2015-04-06 3:50 ` Keita Kobayashi
-1 siblings, 0 replies; 18+ messages in thread
From: Keita Kobayashi @ 2015-04-06 3:50 UTC (permalink / raw)
To: linux-sh
This patch add Core-Standby support for R-Car cpuidle.
Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
---
arch/arm/mach-shmobile/platsmp-apmu.c | 11 +++++++++--
arch/arm/mach-shmobile/platsmp-apmu.h | 1 +
arch/arm/mach-shmobile/pm-rcar-gen2.c | 17 +++++++++++++++++
3 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c
index f483b56..c8de95d 100644
--- a/arch/arm/mach-shmobile/platsmp-apmu.c
+++ b/arch/arm/mach-shmobile/platsmp-apmu.c
@@ -215,7 +215,7 @@ int shmobile_smp_apmu_cpu_kill(unsigned int cpu)
}
#endif
-#if defined(CONFIG_SUSPEND)
+#if defined(CONFIG_SUSPEND) || defined(CONFIG_ARM_RCAR_CPUIDLE)
static int shmobile_smp_apmu_do_suspend(unsigned long cpu)
{
shmobile_smp_hook(cpu, virt_to_phys(cpu_resume), 0);
@@ -224,10 +224,17 @@ static int shmobile_smp_apmu_do_suspend(unsigned long cpu)
return 1;
}
-static int shmobile_smp_apmu_enter_suspend(suspend_state_t state)
+void shmobile_smp_apmu_enter_corestandby(void)
{
cpu_suspend(smp_processor_id(), shmobile_smp_apmu_do_suspend);
cpu_leave_lowpower();
+}
+#endif
+
+#if defined(CONFIG_SUSPEND)
+static int shmobile_smp_apmu_enter_suspend(suspend_state_t state)
+{
+ shmobile_smp_apmu_enter_corestandby();
return 0;
}
diff --git a/arch/arm/mach-shmobile/platsmp-apmu.h b/arch/arm/mach-shmobile/platsmp-apmu.h
index 76512c9..c7dc00a 100644
--- a/arch/arm/mach-shmobile/platsmp-apmu.h
+++ b/arch/arm/mach-shmobile/platsmp-apmu.h
@@ -28,5 +28,6 @@ extern int shmobile_smp_apmu_boot_secondary(unsigned int cpu,
struct task_struct *idle);
extern void shmobile_smp_apmu_cpu_die(unsigned int cpu);
extern int shmobile_smp_apmu_cpu_kill(unsigned int cpu);
+extern void shmobile_smp_apmu_enter_corestandby(void);
#endif /* PLATSMP_APMU_H */
diff --git a/arch/arm/mach-shmobile/pm-rcar-gen2.c b/arch/arm/mach-shmobile/pm-rcar-gen2.c
index 6815781..846b8ae 100644
--- a/arch/arm/mach-shmobile/pm-rcar-gen2.c
+++ b/arch/arm/mach-shmobile/pm-rcar-gen2.c
@@ -10,11 +10,15 @@
* for more details.
*/
+#include <linux/cpuidle.h>
+#include <linux/ioport.h>
#include <linux/kernel.h>
#include <linux/of.h>
#include <linux/smp.h>
+#include <asm/cpuidle.h>
#include <asm/io.h>
#include "common.h"
+#include "platsmp-apmu.h"
#include "pm-rcar.h"
#include "rcar-gen2.h"
@@ -113,3 +117,16 @@ void __init rcar_gen2_pm_init(void)
rcar_gen2_sysc_init(syscier);
shmobile_smp_apmu_suspend_init();
}
+
+#if defined(CONFIG_ARM_RCAR_CPUIDLE)
+static int rcar_cpuidle_enter(int cpu, unsigned long index)
+{
+ shmobile_smp_apmu_enter_corestandby();
+ return 0;
+}
+
+struct cpuidle_ops rcar_cpuidle_ops __initdata = {
+ .suspend = rcar_cpuidle_enter,
+};
+CPUIDLE_METHOD_OF_DECLARE(rcar, "renesas,rcar-idle", &rcar_cpuidle_ops);
+#endif
--
1.9.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [RFC/PATCH 2/4] ARM: shmobile: Add cpuidle_ops for R-Car cpuidle
@ 2015-04-06 3:50 ` Keita Kobayashi
0 siblings, 0 replies; 18+ messages in thread
From: Keita Kobayashi @ 2015-04-06 3:50 UTC (permalink / raw)
To: horms, rjw, daniel.lezcano
Cc: linux-sh, linux-pm, magnus.damm, Keita Kobayashi
This patch add Core-Standby support for R-Car cpuidle.
Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
---
arch/arm/mach-shmobile/platsmp-apmu.c | 11 +++++++++--
arch/arm/mach-shmobile/platsmp-apmu.h | 1 +
arch/arm/mach-shmobile/pm-rcar-gen2.c | 17 +++++++++++++++++
3 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c
index f483b56..c8de95d 100644
--- a/arch/arm/mach-shmobile/platsmp-apmu.c
+++ b/arch/arm/mach-shmobile/platsmp-apmu.c
@@ -215,7 +215,7 @@ int shmobile_smp_apmu_cpu_kill(unsigned int cpu)
}
#endif
-#if defined(CONFIG_SUSPEND)
+#if defined(CONFIG_SUSPEND) || defined(CONFIG_ARM_RCAR_CPUIDLE)
static int shmobile_smp_apmu_do_suspend(unsigned long cpu)
{
shmobile_smp_hook(cpu, virt_to_phys(cpu_resume), 0);
@@ -224,10 +224,17 @@ static int shmobile_smp_apmu_do_suspend(unsigned long cpu)
return 1;
}
-static int shmobile_smp_apmu_enter_suspend(suspend_state_t state)
+void shmobile_smp_apmu_enter_corestandby(void)
{
cpu_suspend(smp_processor_id(), shmobile_smp_apmu_do_suspend);
cpu_leave_lowpower();
+}
+#endif
+
+#if defined(CONFIG_SUSPEND)
+static int shmobile_smp_apmu_enter_suspend(suspend_state_t state)
+{
+ shmobile_smp_apmu_enter_corestandby();
return 0;
}
diff --git a/arch/arm/mach-shmobile/platsmp-apmu.h b/arch/arm/mach-shmobile/platsmp-apmu.h
index 76512c9..c7dc00a 100644
--- a/arch/arm/mach-shmobile/platsmp-apmu.h
+++ b/arch/arm/mach-shmobile/platsmp-apmu.h
@@ -28,5 +28,6 @@ extern int shmobile_smp_apmu_boot_secondary(unsigned int cpu,
struct task_struct *idle);
extern void shmobile_smp_apmu_cpu_die(unsigned int cpu);
extern int shmobile_smp_apmu_cpu_kill(unsigned int cpu);
+extern void shmobile_smp_apmu_enter_corestandby(void);
#endif /* PLATSMP_APMU_H */
diff --git a/arch/arm/mach-shmobile/pm-rcar-gen2.c b/arch/arm/mach-shmobile/pm-rcar-gen2.c
index 6815781..846b8ae 100644
--- a/arch/arm/mach-shmobile/pm-rcar-gen2.c
+++ b/arch/arm/mach-shmobile/pm-rcar-gen2.c
@@ -10,11 +10,15 @@
* for more details.
*/
+#include <linux/cpuidle.h>
+#include <linux/ioport.h>
#include <linux/kernel.h>
#include <linux/of.h>
#include <linux/smp.h>
+#include <asm/cpuidle.h>
#include <asm/io.h>
#include "common.h"
+#include "platsmp-apmu.h"
#include "pm-rcar.h"
#include "rcar-gen2.h"
@@ -113,3 +117,16 @@ void __init rcar_gen2_pm_init(void)
rcar_gen2_sysc_init(syscier);
shmobile_smp_apmu_suspend_init();
}
+
+#if defined(CONFIG_ARM_RCAR_CPUIDLE)
+static int rcar_cpuidle_enter(int cpu, unsigned long index)
+{
+ shmobile_smp_apmu_enter_corestandby();
+ return 0;
+}
+
+struct cpuidle_ops rcar_cpuidle_ops __initdata = {
+ .suspend = rcar_cpuidle_enter,
+};
+CPUIDLE_METHOD_OF_DECLARE(rcar, "renesas,rcar-idle", &rcar_cpuidle_ops);
+#endif
--
1.9.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [RFC/PATCH 3/4] ARM: shmobile: dtsi: Add cpuidle parameters into each cpu for r8a7791
2015-04-06 3:50 ` Keita Kobayashi
@ 2015-04-06 3:50 ` Keita Kobayashi
-1 siblings, 0 replies; 18+ messages in thread
From: Keita Kobayashi @ 2015-04-06 3:50 UTC (permalink / raw)
To: horms, rjw, daniel.lezcano
Cc: linux-sh, linux-pm, magnus.damm, Keita Kobayashi
This patch add enable-method node and idle-states node for r8a7791.
Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
---
arch/arm/boot/dts/r8a7791.dtsi | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index 4696062..fd17866 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -46,11 +46,13 @@
cpu0: cpu@0 {
device_type = "cpu";
compatible = "arm,cortex-a15";
+ enable-method = "renesas,rcar-idle";
reg = <0>;
clock-frequency = <1500000000>;
voltage-tolerance = <1>; /* 1% */
clocks = <&cpg_clocks R8A7791_CLK_Z>;
clock-latency = <300000>; /* 300 us */
+ cpu-idle-states = <&CORE_STANDBY>;
/* kHz - uV - OPPs unknown yet */
operating-points = <1500000 1000000>,
@@ -64,8 +66,19 @@
cpu1: cpu@1 {
device_type = "cpu";
compatible = "arm,cortex-a15";
+ enable-method = "renesas,rcar-idle";
reg = <1>;
clock-frequency = <1500000000>;
+ cpu-idle-states = <&CORE_STANDBY>;
+ };
+
+ idle-states {
+ CORE_STANDBY: CoreStandby {
+ compatible = "arm,idle-state";
+ entry-latency-us = <500>;
+ exit-latency-us = <2300>;
+ min-residency-us = <2800>;
+ };
};
};
--
1.9.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [RFC/PATCH 3/4] ARM: shmobile: dtsi: Add cpuidle parameters into each cpu for r8a7791
@ 2015-04-06 3:50 ` Keita Kobayashi
0 siblings, 0 replies; 18+ messages in thread
From: Keita Kobayashi @ 2015-04-06 3:50 UTC (permalink / raw)
To: horms, rjw, daniel.lezcano
Cc: linux-sh, linux-pm, magnus.damm, Keita Kobayashi
This patch add enable-method node and idle-states node for r8a7791.
Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
---
arch/arm/boot/dts/r8a7791.dtsi | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index 4696062..fd17866 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -46,11 +46,13 @@
cpu0: cpu@0 {
device_type = "cpu";
compatible = "arm,cortex-a15";
+ enable-method = "renesas,rcar-idle";
reg = <0>;
clock-frequency = <1500000000>;
voltage-tolerance = <1>; /* 1% */
clocks = <&cpg_clocks R8A7791_CLK_Z>;
clock-latency = <300000>; /* 300 us */
+ cpu-idle-states = <&CORE_STANDBY>;
/* kHz - uV - OPPs unknown yet */
operating-points = <1500000 1000000>,
@@ -64,8 +66,19 @@
cpu1: cpu@1 {
device_type = "cpu";
compatible = "arm,cortex-a15";
+ enable-method = "renesas,rcar-idle";
reg = <1>;
clock-frequency = <1500000000>;
+ cpu-idle-states = <&CORE_STANDBY>;
+ };
+
+ idle-states {
+ CORE_STANDBY: CoreStandby {
+ compatible = "arm,idle-state";
+ entry-latency-us = <500>;
+ exit-latency-us = <2300>;
+ min-residency-us = <2800>;
+ };
};
};
--
1.9.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [RFC/PATCH 4/4] ARM: shmobile: Enable Renesas R-Car cpuidle for shmobile_defconfig
2015-04-06 3:50 ` Keita Kobayashi
@ 2015-04-06 3:50 ` Keita Kobayashi
-1 siblings, 0 replies; 18+ messages in thread
From: Keita Kobayashi @ 2015-04-06 3:50 UTC (permalink / raw)
To: horms, rjw, daniel.lezcano
Cc: linux-sh, linux-pm, magnus.damm, Keita Kobayashi
Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
---
arch/arm/configs/shmobile_defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
index b58618e..e487045 100644
--- a/arch/arm/configs/shmobile_defconfig
+++ b/arch/arm/configs/shmobile_defconfig
@@ -44,6 +44,8 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPUFREQ_DT=y
+CONFIG_CPU_IDLE=y
+CONFIG_ARM_RCAR_CPUIDLE=y
CONFIG_VFP=y
CONFIG_NEON=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
--
1.9.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [RFC/PATCH 4/4] ARM: shmobile: Enable Renesas R-Car cpuidle for shmobile_defconfig
@ 2015-04-06 3:50 ` Keita Kobayashi
0 siblings, 0 replies; 18+ messages in thread
From: Keita Kobayashi @ 2015-04-06 3:50 UTC (permalink / raw)
To: horms, rjw, daniel.lezcano
Cc: linux-sh, linux-pm, magnus.damm, Keita Kobayashi
Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
---
arch/arm/configs/shmobile_defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
index b58618e..e487045 100644
--- a/arch/arm/configs/shmobile_defconfig
+++ b/arch/arm/configs/shmobile_defconfig
@@ -44,6 +44,8 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPUFREQ_DT=y
+CONFIG_CPU_IDLE=y
+CONFIG_ARM_RCAR_CPUIDLE=y
CONFIG_VFP=y
CONFIG_NEON=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
--
1.9.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [RFC/PATCH 1/4] ARM: cpuidle: Add cpuidle support for R-Car Gen2 series
2015-04-06 3:50 ` Keita Kobayashi
@ 2015-04-07 1:44 ` Simon Horman
-1 siblings, 0 replies; 18+ messages in thread
From: Simon Horman @ 2015-04-07 1:44 UTC (permalink / raw)
To: Keita Kobayashi; +Cc: rjw, daniel.lezcano, linux-sh, linux-pm, magnus.damm
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.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFC/PATCH 1/4] ARM: cpuidle: Add cpuidle support for R-Car Gen2 series
@ 2015-04-07 1:44 ` Simon Horman
0 siblings, 0 replies; 18+ messages in thread
From: Simon Horman @ 2015-04-07 1:44 UTC (permalink / raw)
To: Keita Kobayashi; +Cc: rjw, daniel.lezcano, linux-sh, linux-pm, magnus.damm
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.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFC/PATCH 2/4] ARM: shmobile: Add cpuidle_ops for R-Car cpuidle
2015-04-06 3:50 ` Keita Kobayashi
@ 2015-04-07 1:50 ` Simon Horman
-1 siblings, 0 replies; 18+ messages in thread
From: Simon Horman @ 2015-04-07 1:50 UTC (permalink / raw)
To: linux-sh
On Mon, Apr 06, 2015 at 12:50:42PM +0900, Keita Kobayashi wrote:
> This patch add Core-Standby support for R-Car cpuidle.
>
> Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
[snip]
> diff --git a/arch/arm/mach-shmobile/pm-rcar-gen2.c b/arch/arm/mach-shmobile/pm-rcar-gen2.c
> index 6815781..846b8ae 100644
[snip]
> +struct cpuidle_ops rcar_cpuidle_ops __initdata = {
> + .suspend = rcar_cpuidle_enter,
> +};
> +CPUIDLE_METHOD_OF_DECLARE(rcar, "renesas,rcar-idle", &rcar_cpuidle_ops);
> +#endif
It seems to me that that renesas,rcar-idle should be documented
as an enable-method in Documentation/devicetree/bindings/arm/cpus.txt.
That change could be a separate patch for device tree.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFC/PATCH 2/4] ARM: shmobile: Add cpuidle_ops for R-Car cpuidle
@ 2015-04-07 1:50 ` Simon Horman
0 siblings, 0 replies; 18+ messages in thread
From: Simon Horman @ 2015-04-07 1:50 UTC (permalink / raw)
To: Keita Kobayashi; +Cc: rjw, daniel.lezcano, linux-sh, linux-pm, magnus.damm
On Mon, Apr 06, 2015 at 12:50:42PM +0900, Keita Kobayashi wrote:
> This patch add Core-Standby support for R-Car cpuidle.
>
> Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
[snip]
> diff --git a/arch/arm/mach-shmobile/pm-rcar-gen2.c b/arch/arm/mach-shmobile/pm-rcar-gen2.c
> index 6815781..846b8ae 100644
[snip]
> +struct cpuidle_ops rcar_cpuidle_ops __initdata = {
> + .suspend = rcar_cpuidle_enter,
> +};
> +CPUIDLE_METHOD_OF_DECLARE(rcar, "renesas,rcar-idle", &rcar_cpuidle_ops);
> +#endif
It seems to me that that renesas,rcar-idle should be documented
as an enable-method in Documentation/devicetree/bindings/arm/cpus.txt.
That change could be a separate patch for device tree.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFC/PATCH 1/4] ARM: cpuidle: Add cpuidle support for R-Car Gen2 series
2015-04-07 1:44 ` Simon Horman
@ 2015-04-07 5:48 ` keita kobayashi
-1 siblings, 0 replies; 18+ messages in thread
From: keita kobayashi @ 2015-04-07 5:48 UTC (permalink / raw)
To: Simon Horman; +Cc: rjw, daniel.lezcano, linux-sh, linux-pm, magnus.damm
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
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFC/PATCH 1/4] ARM: cpuidle: Add cpuidle support for R-Car Gen2 series
@ 2015-04-07 5:48 ` keita kobayashi
0 siblings, 0 replies; 18+ messages in thread
From: keita kobayashi @ 2015-04-07 5:48 UTC (permalink / raw)
To: Simon Horman; +Cc: rjw, daniel.lezcano, linux-sh, linux-pm, magnus.damm
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
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFC/PATCH 2/4] ARM: shmobile: Add cpuidle_ops for R-Car cpuidle
2015-04-07 1:50 ` Simon Horman
@ 2015-04-07 5:56 ` keita kobayashi
-1 siblings, 0 replies; 18+ messages in thread
From: keita kobayashi @ 2015-04-07 5:56 UTC (permalink / raw)
To: linux-sh
Hi Simon
Thank you for your feedback.
(2015/04/07 10:50), Simon Horman wrote:
> On Mon, Apr 06, 2015 at 12:50:42PM +0900, Keita Kobayashi wrote:
>> This patch add Core-Standby support for R-Car cpuidle.
>>
>> Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
>
> [snip]
>
>> diff --git a/arch/arm/mach-shmobile/pm-rcar-gen2.c b/arch/arm/mach-shmobile/pm-rcar-gen2.c
>> index 6815781..846b8ae 100644
>
> [snip]
>
>> +struct cpuidle_ops rcar_cpuidle_ops __initdata = {
>> + .suspend = rcar_cpuidle_enter,
>> +};
>> +CPUIDLE_METHOD_OF_DECLARE(rcar, "renesas,rcar-idle", &rcar_cpuidle_ops);
>> +#endif
>
> It seems to me that that renesas,rcar-idle should be documented
> as an enable-method in Documentation/devicetree/bindings/arm/cpus.txt.
>
> That change could be a separate patch for device tree.
I understand. I will document it.
Regards.
Keita Kobayashi
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [RFC/PATCH 2/4] ARM: shmobile: Add cpuidle_ops for R-Car cpuidle
@ 2015-04-07 5:56 ` keita kobayashi
0 siblings, 0 replies; 18+ messages in thread
From: keita kobayashi @ 2015-04-07 5:56 UTC (permalink / raw)
To: Simon Horman; +Cc: rjw, daniel.lezcano, linux-sh, linux-pm, magnus.damm
Hi Simon
Thank you for your feedback.
(2015/04/07 10:50), Simon Horman wrote:
> On Mon, Apr 06, 2015 at 12:50:42PM +0900, Keita Kobayashi wrote:
>> This patch add Core-Standby support for R-Car cpuidle.
>>
>> Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
>
> [snip]
>
>> diff --git a/arch/arm/mach-shmobile/pm-rcar-gen2.c b/arch/arm/mach-shmobile/pm-rcar-gen2.c
>> index 6815781..846b8ae 100644
>
> [snip]
>
>> +struct cpuidle_ops rcar_cpuidle_ops __initdata = {
>> + .suspend = rcar_cpuidle_enter,
>> +};
>> +CPUIDLE_METHOD_OF_DECLARE(rcar, "renesas,rcar-idle", &rcar_cpuidle_ops);
>> +#endif
>
> It seems to me that that renesas,rcar-idle should be documented
> as an enable-method in Documentation/devicetree/bindings/arm/cpus.txt.
>
> That change could be a separate patch for device tree.
I understand. I will document it.
Regards.
Keita Kobayashi
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2015-04-07 5:56 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-06 3:50 [RFC/PATCH 0/4] Add cpuidle support for r8a7791 Keita Kobayashi
2015-04-06 3:50 ` Keita Kobayashi
2015-04-06 3:50 ` [RFC/PATCH 1/4] ARM: cpuidle: Add cpuidle support for R-Car Gen2 series Keita Kobayashi
2015-04-06 3:50 ` Keita Kobayashi
2015-04-07 1:44 ` Simon Horman
2015-04-07 1:44 ` Simon Horman
2015-04-07 5:48 ` keita kobayashi
2015-04-07 5:48 ` keita kobayashi
2015-04-06 3:50 ` [RFC/PATCH 3/4] ARM: shmobile: dtsi: Add cpuidle parameters into each cpu for r8a7791 Keita Kobayashi
2015-04-06 3:50 ` Keita Kobayashi
2015-04-06 3:50 ` [RFC/PATCH 4/4] ARM: shmobile: Enable Renesas R-Car cpuidle for shmobile_defconfig Keita Kobayashi
2015-04-06 3:50 ` Keita Kobayashi
2015-04-06 3:50 [RFC/PATCH 2/4] ARM: shmobile: Add cpuidle_ops for R-Car cpuidle Keita Kobayashi
2015-04-06 3:50 ` Keita Kobayashi
2015-04-07 1:50 ` Simon Horman
2015-04-07 1:50 ` Simon Horman
2015-04-07 5:56 ` keita kobayashi
2015-04-07 5:56 ` keita kobayashi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.