* [RFC/PATCH 0/6] Add CPUIdle support for Renesas SoCs
@ 2015-03-04 4:55 ` Keita Kobayashi
0 siblings, 0 replies; 34+ messages in thread
From: Keita Kobayashi @ 2015-03-04 4:55 UTC (permalink / raw)
To: horms, rjw; +Cc: linux-sh, linux-pm, magnus.damm, Keita Kobayashi
Hello
These patches add CPUIdle support for Renesas SoCs.
These patches have been tested on Renesas Gen2 series with
following cases on renesas-devel-20150301-v4.0-rc1 tag.
[Test case]
a. Lager board(CA15 * 4)
b. Lager board(CA7 * 4)
c. Lager board(CA15 * 4 + CA7 *4)
d. Koelsch board(CA15 * 2)
These cases work fine.
Keita Kobayashi (6):
cpuidle: renesas: Add CPUIdle Driver for Renesas SoCs
ARM: shmobile: Change CPUIdle InterFace
ARM: shmobile: APMU: Add Core-Standby function for CPUIdle
ARM: shmobile: r8a7791: Add Core-Standby CPUIdle support for r8a7791
ARM: shmobile: r8a7790: Add Core-Standby CPUIdle support for r8a7790
ARM: shmobile: Enable Renesas CPUIdle for shmobile_defconfig
arch/arm/configs/shmobile_defconfig | 2 +
arch/arm/mach-shmobile/common.h | 8 +-
arch/arm/mach-shmobile/cpuidle.c | 31 ++++---
arch/arm/mach-shmobile/platsmp-apmu.c | 20 ++++-
arch/arm/mach-shmobile/pm-r8a7790.c | 55 ++++++++++++
arch/arm/mach-shmobile/pm-r8a7791.c | 41 +++++++++
drivers/cpuidle/Kconfig.arm | 8 ++
drivers/cpuidle/Makefile | 1 +
drivers/cpuidle/cpuidle-renesas.c | 118 ++++++++++++++++++++++++++
include/linux/platform_data/renesas-cpuidle.h | 24 ++++++
10 files changed, 294 insertions(+), 14 deletions(-)
create mode 100644 drivers/cpuidle/cpuidle-renesas.c
create mode 100644 include/linux/platform_data/renesas-cpuidle.h
--
1.9.1
^ permalink raw reply [flat|nested] 34+ messages in thread
* [RFC/PATCH 0/6] Add CPUIdle support for Renesas SoCs
@ 2015-03-04 4:55 ` Keita Kobayashi
0 siblings, 0 replies; 34+ messages in thread
From: Keita Kobayashi @ 2015-03-04 4:55 UTC (permalink / raw)
To: horms, rjw; +Cc: linux-sh, linux-pm, magnus.damm, Keita Kobayashi
Hello
These patches add CPUIdle support for Renesas SoCs.
These patches have been tested on Renesas Gen2 series with
following cases on renesas-devel-20150301-v4.0-rc1 tag.
[Test case]
a. Lager board(CA15 * 4)
b. Lager board(CA7 * 4)
c. Lager board(CA15 * 4 + CA7 *4)
d. Koelsch board(CA15 * 2)
These cases work fine.
Keita Kobayashi (6):
cpuidle: renesas: Add CPUIdle Driver for Renesas SoCs
ARM: shmobile: Change CPUIdle InterFace
ARM: shmobile: APMU: Add Core-Standby function for CPUIdle
ARM: shmobile: r8a7791: Add Core-Standby CPUIdle support for r8a7791
ARM: shmobile: r8a7790: Add Core-Standby CPUIdle support for r8a7790
ARM: shmobile: Enable Renesas CPUIdle for shmobile_defconfig
arch/arm/configs/shmobile_defconfig | 2 +
arch/arm/mach-shmobile/common.h | 8 +-
arch/arm/mach-shmobile/cpuidle.c | 31 ++++---
arch/arm/mach-shmobile/platsmp-apmu.c | 20 ++++-
arch/arm/mach-shmobile/pm-r8a7790.c | 55 ++++++++++++
arch/arm/mach-shmobile/pm-r8a7791.c | 41 +++++++++
drivers/cpuidle/Kconfig.arm | 8 ++
drivers/cpuidle/Makefile | 1 +
drivers/cpuidle/cpuidle-renesas.c | 118 ++++++++++++++++++++++++++
include/linux/platform_data/renesas-cpuidle.h | 24 ++++++
10 files changed, 294 insertions(+), 14 deletions(-)
create mode 100644 drivers/cpuidle/cpuidle-renesas.c
create mode 100644 include/linux/platform_data/renesas-cpuidle.h
--
1.9.1
^ permalink raw reply [flat|nested] 34+ messages in thread
* [RFC/PATCH 1/6] cpuidle: renesas: Add CPUIdle Driver for Renesas SoCs
2015-03-04 4:55 ` Keita Kobayashi
@ 2015-03-04 4:55 ` Keita Kobayashi
-1 siblings, 0 replies; 34+ messages in thread
From: Keita Kobayashi @ 2015-03-04 4:55 UTC (permalink / raw)
To: horms, rjw; +Cc: linux-sh, linux-pm, magnus.damm, Keita Kobayashi
This patch adds a cpuidle driver for Renesas SoCs.
Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
---
drivers/cpuidle/Kconfig.arm | 8 ++
drivers/cpuidle/Makefile | 1 +
drivers/cpuidle/cpuidle-renesas.c | 118 ++++++++++++++++++++++++++
include/linux/platform_data/renesas-cpuidle.h | 24 ++++++
4 files changed, 151 insertions(+)
create mode 100644 drivers/cpuidle/cpuidle-renesas.c
create mode 100644 include/linux/platform_data/renesas-cpuidle.h
diff --git a/drivers/cpuidle/Kconfig.arm b/drivers/cpuidle/Kconfig.arm
index 8e07c94..01cb8cc 100644
--- a/drivers/cpuidle/Kconfig.arm
+++ b/drivers/cpuidle/Kconfig.arm
@@ -64,3 +64,11 @@ config ARM_MVEBU_V7_CPUIDLE
depends on ARCH_MVEBU
help
Select this to enable cpuidle on Armada 370, 38x and XP processors.
+
+config ARM_RENESAS_CPUIDLE
+ bool "CPU Idle Driver for the renesas SoCs"
+ depends on ARCH_SHMOBILE_MULTI
+ select ARM_CPU_SUSPEND
+ select CPU_IDLE_MULTIPLE_DRIVERS
+ help
+ Select this to enable cpuidle for renesas SoCs
diff --git a/drivers/cpuidle/Makefile b/drivers/cpuidle/Makefile
index 4d177b9..c718906 100644
--- a/drivers/cpuidle/Makefile
+++ b/drivers/cpuidle/Makefile
@@ -17,6 +17,7 @@ obj-$(CONFIG_ARM_ZYNQ_CPUIDLE) += cpuidle-zynq.o
obj-$(CONFIG_ARM_U8500_CPUIDLE) += cpuidle-ux500.o
obj-$(CONFIG_ARM_AT91_CPUIDLE) += cpuidle-at91.o
obj-$(CONFIG_ARM_EXYNOS_CPUIDLE) += cpuidle-exynos.o
+obj-$(CONFIG_ARM_RENESAS_CPUIDLE) += cpuidle-renesas.o
###############################################################################
# MIPS drivers
diff --git a/drivers/cpuidle/cpuidle-renesas.c b/drivers/cpuidle/cpuidle-renesas.c
new file mode 100644
index 0000000..b469e95
--- /dev/null
+++ b/drivers/cpuidle/cpuidle-renesas.c
@@ -0,0 +1,118 @@
+/*
+ * CPUIdle support code for Renesas ARM
+ *
+ * Copyright (C) 2014 Renesas Electronics Corporation
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#include <linux/cpuidle.h>
+#include <linux/device.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/slab.h>
+#include <linux/platform_data/renesas-cpuidle.h>
+#include <linux/platform_device.h>
+#include <linux/pm.h>
+#include <linux/suspend.h>
+#include <asm/cpuidle.h>
+#include <asm/proc-fns.h>
+#include <asm/smp_plat.h>
+
+static struct cpuidle_driver renesas_cpuidle_default_driver = {
+ .name = "renesas_default_cpuidle",
+ .owner = THIS_MODULE,
+ .states[0] = ARM_CPUIDLE_WFI_STATE,
+ .safe_state_index = 0, /* C1 */
+ .state_count = 1,
+};
+
+static struct renesas_cpuidle_driver default_driver = {
+ .target_cpu = -1, /* default */
+ .renesas_drv = &renesas_cpuidle_default_driver,
+};
+
+static struct renesas_cpuidle cpuidle_data = {
+ .num_drvs = 1,
+ .rcd = &default_driver,
+};
+
+static int __init renesas_idle_driver_init(struct device *dev,
+ struct renesas_cpuidle_driver *rcd)
+{
+ struct cpumask *cpumask = NULL;
+ int cpu;
+
+ for_each_online_cpu(cpu) {
+ if (smp_cpuid_part(cpu) = rcd->target_cpu ||
+ rcd->target_cpu = -1) { /* default */
+ if (!cpumask) {
+ cpumask = devm_kzalloc(dev,
+ cpumask_size(), GFP_KERNEL);
+ if (!cpumask)
+ return -ENOMEM;
+ }
+ cpumask_set_cpu(cpu, cpumask);
+ rcd->renesas_drv->cpumask = cpumask;
+ }
+ }
+
+ return 0;
+}
+
+static int renesas_cpuidle_probe(struct platform_device *pdev)
+{
+ struct renesas_cpuidle *pd = pdev->dev.platform_data;
+ struct renesas_cpuidle_driver *rcd;
+ int i, j, ret;
+
+ if (!pd->num_drvs || !pd->rcd)
+ pd = &cpuidle_data;
+
+ for (i = 0; i < pd->num_drvs; i++) {
+ rcd = pd->rcd + i;
+ ret = renesas_idle_driver_init(&pdev->dev, rcd);
+ if (ret)
+ goto out_uninit_driver;
+
+ if (!rcd->renesas_drv->cpumask)
+ continue;
+
+ ret = cpuidle_register(rcd->renesas_drv, NULL);
+ if (ret) {
+ dev_err(&pdev->dev,
+ "failed to register cpuidle driver\n");
+ goto out_uninit_driver;
+ }
+ }
+
+ return 0;
+
+out_uninit_driver:
+ for (j = 0; j < i; j++) {
+ rcd = pd->rcd + j;
+
+ if (!rcd->renesas_drv->cpumask)
+ continue;
+
+ cpuidle_unregister(rcd->renesas_drv);
+ }
+
+ return ret;
+}
+
+static struct platform_driver renesas_cpuidle_driver = {
+ .probe = renesas_cpuidle_probe,
+ .driver = {
+ .name = "cpuidle-renesas",
+ .owner = THIS_MODULE,
+ },
+};
+
+module_platform_driver(renesas_cpuidle_driver);
+
+MODULE_DESCRIPTION("Renesas cpuidle driver");
+MODULE_LICENSE("GPL v2");
diff --git a/include/linux/platform_data/renesas-cpuidle.h b/include/linux/platform_data/renesas-cpuidle.h
new file mode 100644
index 0000000..9446215
--- /dev/null
+++ b/include/linux/platform_data/renesas-cpuidle.h
@@ -0,0 +1,24 @@
+/*
+ * renesas-cpuidle.h -- CPUIdle support code for Renesas ARM
+ *
+ * Copyright (C) 2014 Renesas Electronics Corporation
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#ifndef __RENESAS_CPUIDLE_H__
+#define __RENESAS_CPUIDLE_H__
+
+struct renesas_cpuidle_driver {
+ unsigned int target_cpu;
+ struct cpuidle_driver *renesas_drv;
+};
+
+struct renesas_cpuidle {
+ unsigned int num_drvs;
+ struct renesas_cpuidle_driver *rcd;
+};
+
+#endif /* __RENESAS_CPUIDLE_H__ */
--
1.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [RFC/PATCH 1/6] cpuidle: renesas: Add CPUIdle Driver for Renesas SoCs
@ 2015-03-04 4:55 ` Keita Kobayashi
0 siblings, 0 replies; 34+ messages in thread
From: Keita Kobayashi @ 2015-03-04 4:55 UTC (permalink / raw)
To: horms, rjw; +Cc: linux-sh, linux-pm, magnus.damm, Keita Kobayashi
This patch adds a cpuidle driver for Renesas SoCs.
Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
---
drivers/cpuidle/Kconfig.arm | 8 ++
drivers/cpuidle/Makefile | 1 +
drivers/cpuidle/cpuidle-renesas.c | 118 ++++++++++++++++++++++++++
include/linux/platform_data/renesas-cpuidle.h | 24 ++++++
4 files changed, 151 insertions(+)
create mode 100644 drivers/cpuidle/cpuidle-renesas.c
create mode 100644 include/linux/platform_data/renesas-cpuidle.h
diff --git a/drivers/cpuidle/Kconfig.arm b/drivers/cpuidle/Kconfig.arm
index 8e07c94..01cb8cc 100644
--- a/drivers/cpuidle/Kconfig.arm
+++ b/drivers/cpuidle/Kconfig.arm
@@ -64,3 +64,11 @@ config ARM_MVEBU_V7_CPUIDLE
depends on ARCH_MVEBU
help
Select this to enable cpuidle on Armada 370, 38x and XP processors.
+
+config ARM_RENESAS_CPUIDLE
+ bool "CPU Idle Driver for the renesas SoCs"
+ depends on ARCH_SHMOBILE_MULTI
+ select ARM_CPU_SUSPEND
+ select CPU_IDLE_MULTIPLE_DRIVERS
+ help
+ Select this to enable cpuidle for renesas SoCs
diff --git a/drivers/cpuidle/Makefile b/drivers/cpuidle/Makefile
index 4d177b9..c718906 100644
--- a/drivers/cpuidle/Makefile
+++ b/drivers/cpuidle/Makefile
@@ -17,6 +17,7 @@ obj-$(CONFIG_ARM_ZYNQ_CPUIDLE) += cpuidle-zynq.o
obj-$(CONFIG_ARM_U8500_CPUIDLE) += cpuidle-ux500.o
obj-$(CONFIG_ARM_AT91_CPUIDLE) += cpuidle-at91.o
obj-$(CONFIG_ARM_EXYNOS_CPUIDLE) += cpuidle-exynos.o
+obj-$(CONFIG_ARM_RENESAS_CPUIDLE) += cpuidle-renesas.o
###############################################################################
# MIPS drivers
diff --git a/drivers/cpuidle/cpuidle-renesas.c b/drivers/cpuidle/cpuidle-renesas.c
new file mode 100644
index 0000000..b469e95
--- /dev/null
+++ b/drivers/cpuidle/cpuidle-renesas.c
@@ -0,0 +1,118 @@
+/*
+ * CPUIdle support code for Renesas ARM
+ *
+ * Copyright (C) 2014 Renesas Electronics Corporation
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#include <linux/cpuidle.h>
+#include <linux/device.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/slab.h>
+#include <linux/platform_data/renesas-cpuidle.h>
+#include <linux/platform_device.h>
+#include <linux/pm.h>
+#include <linux/suspend.h>
+#include <asm/cpuidle.h>
+#include <asm/proc-fns.h>
+#include <asm/smp_plat.h>
+
+static struct cpuidle_driver renesas_cpuidle_default_driver = {
+ .name = "renesas_default_cpuidle",
+ .owner = THIS_MODULE,
+ .states[0] = ARM_CPUIDLE_WFI_STATE,
+ .safe_state_index = 0, /* C1 */
+ .state_count = 1,
+};
+
+static struct renesas_cpuidle_driver default_driver = {
+ .target_cpu = -1, /* default */
+ .renesas_drv = &renesas_cpuidle_default_driver,
+};
+
+static struct renesas_cpuidle cpuidle_data = {
+ .num_drvs = 1,
+ .rcd = &default_driver,
+};
+
+static int __init renesas_idle_driver_init(struct device *dev,
+ struct renesas_cpuidle_driver *rcd)
+{
+ struct cpumask *cpumask = NULL;
+ int cpu;
+
+ for_each_online_cpu(cpu) {
+ if (smp_cpuid_part(cpu) == rcd->target_cpu ||
+ rcd->target_cpu == -1) { /* default */
+ if (!cpumask) {
+ cpumask = devm_kzalloc(dev,
+ cpumask_size(), GFP_KERNEL);
+ if (!cpumask)
+ return -ENOMEM;
+ }
+ cpumask_set_cpu(cpu, cpumask);
+ rcd->renesas_drv->cpumask = cpumask;
+ }
+ }
+
+ return 0;
+}
+
+static int renesas_cpuidle_probe(struct platform_device *pdev)
+{
+ struct renesas_cpuidle *pd = pdev->dev.platform_data;
+ struct renesas_cpuidle_driver *rcd;
+ int i, j, ret;
+
+ if (!pd->num_drvs || !pd->rcd)
+ pd = &cpuidle_data;
+
+ for (i = 0; i < pd->num_drvs; i++) {
+ rcd = pd->rcd + i;
+ ret = renesas_idle_driver_init(&pdev->dev, rcd);
+ if (ret)
+ goto out_uninit_driver;
+
+ if (!rcd->renesas_drv->cpumask)
+ continue;
+
+ ret = cpuidle_register(rcd->renesas_drv, NULL);
+ if (ret) {
+ dev_err(&pdev->dev,
+ "failed to register cpuidle driver\n");
+ goto out_uninit_driver;
+ }
+ }
+
+ return 0;
+
+out_uninit_driver:
+ for (j = 0; j < i; j++) {
+ rcd = pd->rcd + j;
+
+ if (!rcd->renesas_drv->cpumask)
+ continue;
+
+ cpuidle_unregister(rcd->renesas_drv);
+ }
+
+ return ret;
+}
+
+static struct platform_driver renesas_cpuidle_driver = {
+ .probe = renesas_cpuidle_probe,
+ .driver = {
+ .name = "cpuidle-renesas",
+ .owner = THIS_MODULE,
+ },
+};
+
+module_platform_driver(renesas_cpuidle_driver);
+
+MODULE_DESCRIPTION("Renesas cpuidle driver");
+MODULE_LICENSE("GPL v2");
diff --git a/include/linux/platform_data/renesas-cpuidle.h b/include/linux/platform_data/renesas-cpuidle.h
new file mode 100644
index 0000000..9446215
--- /dev/null
+++ b/include/linux/platform_data/renesas-cpuidle.h
@@ -0,0 +1,24 @@
+/*
+ * renesas-cpuidle.h -- CPUIdle support code for Renesas ARM
+ *
+ * Copyright (C) 2014 Renesas Electronics Corporation
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#ifndef __RENESAS_CPUIDLE_H__
+#define __RENESAS_CPUIDLE_H__
+
+struct renesas_cpuidle_driver {
+ unsigned int target_cpu;
+ struct cpuidle_driver *renesas_drv;
+};
+
+struct renesas_cpuidle {
+ unsigned int num_drvs;
+ struct renesas_cpuidle_driver *rcd;
+};
+
+#endif /* __RENESAS_CPUIDLE_H__ */
--
1.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [RFC/PATCH 2/6] ARM: shmobile: Change CPUIdle InterFace
2015-03-04 4:55 ` Keita Kobayashi
@ 2015-03-04 4:55 ` Keita Kobayashi
-1 siblings, 0 replies; 34+ messages in thread
From: Keita Kobayashi @ 2015-03-04 4:55 UTC (permalink / raw)
To: horms, rjw; +Cc: linux-sh, linux-pm, magnus.damm, Keita Kobayashi
This patch change the shmobile_cpuidle_init process
to use Renesas CPUIdle driver.
Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
---
arch/arm/mach-shmobile/common.h | 4 +++-
arch/arm/mach-shmobile/cpuidle.c | 31 ++++++++++++++++++++-----------
2 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/arch/arm/mach-shmobile/common.h b/arch/arm/mach-shmobile/common.h
index 8faf6e0..4adecd4 100644
--- a/arch/arm/mach-shmobile/common.h
+++ b/arch/arm/mach-shmobile/common.h
@@ -1,3 +1,5 @@
+#include <linux/platform_data/renesas-cpuidle.h>
+
#ifndef __ARCH_MACH_COMMON_H
#define __ARCH_MACH_COMMON_H
@@ -23,7 +25,6 @@ struct clk;
extern int shmobile_clk_init(void);
extern struct platform_suspend_ops shmobile_suspend_ops;
struct cpuidle_driver;
-extern void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv);
#ifdef CONFIG_SUSPEND
int shmobile_suspend_init(void);
@@ -35,6 +36,7 @@ static inline void shmobile_smp_apmu_suspend_init(void) { }
#ifdef CONFIG_CPU_IDLE
int shmobile_cpuidle_init(void);
+extern void shmobile_cpuidle_set_driver(struct renesas_cpuidle *drv);
#else
static inline int shmobile_cpuidle_init(void) { return 0; }
#endif
diff --git a/arch/arm/mach-shmobile/cpuidle.c b/arch/arm/mach-shmobile/cpuidle.c
index 0afeb5c..cb81ad6 100644
--- a/arch/arm/mach-shmobile/cpuidle.c
+++ b/arch/arm/mach-shmobile/cpuidle.c
@@ -13,25 +13,34 @@
#include <linux/suspend.h>
#include <linux/module.h>
#include <linux/err.h>
+#include <linux/device.h>
+#include <linux/platform_data/renesas-cpuidle.h>
+#include <linux/platform_device.h>
#include <asm/cpuidle.h>
#include <asm/io.h>
+#include "common.h"
-static struct cpuidle_driver shmobile_cpuidle_default_driver = {
- .name = "shmobile_cpuidle",
- .owner = THIS_MODULE,
- .states[0] = ARM_CPUIDLE_WFI_STATE,
- .safe_state_index = 0, /* C1 */
- .state_count = 1,
+/* default */
+static struct renesas_cpuidle cpuidle_data = {
+ .num_drvs = 0,
+ .rcd = NULL,
};
-static struct cpuidle_driver *cpuidle_drv = &shmobile_cpuidle_default_driver;
-
-void __init shmobile_cpuidle_set_driver(struct cpuidle_driver *drv)
+void __init shmobile_cpuidle_set_driver(struct renesas_cpuidle *pd)
{
- cpuidle_drv = drv;
+ cpuidle_data = *pd;
}
+static struct platform_device renesas_cpuidle = {
+ .name = "cpuidle-renesas",
+ .id = -1,
+ .dev = {
+ .platform_data = &cpuidle_data,
+ },
+};
+
int __init shmobile_cpuidle_init(void)
{
- return cpuidle_register(cpuidle_drv, NULL);
+ platform_device_register(&renesas_cpuidle);
+ return 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [RFC/PATCH 2/6] ARM: shmobile: Change CPUIdle InterFace
@ 2015-03-04 4:55 ` Keita Kobayashi
0 siblings, 0 replies; 34+ messages in thread
From: Keita Kobayashi @ 2015-03-04 4:55 UTC (permalink / raw)
To: horms, rjw; +Cc: linux-sh, linux-pm, magnus.damm, Keita Kobayashi
This patch change the shmobile_cpuidle_init process
to use Renesas CPUIdle driver.
Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
---
arch/arm/mach-shmobile/common.h | 4 +++-
arch/arm/mach-shmobile/cpuidle.c | 31 ++++++++++++++++++++-----------
2 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/arch/arm/mach-shmobile/common.h b/arch/arm/mach-shmobile/common.h
index 8faf6e0..4adecd4 100644
--- a/arch/arm/mach-shmobile/common.h
+++ b/arch/arm/mach-shmobile/common.h
@@ -1,3 +1,5 @@
+#include <linux/platform_data/renesas-cpuidle.h>
+
#ifndef __ARCH_MACH_COMMON_H
#define __ARCH_MACH_COMMON_H
@@ -23,7 +25,6 @@ struct clk;
extern int shmobile_clk_init(void);
extern struct platform_suspend_ops shmobile_suspend_ops;
struct cpuidle_driver;
-extern void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv);
#ifdef CONFIG_SUSPEND
int shmobile_suspend_init(void);
@@ -35,6 +36,7 @@ static inline void shmobile_smp_apmu_suspend_init(void) { }
#ifdef CONFIG_CPU_IDLE
int shmobile_cpuidle_init(void);
+extern void shmobile_cpuidle_set_driver(struct renesas_cpuidle *drv);
#else
static inline int shmobile_cpuidle_init(void) { return 0; }
#endif
diff --git a/arch/arm/mach-shmobile/cpuidle.c b/arch/arm/mach-shmobile/cpuidle.c
index 0afeb5c..cb81ad6 100644
--- a/arch/arm/mach-shmobile/cpuidle.c
+++ b/arch/arm/mach-shmobile/cpuidle.c
@@ -13,25 +13,34 @@
#include <linux/suspend.h>
#include <linux/module.h>
#include <linux/err.h>
+#include <linux/device.h>
+#include <linux/platform_data/renesas-cpuidle.h>
+#include <linux/platform_device.h>
#include <asm/cpuidle.h>
#include <asm/io.h>
+#include "common.h"
-static struct cpuidle_driver shmobile_cpuidle_default_driver = {
- .name = "shmobile_cpuidle",
- .owner = THIS_MODULE,
- .states[0] = ARM_CPUIDLE_WFI_STATE,
- .safe_state_index = 0, /* C1 */
- .state_count = 1,
+/* default */
+static struct renesas_cpuidle cpuidle_data = {
+ .num_drvs = 0,
+ .rcd = NULL,
};
-static struct cpuidle_driver *cpuidle_drv = &shmobile_cpuidle_default_driver;
-
-void __init shmobile_cpuidle_set_driver(struct cpuidle_driver *drv)
+void __init shmobile_cpuidle_set_driver(struct renesas_cpuidle *pd)
{
- cpuidle_drv = drv;
+ cpuidle_data = *pd;
}
+static struct platform_device renesas_cpuidle = {
+ .name = "cpuidle-renesas",
+ .id = -1,
+ .dev = {
+ .platform_data = &cpuidle_data,
+ },
+};
+
int __init shmobile_cpuidle_init(void)
{
- return cpuidle_register(cpuidle_drv, NULL);
+ platform_device_register(&renesas_cpuidle);
+ return 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [RFC/PATCH 3/6] ARM: shmobile: APMU: Add Core-Standby function for CPUIdle
2015-03-04 4:55 ` Keita Kobayashi
@ 2015-03-04 4:55 ` Keita Kobayashi
-1 siblings, 0 replies; 34+ messages in thread
From: Keita Kobayashi @ 2015-03-04 4:55 UTC (permalink / raw)
To: horms, rjw; +Cc: linux-sh, linux-pm, magnus.damm, Keita Kobayashi
This patch add CPUIdle process in platsmp-apmu code.
The shmobile_smp_apmu_enter_cpuidle function will be
used by R-Car SoC series.
Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
---
arch/arm/mach-shmobile/common.h | 4 ++++
arch/arm/mach-shmobile/platsmp-apmu.c | 20 ++++++++++++++++++--
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-shmobile/common.h b/arch/arm/mach-shmobile/common.h
index 4adecd4..ea34893 100644
--- a/arch/arm/mach-shmobile/common.h
+++ b/arch/arm/mach-shmobile/common.h
@@ -24,6 +24,7 @@ extern int shmobile_smp_scu_cpu_kill(unsigned int cpu);
struct clk;
extern int shmobile_clk_init(void);
extern struct platform_suspend_ops shmobile_suspend_ops;
+struct cpuidle_device;
struct cpuidle_driver;
#ifdef CONFIG_SUSPEND
@@ -37,6 +38,9 @@ static inline void shmobile_smp_apmu_suspend_init(void) { }
#ifdef CONFIG_CPU_IDLE
int shmobile_cpuidle_init(void);
extern void shmobile_cpuidle_set_driver(struct renesas_cpuidle *drv);
+extern int shmobile_smp_apmu_enter_cpuidle(struct cpuidle_device *dev,
+ struct cpuidle_driver *drv,
+ int index);
#else
static inline int shmobile_cpuidle_init(void) { return 0; }
#endif
diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c
index f483b56..f5c8044 100644
--- a/arch/arm/mach-shmobile/platsmp-apmu.c
+++ b/arch/arm/mach-shmobile/platsmp-apmu.c
@@ -139,7 +139,8 @@ int shmobile_smp_apmu_boot_secondary(unsigned int cpu, struct task_struct *idle)
}
#endif
-#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_SUSPEND)
+#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_SUSPEND) || \
+defined(CONFIG_ARM_RENESAS_CPUIDLE)
/* nicked from arch/arm/mach-exynos/hotplug.c */
static inline void cpu_enter_lowpower_a15(void)
{
@@ -215,7 +216,7 @@ int shmobile_smp_apmu_cpu_kill(unsigned int cpu)
}
#endif
-#if defined(CONFIG_SUSPEND)
+#if defined(CONFIG_SUSPEND) || defined(CONFIG_ARM_RENESAS_CPUIDLE)
static int shmobile_smp_apmu_do_suspend(unsigned long cpu)
{
shmobile_smp_hook(cpu, virt_to_phys(cpu_resume), 0);
@@ -223,7 +224,9 @@ static int shmobile_smp_apmu_do_suspend(unsigned long cpu)
cpu_do_idle(); /* WFI selects Core Standby */
return 1;
}
+#endif
+#if defined(CONFIG_SUSPEND)
static int shmobile_smp_apmu_enter_suspend(suspend_state_t state)
{
cpu_suspend(smp_processor_id(), shmobile_smp_apmu_do_suspend);
@@ -236,3 +239,16 @@ void __init shmobile_smp_apmu_suspend_init(void)
shmobile_suspend_ops.enter = shmobile_smp_apmu_enter_suspend;
}
#endif
+
+#if defined(CONFIG_ARM_RENESAS_CPUIDLE)
+int shmobile_smp_apmu_enter_cpuidle(struct cpuidle_device *dev,
+ struct cpuidle_driver *drv, int index)
+{
+ cpu_pm_enter();
+ cpu_suspend(smp_processor_id(), shmobile_smp_apmu_do_suspend);
+ cpu_leave_lowpower();
+ cpu_pm_exit();
+
+ return index;
+}
+#endif
--
1.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [RFC/PATCH 3/6] ARM: shmobile: APMU: Add Core-Standby function for CPUIdle
@ 2015-03-04 4:55 ` Keita Kobayashi
0 siblings, 0 replies; 34+ messages in thread
From: Keita Kobayashi @ 2015-03-04 4:55 UTC (permalink / raw)
To: horms, rjw; +Cc: linux-sh, linux-pm, magnus.damm, Keita Kobayashi
This patch add CPUIdle process in platsmp-apmu code.
The shmobile_smp_apmu_enter_cpuidle function will be
used by R-Car SoC series.
Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
---
arch/arm/mach-shmobile/common.h | 4 ++++
arch/arm/mach-shmobile/platsmp-apmu.c | 20 ++++++++++++++++++--
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-shmobile/common.h b/arch/arm/mach-shmobile/common.h
index 4adecd4..ea34893 100644
--- a/arch/arm/mach-shmobile/common.h
+++ b/arch/arm/mach-shmobile/common.h
@@ -24,6 +24,7 @@ extern int shmobile_smp_scu_cpu_kill(unsigned int cpu);
struct clk;
extern int shmobile_clk_init(void);
extern struct platform_suspend_ops shmobile_suspend_ops;
+struct cpuidle_device;
struct cpuidle_driver;
#ifdef CONFIG_SUSPEND
@@ -37,6 +38,9 @@ static inline void shmobile_smp_apmu_suspend_init(void) { }
#ifdef CONFIG_CPU_IDLE
int shmobile_cpuidle_init(void);
extern void shmobile_cpuidle_set_driver(struct renesas_cpuidle *drv);
+extern int shmobile_smp_apmu_enter_cpuidle(struct cpuidle_device *dev,
+ struct cpuidle_driver *drv,
+ int index);
#else
static inline int shmobile_cpuidle_init(void) { return 0; }
#endif
diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c
index f483b56..f5c8044 100644
--- a/arch/arm/mach-shmobile/platsmp-apmu.c
+++ b/arch/arm/mach-shmobile/platsmp-apmu.c
@@ -139,7 +139,8 @@ int shmobile_smp_apmu_boot_secondary(unsigned int cpu, struct task_struct *idle)
}
#endif
-#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_SUSPEND)
+#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_SUSPEND) || \
+defined(CONFIG_ARM_RENESAS_CPUIDLE)
/* nicked from arch/arm/mach-exynos/hotplug.c */
static inline void cpu_enter_lowpower_a15(void)
{
@@ -215,7 +216,7 @@ int shmobile_smp_apmu_cpu_kill(unsigned int cpu)
}
#endif
-#if defined(CONFIG_SUSPEND)
+#if defined(CONFIG_SUSPEND) || defined(CONFIG_ARM_RENESAS_CPUIDLE)
static int shmobile_smp_apmu_do_suspend(unsigned long cpu)
{
shmobile_smp_hook(cpu, virt_to_phys(cpu_resume), 0);
@@ -223,7 +224,9 @@ static int shmobile_smp_apmu_do_suspend(unsigned long cpu)
cpu_do_idle(); /* WFI selects Core Standby */
return 1;
}
+#endif
+#if defined(CONFIG_SUSPEND)
static int shmobile_smp_apmu_enter_suspend(suspend_state_t state)
{
cpu_suspend(smp_processor_id(), shmobile_smp_apmu_do_suspend);
@@ -236,3 +239,16 @@ void __init shmobile_smp_apmu_suspend_init(void)
shmobile_suspend_ops.enter = shmobile_smp_apmu_enter_suspend;
}
#endif
+
+#if defined(CONFIG_ARM_RENESAS_CPUIDLE)
+int shmobile_smp_apmu_enter_cpuidle(struct cpuidle_device *dev,
+ struct cpuidle_driver *drv, int index)
+{
+ cpu_pm_enter();
+ cpu_suspend(smp_processor_id(), shmobile_smp_apmu_do_suspend);
+ cpu_leave_lowpower();
+ cpu_pm_exit();
+
+ return index;
+}
+#endif
--
1.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [RFC/PATCH 4/6] ARM: shmobile: r8a7791: Add Core-Standby CPUIdle support for r8a7791
2015-03-04 4:55 ` Keita Kobayashi
@ 2015-03-04 4:55 ` Keita Kobayashi
-1 siblings, 0 replies; 34+ messages in thread
From: Keita Kobayashi @ 2015-03-04 4:55 UTC (permalink / raw)
To: horms, rjw; +Cc: linux-sh, linux-pm, magnus.damm, Keita Kobayashi
This patch Add the wfi and Core-Standby for CPUIdle power states
support for the r8a7791 SoC.
Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
---
arch/arm/mach-shmobile/pm-r8a7791.c | 41 +++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/arch/arm/mach-shmobile/pm-r8a7791.c b/arch/arm/mach-shmobile/pm-r8a7791.c
index 25f107b..6c00d37 100644
--- a/arch/arm/mach-shmobile/pm-r8a7791.c
+++ b/arch/arm/mach-shmobile/pm-r8a7791.c
@@ -10,8 +10,13 @@
* for more details.
*/
+#include <linux/cpuidle.h>
#include <linux/kernel.h>
#include <linux/smp.h>
+#include <linux/platform_data/renesas-cpuidle.h>
+#include <linux/pm.h>
+#include <asm/cpuidle.h>
+#include <asm/cputype.h>
#include <asm/io.h>
#include "common.h"
#include "pm-rcar.h"
@@ -43,6 +48,41 @@ static inline void r8a7791_sysc_init(void) {}
#endif /* CONFIG_SMP */
+#ifdef CONFIG_ARM_RENESAS_CPUIDLE
+static struct cpuidle_driver r8a7791_cpuidle_driver = {
+ .name = "rcar_r8a7791_cpuidle",
+ .owner = THIS_MODULE,
+ .states = {
+ [0] = ARM_CPUIDLE_WFI_STATE,
+ [1] = {
+ .name = "Core-Standby",
+ .desc = "Core Standby Mode",
+ .exit_latency = 2800,
+ .target_residency = 2800,
+ .enter = shmobile_smp_apmu_enter_cpuidle,
+ },
+ },
+ .state_count = 2,
+};
+
+static struct renesas_cpuidle_driver r8a7791_cpuidle = {
+ .target_cpu = ARM_CPU_PART_CORTEX_A15,
+ .renesas_drv = &r8a7791_cpuidle_driver,
+};
+
+static struct renesas_cpuidle r8a7791_data = {
+ .num_drvs = 1,
+ .rcd = &r8a7791_cpuidle,
+};
+
+static void __init r8a7791_cpuidle_init(void)
+{
+ shmobile_cpuidle_set_driver(&r8a7791_data);
+}
+#else
+static void __init r8a7791_cpuidle_init(void) {}
+#endif
+
void __init r8a7791_pm_init(void)
{
void __iomem *p;
@@ -70,4 +110,5 @@ void __init r8a7791_pm_init(void)
r8a7791_sysc_init();
shmobile_smp_apmu_suspend_init();
+ r8a7791_cpuidle_init();
}
--
1.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [RFC/PATCH 4/6] ARM: shmobile: r8a7791: Add Core-Standby CPUIdle support for r8a7791
@ 2015-03-04 4:55 ` Keita Kobayashi
0 siblings, 0 replies; 34+ messages in thread
From: Keita Kobayashi @ 2015-03-04 4:55 UTC (permalink / raw)
To: horms, rjw; +Cc: linux-sh, linux-pm, magnus.damm, Keita Kobayashi
This patch Add the wfi and Core-Standby for CPUIdle power states
support for the r8a7791 SoC.
Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
---
arch/arm/mach-shmobile/pm-r8a7791.c | 41 +++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/arch/arm/mach-shmobile/pm-r8a7791.c b/arch/arm/mach-shmobile/pm-r8a7791.c
index 25f107b..6c00d37 100644
--- a/arch/arm/mach-shmobile/pm-r8a7791.c
+++ b/arch/arm/mach-shmobile/pm-r8a7791.c
@@ -10,8 +10,13 @@
* for more details.
*/
+#include <linux/cpuidle.h>
#include <linux/kernel.h>
#include <linux/smp.h>
+#include <linux/platform_data/renesas-cpuidle.h>
+#include <linux/pm.h>
+#include <asm/cpuidle.h>
+#include <asm/cputype.h>
#include <asm/io.h>
#include "common.h"
#include "pm-rcar.h"
@@ -43,6 +48,41 @@ static inline void r8a7791_sysc_init(void) {}
#endif /* CONFIG_SMP */
+#ifdef CONFIG_ARM_RENESAS_CPUIDLE
+static struct cpuidle_driver r8a7791_cpuidle_driver = {
+ .name = "rcar_r8a7791_cpuidle",
+ .owner = THIS_MODULE,
+ .states = {
+ [0] = ARM_CPUIDLE_WFI_STATE,
+ [1] = {
+ .name = "Core-Standby",
+ .desc = "Core Standby Mode",
+ .exit_latency = 2800,
+ .target_residency = 2800,
+ .enter = shmobile_smp_apmu_enter_cpuidle,
+ },
+ },
+ .state_count = 2,
+};
+
+static struct renesas_cpuidle_driver r8a7791_cpuidle = {
+ .target_cpu = ARM_CPU_PART_CORTEX_A15,
+ .renesas_drv = &r8a7791_cpuidle_driver,
+};
+
+static struct renesas_cpuidle r8a7791_data = {
+ .num_drvs = 1,
+ .rcd = &r8a7791_cpuidle,
+};
+
+static void __init r8a7791_cpuidle_init(void)
+{
+ shmobile_cpuidle_set_driver(&r8a7791_data);
+}
+#else
+static void __init r8a7791_cpuidle_init(void) {}
+#endif
+
void __init r8a7791_pm_init(void)
{
void __iomem *p;
@@ -70,4 +110,5 @@ void __init r8a7791_pm_init(void)
r8a7791_sysc_init();
shmobile_smp_apmu_suspend_init();
+ r8a7791_cpuidle_init();
}
--
1.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [RFC/PATCH 5/6] ARM: shmobile: r8a7790: Add Core-Standby CPUIdle support for r8a7790
2015-03-04 4:55 ` Keita Kobayashi
@ 2015-03-04 4:55 ` Keita Kobayashi
-1 siblings, 0 replies; 34+ messages in thread
From: Keita Kobayashi @ 2015-03-04 4:55 UTC (permalink / raw)
To: horms, rjw; +Cc: linux-sh, linux-pm, magnus.damm, Keita Kobayashi
Add the CPUIdle support power state support for the r8a7790 SoC.
This patch add the wfi and Core-Standby for CPUIdle power states
support for the Cortex-A15 and add the wfi power state support for
the Cortex-A7.
Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
---
arch/arm/mach-shmobile/pm-r8a7790.c | 55 +++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/arch/arm/mach-shmobile/pm-r8a7790.c b/arch/arm/mach-shmobile/pm-r8a7790.c
index 80e8d95..6a3751f 100644
--- a/arch/arm/mach-shmobile/pm-r8a7790.c
+++ b/arch/arm/mach-shmobile/pm-r8a7790.c
@@ -10,8 +10,13 @@
* for more details.
*/
+#include <linux/cpuidle.h>
#include <linux/kernel.h>
#include <linux/smp.h>
+#include <linux/platform_data/renesas-cpuidle.h>
+#include <linux/pm.h>
+#include <asm/cpuidle.h>
+#include <asm/cputype.h>
#include <asm/io.h>
#include "common.h"
#include "pm-rcar.h"
@@ -48,6 +53,55 @@ static inline void r8a7790_sysc_init(void) {}
#endif /* CONFIG_SMP */
+#ifdef CONFIG_ARM_RENESAS_CPUIDLE
+static struct cpuidle_driver r8a7790_ca15_cpuidle_driver = {
+ .name = "rcar_r8a7790_ca15_cpuidle",
+ .owner = THIS_MODULE,
+ .states = {
+ [0] = ARM_CPUIDLE_WFI_STATE,
+ [1] = {
+ .name = "Core-Standby",
+ .desc = "Core Standby Mode",
+ .exit_latency = 3000,
+ .target_residency = 3000,
+ .enter = shmobile_smp_apmu_enter_cpuidle,
+ },
+ },
+ .state_count = 2,
+};
+
+static struct cpuidle_driver r8a7790_ca7_cpuidle_driver = {
+ .name = "rcar_r8a7790_ca7_cpuidle",
+ .owner = THIS_MODULE,
+ .states[0] = ARM_CPUIDLE_WFI_STATE,
+ .safe_state_index = 0, /* C1 */
+ .state_count = 1,
+};
+
+static struct renesas_cpuidle_driver r8a7790_cpuidle[] = {
+ [0] = {
+ .target_cpu = ARM_CPU_PART_CORTEX_A15,
+ .renesas_drv = &r8a7790_ca15_cpuidle_driver,
+ },
+ [1] = {
+ .target_cpu = ARM_CPU_PART_CORTEX_A7,
+ .renesas_drv = &r8a7790_ca7_cpuidle_driver,
+ },
+};
+
+static struct renesas_cpuidle r8a7790_data = {
+ .num_drvs = ARRAY_SIZE(r8a7790_cpuidle),
+ .rcd = r8a7790_cpuidle,
+};
+
+static void __init r8a7790_cpuidle_init(void)
+{
+ shmobile_cpuidle_set_driver(&r8a7790_data);
+}
+#else
+static void __init r8a7790_cpuidle_init(void) {}
+#endif
+
void __init r8a7790_pm_init(void)
{
void __iomem *p;
@@ -79,4 +133,5 @@ void __init r8a7790_pm_init(void)
r8a7790_sysc_init();
shmobile_smp_apmu_suspend_init();
+ r8a7790_cpuidle_init();
}
--
1.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [RFC/PATCH 5/6] ARM: shmobile: r8a7790: Add Core-Standby CPUIdle support for r8a7790
@ 2015-03-04 4:55 ` Keita Kobayashi
0 siblings, 0 replies; 34+ messages in thread
From: Keita Kobayashi @ 2015-03-04 4:55 UTC (permalink / raw)
To: horms, rjw; +Cc: linux-sh, linux-pm, magnus.damm, Keita Kobayashi
Add the CPUIdle support power state support for the r8a7790 SoC.
This patch add the wfi and Core-Standby for CPUIdle power states
support for the Cortex-A15 and add the wfi power state support for
the Cortex-A7.
Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
---
arch/arm/mach-shmobile/pm-r8a7790.c | 55 +++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/arch/arm/mach-shmobile/pm-r8a7790.c b/arch/arm/mach-shmobile/pm-r8a7790.c
index 80e8d95..6a3751f 100644
--- a/arch/arm/mach-shmobile/pm-r8a7790.c
+++ b/arch/arm/mach-shmobile/pm-r8a7790.c
@@ -10,8 +10,13 @@
* for more details.
*/
+#include <linux/cpuidle.h>
#include <linux/kernel.h>
#include <linux/smp.h>
+#include <linux/platform_data/renesas-cpuidle.h>
+#include <linux/pm.h>
+#include <asm/cpuidle.h>
+#include <asm/cputype.h>
#include <asm/io.h>
#include "common.h"
#include "pm-rcar.h"
@@ -48,6 +53,55 @@ static inline void r8a7790_sysc_init(void) {}
#endif /* CONFIG_SMP */
+#ifdef CONFIG_ARM_RENESAS_CPUIDLE
+static struct cpuidle_driver r8a7790_ca15_cpuidle_driver = {
+ .name = "rcar_r8a7790_ca15_cpuidle",
+ .owner = THIS_MODULE,
+ .states = {
+ [0] = ARM_CPUIDLE_WFI_STATE,
+ [1] = {
+ .name = "Core-Standby",
+ .desc = "Core Standby Mode",
+ .exit_latency = 3000,
+ .target_residency = 3000,
+ .enter = shmobile_smp_apmu_enter_cpuidle,
+ },
+ },
+ .state_count = 2,
+};
+
+static struct cpuidle_driver r8a7790_ca7_cpuidle_driver = {
+ .name = "rcar_r8a7790_ca7_cpuidle",
+ .owner = THIS_MODULE,
+ .states[0] = ARM_CPUIDLE_WFI_STATE,
+ .safe_state_index = 0, /* C1 */
+ .state_count = 1,
+};
+
+static struct renesas_cpuidle_driver r8a7790_cpuidle[] = {
+ [0] = {
+ .target_cpu = ARM_CPU_PART_CORTEX_A15,
+ .renesas_drv = &r8a7790_ca15_cpuidle_driver,
+ },
+ [1] = {
+ .target_cpu = ARM_CPU_PART_CORTEX_A7,
+ .renesas_drv = &r8a7790_ca7_cpuidle_driver,
+ },
+};
+
+static struct renesas_cpuidle r8a7790_data = {
+ .num_drvs = ARRAY_SIZE(r8a7790_cpuidle),
+ .rcd = r8a7790_cpuidle,
+};
+
+static void __init r8a7790_cpuidle_init(void)
+{
+ shmobile_cpuidle_set_driver(&r8a7790_data);
+}
+#else
+static void __init r8a7790_cpuidle_init(void) {}
+#endif
+
void __init r8a7790_pm_init(void)
{
void __iomem *p;
@@ -79,4 +133,5 @@ void __init r8a7790_pm_init(void)
r8a7790_sysc_init();
shmobile_smp_apmu_suspend_init();
+ r8a7790_cpuidle_init();
}
--
1.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [RFC/PATCH 6/6] ARM: shmobile: Enable Renesas CPUIdle for shmobile_defconfig
2015-03-04 4:55 ` Keita Kobayashi
@ 2015-03-04 4:55 ` Keita Kobayashi
-1 siblings, 0 replies; 34+ messages in thread
From: Keita Kobayashi @ 2015-03-04 4:55 UTC (permalink / raw)
To: horms, rjw; +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 1155415..da7fa03 100644
--- a/arch/arm/configs/shmobile_defconfig
+++ b/arch/arm/configs/shmobile_defconfig
@@ -43,6 +43,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_RENESAS_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] 34+ messages in thread
* [RFC/PATCH 6/6] ARM: shmobile: Enable Renesas CPUIdle for shmobile_defconfig
@ 2015-03-04 4:55 ` Keita Kobayashi
0 siblings, 0 replies; 34+ messages in thread
From: Keita Kobayashi @ 2015-03-04 4:55 UTC (permalink / raw)
To: horms, rjw; +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 1155415..da7fa03 100644
--- a/arch/arm/configs/shmobile_defconfig
+++ b/arch/arm/configs/shmobile_defconfig
@@ -43,6 +43,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_RENESAS_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] 34+ messages in thread
* Re: [RFC/PATCH 4/6] ARM: shmobile: r8a7791: Add Core-Standby CPUIdle support for r8a7791
[not found] ` <CAKDJKT6vx8xhHtxCerXen0NqRao5d5hzZdj8LtSJ4hiMjhZXdA@mail.gmail.com>
@ 2015-03-05 0:29 ` Simon Horman
0 siblings, 0 replies; 34+ messages in thread
From: Simon Horman @ 2015-03-05 0:29 UTC (permalink / raw)
To: Manish Badarkhe; +Cc: Keita Kobayashi, rjw, linux-sh, linux-pm, magnus.damm
On Wed, Mar 04, 2015 at 11:03:03AM +0530, Manish Badarkhe wrote:
> Hi,
>
> On Wed, Mar 4, 2015 at 10:25 AM, Keita Kobayashi <
> keita.kobayashi.ym@renesas.com> wrote:
>
> > This patch Add the wfi and Core-Standby for CPUIdle power states
> > support for the r8a7791 SoC.
> >
> > Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
> > ---
> > arch/arm/mach-shmobile/pm-r8a7791.c | 41
> > +++++++++++++++++++++++++++++++++++++
> > 1 file changed, 41 insertions(+)
> >
> > diff --git a/arch/arm/mach-shmobile/pm-r8a7791.c
> > b/arch/arm/mach-shmobile/pm-r8a7791.c
> > index 25f107b..6c00d37 100644
> > --- a/arch/arm/mach-shmobile/pm-r8a7791.c
> > +++ b/arch/arm/mach-shmobile/pm-r8a7791.c
> > @@ -10,8 +10,13 @@
> > * for more details.
> > */
> >
> > +#include <linux/cpuidle.h>
> > #include <linux/kernel.h>
> > #include <linux/smp.h>
> > +#include <linux/platform_data/renesas-cpuidle.h>
> > +#include <linux/pm.h>
> > +#include <asm/cpuidle.h>
> > +#include <asm/cputype.h>
> > #include <asm/io.h>
> > #include "common.h"
> > #include "pm-rcar.h"
> > @@ -43,6 +48,41 @@ static inline void r8a7791_sysc_init(void) {}
> >
> > #endif /* CONFIG_SMP */
> >
> > +#ifdef CONFIG_ARM_RENESAS_CPUIDLE
> > +static struct cpuidle_driver r8a7791_cpuidle_driver = {
> > + .name = "rcar_r8a7791_cpuidle",
> > + .owner = THIS_MODULE,
> > + .states = {
> > + [0] = ARM_CPUIDLE_WFI_STATE,
> > + [1] = {
> > + .name = "Core-Standby",
> > + .desc = "Core Standby Mode",
> > + .exit_latency = 2800,
> > + .target_residency = 2800,
> > + .enter = shmobile_smp_apmu_enter_cpuidle,
> > + },
> > + },
> > + .state_count = 2,
> > +};
> > +
> > +static struct renesas_cpuidle_driver r8a7791_cpuidle = {
> > + .target_cpu = ARM_CPU_PART_CORTEX_A15,
> > + .renesas_drv = &r8a7791_cpuidle_driver,
> > +};
> > +
> > +static struct renesas_cpuidle r8a7791_data = {
> > + .num_drvs = 1,
> > + .rcd = &r8a7791_cpuidle,
> > +};
> > +
> > +static void __init r8a7791_cpuidle_init(void)
> > +{
> > + shmobile_cpuidle_set_driver(&r8a7791_data);
> > +}
> > +#else
> > +static void __init r8a7791_cpuidle_init(void) {}
> > +#endif
> >
>
> You can use 'IS_ENABLED' instead of this '#ifdef' during calling of
> function 'r8a7791_cpuidle_init' to avoid empty function in '#else' part
> of the code.
>
> May be it is possible to replace all '#ifdef' with 'IS_ENABLED' call
> in this file and also rest of patches in this series.
Kobayashi-san,
it seems likely that Manish's suggestion will likely lead
to cleaner code. Could you look into it?
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [RFC/PATCH 4/6] ARM: shmobile: r8a7791: Add Core-Standby CPUIdle support for r8a7791
@ 2015-03-05 0:29 ` Simon Horman
0 siblings, 0 replies; 34+ messages in thread
From: Simon Horman @ 2015-03-05 0:29 UTC (permalink / raw)
To: Manish Badarkhe; +Cc: Keita Kobayashi, rjw, linux-sh, linux-pm, magnus.damm
On Wed, Mar 04, 2015 at 11:03:03AM +0530, Manish Badarkhe wrote:
> Hi,
>
> On Wed, Mar 4, 2015 at 10:25 AM, Keita Kobayashi <
> keita.kobayashi.ym@renesas.com> wrote:
>
> > This patch Add the wfi and Core-Standby for CPUIdle power states
> > support for the r8a7791 SoC.
> >
> > Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
> > ---
> > arch/arm/mach-shmobile/pm-r8a7791.c | 41
> > +++++++++++++++++++++++++++++++++++++
> > 1 file changed, 41 insertions(+)
> >
> > diff --git a/arch/arm/mach-shmobile/pm-r8a7791.c
> > b/arch/arm/mach-shmobile/pm-r8a7791.c
> > index 25f107b..6c00d37 100644
> > --- a/arch/arm/mach-shmobile/pm-r8a7791.c
> > +++ b/arch/arm/mach-shmobile/pm-r8a7791.c
> > @@ -10,8 +10,13 @@
> > * for more details.
> > */
> >
> > +#include <linux/cpuidle.h>
> > #include <linux/kernel.h>
> > #include <linux/smp.h>
> > +#include <linux/platform_data/renesas-cpuidle.h>
> > +#include <linux/pm.h>
> > +#include <asm/cpuidle.h>
> > +#include <asm/cputype.h>
> > #include <asm/io.h>
> > #include "common.h"
> > #include "pm-rcar.h"
> > @@ -43,6 +48,41 @@ static inline void r8a7791_sysc_init(void) {}
> >
> > #endif /* CONFIG_SMP */
> >
> > +#ifdef CONFIG_ARM_RENESAS_CPUIDLE
> > +static struct cpuidle_driver r8a7791_cpuidle_driver = {
> > + .name = "rcar_r8a7791_cpuidle",
> > + .owner = THIS_MODULE,
> > + .states = {
> > + [0] = ARM_CPUIDLE_WFI_STATE,
> > + [1] = {
> > + .name = "Core-Standby",
> > + .desc = "Core Standby Mode",
> > + .exit_latency = 2800,
> > + .target_residency = 2800,
> > + .enter = shmobile_smp_apmu_enter_cpuidle,
> > + },
> > + },
> > + .state_count = 2,
> > +};
> > +
> > +static struct renesas_cpuidle_driver r8a7791_cpuidle = {
> > + .target_cpu = ARM_CPU_PART_CORTEX_A15,
> > + .renesas_drv = &r8a7791_cpuidle_driver,
> > +};
> > +
> > +static struct renesas_cpuidle r8a7791_data = {
> > + .num_drvs = 1,
> > + .rcd = &r8a7791_cpuidle,
> > +};
> > +
> > +static void __init r8a7791_cpuidle_init(void)
> > +{
> > + shmobile_cpuidle_set_driver(&r8a7791_data);
> > +}
> > +#else
> > +static void __init r8a7791_cpuidle_init(void) {}
> > +#endif
> >
>
> You can use 'IS_ENABLED' instead of this '#ifdef' during calling of
> function 'r8a7791_cpuidle_init' to avoid empty function in '#else' part
> of the code.
>
> May be it is possible to replace all '#ifdef' with 'IS_ENABLED' call
> in this file and also rest of patches in this series.
Kobayashi-san,
it seems likely that Manish's suggestion will likely lead
to cleaner code. Could you look into it?
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [RFC/PATCH 4/6] ARM: shmobile: r8a7791: Add Core-Standby CPUIdle support for r8a7791
2015-03-05 0:29 ` Simon Horman
@ 2015-03-05 1:19 ` keita kobayashi
-1 siblings, 0 replies; 34+ messages in thread
From: keita kobayashi @ 2015-03-05 1:19 UTC (permalink / raw)
To: Simon Horman; +Cc: Manish Badarkhe, rjw, linux-sh, linux-pm, magnus.damm
Hi Manish, Simon
Thank you for your comment.
(2015/03/05 9:29), Simon Horman wrote:
> On Wed, Mar 04, 2015 at 11:03:03AM +0530, Manish Badarkhe wrote:
>> Hi,
>>
>> On Wed, Mar 4, 2015 at 10:25 AM, Keita Kobayashi <
>> keita.kobayashi.ym@renesas.com> wrote:
>>
>>> This patch Add the wfi and Core-Standby for CPUIdle power states
>>> support for the r8a7791 SoC.
>>>
>>> Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
>>> ---
>>> arch/arm/mach-shmobile/pm-r8a7791.c | 41
>>> +++++++++++++++++++++++++++++++++++++
>>> 1 file changed, 41 insertions(+)
>>>
>>> diff --git a/arch/arm/mach-shmobile/pm-r8a7791.c
>>> b/arch/arm/mach-shmobile/pm-r8a7791.c
>>> index 25f107b..6c00d37 100644
>>> --- a/arch/arm/mach-shmobile/pm-r8a7791.c
>>> +++ b/arch/arm/mach-shmobile/pm-r8a7791.c
>>> @@ -10,8 +10,13 @@
>>> * for more details.
>>> */
>>>
>>> +#include <linux/cpuidle.h>
>>> #include <linux/kernel.h>
>>> #include <linux/smp.h>
>>> +#include <linux/platform_data/renesas-cpuidle.h>
>>> +#include <linux/pm.h>
>>> +#include <asm/cpuidle.h>
>>> +#include <asm/cputype.h>
>>> #include <asm/io.h>
>>> #include "common.h"
>>> #include "pm-rcar.h"
>>> @@ -43,6 +48,41 @@ static inline void r8a7791_sysc_init(void) {}
>>>
>>> #endif /* CONFIG_SMP */
>>>
>>> +#ifdef CONFIG_ARM_RENESAS_CPUIDLE
>>> +static struct cpuidle_driver r8a7791_cpuidle_driver = {
>>> + .name = "rcar_r8a7791_cpuidle",
>>> + .owner = THIS_MODULE,
>>> + .states = {
>>> + [0] = ARM_CPUIDLE_WFI_STATE,
>>> + [1] = {
>>> + .name = "Core-Standby",
>>> + .desc = "Core Standby Mode",
>>> + .exit_latency = 2800,
>>> + .target_residency = 2800,
>>> + .enter = shmobile_smp_apmu_enter_cpuidle,
>>> + },
>>> + },
>>> + .state_count = 2,
>>> +};
>>> +
>>> +static struct renesas_cpuidle_driver r8a7791_cpuidle = {
>>> + .target_cpu = ARM_CPU_PART_CORTEX_A15,
>>> + .renesas_drv = &r8a7791_cpuidle_driver,
>>> +};
>>> +
>>> +static struct renesas_cpuidle r8a7791_data = {
>>> + .num_drvs = 1,
>>> + .rcd = &r8a7791_cpuidle,
>>> +};
>>> +
>>> +static void __init r8a7791_cpuidle_init(void)
>>> +{
>>> + shmobile_cpuidle_set_driver(&r8a7791_data);
>>> +}
>>> +#else
>>> +static void __init r8a7791_cpuidle_init(void) {}
>>> +#endif
>>>
>>
>> You can use 'IS_ENABLED' instead of this '#ifdef' during calling of
>> function 'r8a7791_cpuidle_init' to avoid empty function in '#else' part
>> of the code.
>>
>> May be it is possible to replace all '#ifdef' with 'IS_ENABLED' call
>> in this file and also rest of patches in this series.
>
> Kobayashi-san,
>
> it seems likely that Manish's suggestion will likely lead
> to cleaner code. Could you look into it?
I will fix it with V2 patch series.
Regards.
Keita Kobayashi
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [RFC/PATCH 4/6] ARM: shmobile: r8a7791: Add Core-Standby CPUIdle support for r8a7791
@ 2015-03-05 1:19 ` keita kobayashi
0 siblings, 0 replies; 34+ messages in thread
From: keita kobayashi @ 2015-03-05 1:19 UTC (permalink / raw)
To: Simon Horman; +Cc: Manish Badarkhe, rjw, linux-sh, linux-pm, magnus.damm
Hi Manish, Simon
Thank you for your comment.
(2015/03/05 9:29), Simon Horman wrote:
> On Wed, Mar 04, 2015 at 11:03:03AM +0530, Manish Badarkhe wrote:
>> Hi,
>>
>> On Wed, Mar 4, 2015 at 10:25 AM, Keita Kobayashi <
>> keita.kobayashi.ym@renesas.com> wrote:
>>
>>> This patch Add the wfi and Core-Standby for CPUIdle power states
>>> support for the r8a7791 SoC.
>>>
>>> Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
>>> ---
>>> arch/arm/mach-shmobile/pm-r8a7791.c | 41
>>> +++++++++++++++++++++++++++++++++++++
>>> 1 file changed, 41 insertions(+)
>>>
>>> diff --git a/arch/arm/mach-shmobile/pm-r8a7791.c
>>> b/arch/arm/mach-shmobile/pm-r8a7791.c
>>> index 25f107b..6c00d37 100644
>>> --- a/arch/arm/mach-shmobile/pm-r8a7791.c
>>> +++ b/arch/arm/mach-shmobile/pm-r8a7791.c
>>> @@ -10,8 +10,13 @@
>>> * for more details.
>>> */
>>>
>>> +#include <linux/cpuidle.h>
>>> #include <linux/kernel.h>
>>> #include <linux/smp.h>
>>> +#include <linux/platform_data/renesas-cpuidle.h>
>>> +#include <linux/pm.h>
>>> +#include <asm/cpuidle.h>
>>> +#include <asm/cputype.h>
>>> #include <asm/io.h>
>>> #include "common.h"
>>> #include "pm-rcar.h"
>>> @@ -43,6 +48,41 @@ static inline void r8a7791_sysc_init(void) {}
>>>
>>> #endif /* CONFIG_SMP */
>>>
>>> +#ifdef CONFIG_ARM_RENESAS_CPUIDLE
>>> +static struct cpuidle_driver r8a7791_cpuidle_driver = {
>>> + .name = "rcar_r8a7791_cpuidle",
>>> + .owner = THIS_MODULE,
>>> + .states = {
>>> + [0] = ARM_CPUIDLE_WFI_STATE,
>>> + [1] = {
>>> + .name = "Core-Standby",
>>> + .desc = "Core Standby Mode",
>>> + .exit_latency = 2800,
>>> + .target_residency = 2800,
>>> + .enter = shmobile_smp_apmu_enter_cpuidle,
>>> + },
>>> + },
>>> + .state_count = 2,
>>> +};
>>> +
>>> +static struct renesas_cpuidle_driver r8a7791_cpuidle = {
>>> + .target_cpu = ARM_CPU_PART_CORTEX_A15,
>>> + .renesas_drv = &r8a7791_cpuidle_driver,
>>> +};
>>> +
>>> +static struct renesas_cpuidle r8a7791_data = {
>>> + .num_drvs = 1,
>>> + .rcd = &r8a7791_cpuidle,
>>> +};
>>> +
>>> +static void __init r8a7791_cpuidle_init(void)
>>> +{
>>> + shmobile_cpuidle_set_driver(&r8a7791_data);
>>> +}
>>> +#else
>>> +static void __init r8a7791_cpuidle_init(void) {}
>>> +#endif
>>>
>>
>> You can use 'IS_ENABLED' instead of this '#ifdef' during calling of
>> function 'r8a7791_cpuidle_init' to avoid empty function in '#else' part
>> of the code.
>>
>> May be it is possible to replace all '#ifdef' with 'IS_ENABLED' call
>> in this file and also rest of patches in this series.
>
> Kobayashi-san,
>
> it seems likely that Manish's suggestion will likely lead
> to cleaner code. Could you look into it?
I will fix it with V2 patch series.
Regards.
Keita Kobayashi
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [RFC/PATCH 0/6] Add CPUIdle support for Renesas SoCs
2015-03-04 4:55 ` Keita Kobayashi
@ 2015-03-05 18:02 ` Daniel Lezcano
-1 siblings, 0 replies; 34+ messages in thread
From: Daniel Lezcano @ 2015-03-05 18:02 UTC (permalink / raw)
To: Keita Kobayashi, horms, rjw; +Cc: linux-sh, linux-pm, magnus.damm
On 03/04/2015 05:55 AM, Keita Kobayashi wrote:
> Hello
>
> These patches add CPUIdle support for Renesas SoCs.
> These patches have been tested on Renesas Gen2 series with
> following cases on renesas-devel-20150301-v4.0-rc1 tag.
>
> [Test case]
> a. Lager board(CA15 * 4)
> b. Lager board(CA7 * 4)
> c. Lager board(CA15 * 4 + CA7 *4)
> d. Koelsch board(CA15 * 2)
>
> These cases work fine.
>
> Keita Kobayashi (6):
> cpuidle: renesas: Add CPUIdle Driver for Renesas SoCs
> ARM: shmobile: Change CPUIdle InterFace
> ARM: shmobile: APMU: Add Core-Standby function for CPUIdle
> ARM: shmobile: r8a7791: Add Core-Standby CPUIdle support for r8a7791
> ARM: shmobile: r8a7790: Add Core-Standby CPUIdle support for r8a7790
> ARM: shmobile: Enable Renesas CPUIdle for shmobile_defconfig
>
> arch/arm/configs/shmobile_defconfig | 2 +
> arch/arm/mach-shmobile/common.h | 8 +-
> arch/arm/mach-shmobile/cpuidle.c | 31 ++++---
> arch/arm/mach-shmobile/platsmp-apmu.c | 20 ++++-
> arch/arm/mach-shmobile/pm-r8a7790.c | 55 ++++++++++++
> arch/arm/mach-shmobile/pm-r8a7791.c | 41 +++++++++
> drivers/cpuidle/Kconfig.arm | 8 ++
> drivers/cpuidle/Makefile | 1 +
> drivers/cpuidle/cpuidle-renesas.c | 118 ++++++++++++++++++++++++++
> include/linux/platform_data/renesas-cpuidle.h | 24 ++++++
> 10 files changed, 294 insertions(+), 14 deletions(-)
> create mode 100644 drivers/cpuidle/cpuidle-renesas.c
> create mode 100644 include/linux/platform_data/renesas-cpuidle.h
Hi Keita,
the platform approach to pass private data from the arch specific to the
cpuidle driver no longer accepted. Unfortunately, there is no alternate
solution upstream.
But hopefully, there is a patchset [1] submitted for upstreaming which
unify arm32/64 into a single generic cpuidle driver and use the DT to
define the idle functions to be used.
I suggest you have a look at this patchset if it can fit your need.
-- Daniel
[1] https://lkml.org/lkml/2015/3/3/271
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [RFC/PATCH 0/6] Add CPUIdle support for Renesas SoCs
@ 2015-03-05 18:02 ` Daniel Lezcano
0 siblings, 0 replies; 34+ messages in thread
From: Daniel Lezcano @ 2015-03-05 18:02 UTC (permalink / raw)
To: Keita Kobayashi, horms, rjw; +Cc: linux-sh, linux-pm, magnus.damm
On 03/04/2015 05:55 AM, Keita Kobayashi wrote:
> Hello
>
> These patches add CPUIdle support for Renesas SoCs.
> These patches have been tested on Renesas Gen2 series with
> following cases on renesas-devel-20150301-v4.0-rc1 tag.
>
> [Test case]
> a. Lager board(CA15 * 4)
> b. Lager board(CA7 * 4)
> c. Lager board(CA15 * 4 + CA7 *4)
> d. Koelsch board(CA15 * 2)
>
> These cases work fine.
>
> Keita Kobayashi (6):
> cpuidle: renesas: Add CPUIdle Driver for Renesas SoCs
> ARM: shmobile: Change CPUIdle InterFace
> ARM: shmobile: APMU: Add Core-Standby function for CPUIdle
> ARM: shmobile: r8a7791: Add Core-Standby CPUIdle support for r8a7791
> ARM: shmobile: r8a7790: Add Core-Standby CPUIdle support for r8a7790
> ARM: shmobile: Enable Renesas CPUIdle for shmobile_defconfig
>
> arch/arm/configs/shmobile_defconfig | 2 +
> arch/arm/mach-shmobile/common.h | 8 +-
> arch/arm/mach-shmobile/cpuidle.c | 31 ++++---
> arch/arm/mach-shmobile/platsmp-apmu.c | 20 ++++-
> arch/arm/mach-shmobile/pm-r8a7790.c | 55 ++++++++++++
> arch/arm/mach-shmobile/pm-r8a7791.c | 41 +++++++++
> drivers/cpuidle/Kconfig.arm | 8 ++
> drivers/cpuidle/Makefile | 1 +
> drivers/cpuidle/cpuidle-renesas.c | 118 ++++++++++++++++++++++++++
> include/linux/platform_data/renesas-cpuidle.h | 24 ++++++
> 10 files changed, 294 insertions(+), 14 deletions(-)
> create mode 100644 drivers/cpuidle/cpuidle-renesas.c
> create mode 100644 include/linux/platform_data/renesas-cpuidle.h
Hi Keita,
the platform approach to pass private data from the arch specific to the
cpuidle driver no longer accepted. Unfortunately, there is no alternate
solution upstream.
But hopefully, there is a patchset [1] submitted for upstreaming which
unify arm32/64 into a single generic cpuidle driver and use the DT to
define the idle functions to be used.
I suggest you have a look at this patchset if it can fit your need.
-- Daniel
[1] https://lkml.org/lkml/2015/3/3/271
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [RFC/PATCH 1/6] cpuidle: renesas: Add CPUIdle Driver for Renesas SoCs
2015-03-04 4:55 ` Keita Kobayashi
@ 2015-03-05 18:05 ` Daniel Lezcano
-1 siblings, 0 replies; 34+ messages in thread
From: Daniel Lezcano @ 2015-03-05 18:05 UTC (permalink / raw)
To: Keita Kobayashi, horms, rjw; +Cc: linux-sh, linux-pm, magnus.damm
On 03/04/2015 05:55 AM, Keita Kobayashi wrote:
> This patch adds a cpuidle driver for Renesas SoCs.
>
> Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
> ---
> drivers/cpuidle/Kconfig.arm | 8 ++
> drivers/cpuidle/Makefile | 1 +
> drivers/cpuidle/cpuidle-renesas.c | 118 ++++++++++++++++++++++++++
> include/linux/platform_data/renesas-cpuidle.h | 24 ++++++
> 4 files changed, 151 insertions(+)
> create mode 100644 drivers/cpuidle/cpuidle-renesas.c
> create mode 100644 include/linux/platform_data/renesas-cpuidle.h
>
> diff --git a/drivers/cpuidle/Kconfig.arm b/drivers/cpuidle/Kconfig.arm
> index 8e07c94..01cb8cc 100644
> --- a/drivers/cpuidle/Kconfig.arm
> +++ b/drivers/cpuidle/Kconfig.arm
> @@ -64,3 +64,11 @@ config ARM_MVEBU_V7_CPUIDLE
> depends on ARCH_MVEBU
> help
> Select this to enable cpuidle on Armada 370, 38x and XP processors.
> +
> +config ARM_RENESAS_CPUIDLE
> + bool "CPU Idle Driver for the renesas SoCs"
> + depends on ARCH_SHMOBILE_MULTI
> + select ARM_CPU_SUSPEND
> + select CPU_IDLE_MULTIPLE_DRIVERS
> + help
> + Select this to enable cpuidle for renesas SoCs
> diff --git a/drivers/cpuidle/Makefile b/drivers/cpuidle/Makefile
> index 4d177b9..c718906 100644
> --- a/drivers/cpuidle/Makefile
> +++ b/drivers/cpuidle/Makefile
> @@ -17,6 +17,7 @@ obj-$(CONFIG_ARM_ZYNQ_CPUIDLE) += cpuidle-zynq.o
> obj-$(CONFIG_ARM_U8500_CPUIDLE) += cpuidle-ux500.o
> obj-$(CONFIG_ARM_AT91_CPUIDLE) += cpuidle-at91.o
> obj-$(CONFIG_ARM_EXYNOS_CPUIDLE) += cpuidle-exynos.o
> +obj-$(CONFIG_ARM_RENESAS_CPUIDLE) += cpuidle-renesas.o
>
> ###############################################################################
> # MIPS drivers
> diff --git a/drivers/cpuidle/cpuidle-renesas.c b/drivers/cpuidle/cpuidle-renesas.c
> new file mode 100644
> index 0000000..b469e95
> --- /dev/null
> +++ b/drivers/cpuidle/cpuidle-renesas.c
> @@ -0,0 +1,118 @@
> +/*
> + * CPUIdle support code for Renesas ARM
> + *
> + * Copyright (C) 2014 Renesas Electronics Corporation
> + *
> + * This file is subject to the terms and conditions of the GNU General Public
> + * License. See the file "COPYING" in the main directory of this archive
> + * for more details.
> + */
> +
> +#include <linux/cpuidle.h>
> +#include <linux/device.h>
> +#include <linux/io.h>
> +#include <linux/module.h>
> +#include <linux/of.h>
> +#include <linux/slab.h>
> +#include <linux/platform_data/renesas-cpuidle.h>
> +#include <linux/platform_device.h>
> +#include <linux/pm.h>
> +#include <linux/suspend.h>
> +#include <asm/cpuidle.h>
> +#include <asm/proc-fns.h>
> +#include <asm/smp_plat.h>
> +
> +static struct cpuidle_driver renesas_cpuidle_default_driver = {
> + .name = "renesas_default_cpuidle",
> + .owner = THIS_MODULE,
> + .states[0] = ARM_CPUIDLE_WFI_STATE,
> + .safe_state_index = 0, /* C1 */
> + .state_count = 1,
> +};
> +
> +static struct renesas_cpuidle_driver default_driver = {
> + .target_cpu = -1, /* default */
> + .renesas_drv = &renesas_cpuidle_default_driver,
> +};
> +
> +static struct renesas_cpuidle cpuidle_data = {
> + .num_drvs = 1,
> + .rcd = &default_driver,
> +};
> +
> +static int __init renesas_idle_driver_init(struct device *dev,
> + struct renesas_cpuidle_driver *rcd)
> +{
> + struct cpumask *cpumask = NULL;
> + int cpu;
> +
> + for_each_online_cpu(cpu) {
> + if (smp_cpuid_part(cpu) = rcd->target_cpu ||
> + rcd->target_cpu = -1) { /* default */
> + if (!cpumask) {
> + cpumask = devm_kzalloc(dev,
> + cpumask_size(), GFP_KERNEL);
> + if (!cpumask)
> + return -ENOMEM;
> + }
> + cpumask_set_cpu(cpu, cpumask);
> + rcd->renesas_drv->cpumask = cpumask;
> + }
> + }
> +
> + return 0;
> +}
> +
> +static int renesas_cpuidle_probe(struct platform_device *pdev)
> +{
> + struct renesas_cpuidle *pd = pdev->dev.platform_data;
> + struct renesas_cpuidle_driver *rcd;
> + int i, j, ret;
> +
> + if (!pd->num_drvs || !pd->rcd)
> + pd = &cpuidle_data;
> +
> + for (i = 0; i < pd->num_drvs; i++) {
> + rcd = pd->rcd + i;
> + ret = renesas_idle_driver_init(&pdev->dev, rcd);
> + if (ret)
> + goto out_uninit_driver;
> +
> + if (!rcd->renesas_drv->cpumask)
> + continue;
> +
> + ret = cpuidle_register(rcd->renesas_drv, NULL);
> + if (ret) {
> + dev_err(&pdev->dev,
> + "failed to register cpuidle driver\n");
> + goto out_uninit_driver;
> + }
> + }
> +
> + return 0;
> +
> +out_uninit_driver:
> + for (j = 0; j < i; j++) {
> + rcd = pd->rcd + j;
> +
> + if (!rcd->renesas_drv->cpumask)
> + continue;
> +
> + cpuidle_unregister(rcd->renesas_drv);
> + }
> +
> + return ret;
> +}
The initialization looks very complex. Can you explain why and what the
code is doing ?
> +static struct platform_driver renesas_cpuidle_driver = {
> + .probe = renesas_cpuidle_probe,
> + .driver = {
> + .name = "cpuidle-renesas",
> + .owner = THIS_MODULE,
> + },
> +};
> +
> +module_platform_driver(renesas_cpuidle_driver);
> +
> +MODULE_DESCRIPTION("Renesas cpuidle driver");
> +MODULE_LICENSE("GPL v2");
> diff --git a/include/linux/platform_data/renesas-cpuidle.h b/include/linux/platform_data/renesas-cpuidle.h
> new file mode 100644
> index 0000000..9446215
> --- /dev/null
> +++ b/include/linux/platform_data/renesas-cpuidle.h
> @@ -0,0 +1,24 @@
> +/*
> + * renesas-cpuidle.h -- CPUIdle support code for Renesas ARM
> + *
> + * Copyright (C) 2014 Renesas Electronics Corporation
> + *
> + * This file is subject to the terms and conditions of the GNU General Public
> + * License. See the file "COPYING" in the main directory of this archive
> + * for more details.
> + */
> +
> +#ifndef __RENESAS_CPUIDLE_H__
> +#define __RENESAS_CPUIDLE_H__
> +
> +struct renesas_cpuidle_driver {
> + unsigned int target_cpu;
> + struct cpuidle_driver *renesas_drv;
> +};
> +
> +struct renesas_cpuidle {
> + unsigned int num_drvs;
> + struct renesas_cpuidle_driver *rcd;
> +};
> +
> +#endif /* __RENESAS_CPUIDLE_H__ */
>
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [RFC/PATCH 1/6] cpuidle: renesas: Add CPUIdle Driver for Renesas SoCs
@ 2015-03-05 18:05 ` Daniel Lezcano
0 siblings, 0 replies; 34+ messages in thread
From: Daniel Lezcano @ 2015-03-05 18:05 UTC (permalink / raw)
To: Keita Kobayashi, horms, rjw; +Cc: linux-sh, linux-pm, magnus.damm
On 03/04/2015 05:55 AM, Keita Kobayashi wrote:
> This patch adds a cpuidle driver for Renesas SoCs.
>
> Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
> ---
> drivers/cpuidle/Kconfig.arm | 8 ++
> drivers/cpuidle/Makefile | 1 +
> drivers/cpuidle/cpuidle-renesas.c | 118 ++++++++++++++++++++++++++
> include/linux/platform_data/renesas-cpuidle.h | 24 ++++++
> 4 files changed, 151 insertions(+)
> create mode 100644 drivers/cpuidle/cpuidle-renesas.c
> create mode 100644 include/linux/platform_data/renesas-cpuidle.h
>
> diff --git a/drivers/cpuidle/Kconfig.arm b/drivers/cpuidle/Kconfig.arm
> index 8e07c94..01cb8cc 100644
> --- a/drivers/cpuidle/Kconfig.arm
> +++ b/drivers/cpuidle/Kconfig.arm
> @@ -64,3 +64,11 @@ config ARM_MVEBU_V7_CPUIDLE
> depends on ARCH_MVEBU
> help
> Select this to enable cpuidle on Armada 370, 38x and XP processors.
> +
> +config ARM_RENESAS_CPUIDLE
> + bool "CPU Idle Driver for the renesas SoCs"
> + depends on ARCH_SHMOBILE_MULTI
> + select ARM_CPU_SUSPEND
> + select CPU_IDLE_MULTIPLE_DRIVERS
> + help
> + Select this to enable cpuidle for renesas SoCs
> diff --git a/drivers/cpuidle/Makefile b/drivers/cpuidle/Makefile
> index 4d177b9..c718906 100644
> --- a/drivers/cpuidle/Makefile
> +++ b/drivers/cpuidle/Makefile
> @@ -17,6 +17,7 @@ obj-$(CONFIG_ARM_ZYNQ_CPUIDLE) += cpuidle-zynq.o
> obj-$(CONFIG_ARM_U8500_CPUIDLE) += cpuidle-ux500.o
> obj-$(CONFIG_ARM_AT91_CPUIDLE) += cpuidle-at91.o
> obj-$(CONFIG_ARM_EXYNOS_CPUIDLE) += cpuidle-exynos.o
> +obj-$(CONFIG_ARM_RENESAS_CPUIDLE) += cpuidle-renesas.o
>
> ###############################################################################
> # MIPS drivers
> diff --git a/drivers/cpuidle/cpuidle-renesas.c b/drivers/cpuidle/cpuidle-renesas.c
> new file mode 100644
> index 0000000..b469e95
> --- /dev/null
> +++ b/drivers/cpuidle/cpuidle-renesas.c
> @@ -0,0 +1,118 @@
> +/*
> + * CPUIdle support code for Renesas ARM
> + *
> + * Copyright (C) 2014 Renesas Electronics Corporation
> + *
> + * This file is subject to the terms and conditions of the GNU General Public
> + * License. See the file "COPYING" in the main directory of this archive
> + * for more details.
> + */
> +
> +#include <linux/cpuidle.h>
> +#include <linux/device.h>
> +#include <linux/io.h>
> +#include <linux/module.h>
> +#include <linux/of.h>
> +#include <linux/slab.h>
> +#include <linux/platform_data/renesas-cpuidle.h>
> +#include <linux/platform_device.h>
> +#include <linux/pm.h>
> +#include <linux/suspend.h>
> +#include <asm/cpuidle.h>
> +#include <asm/proc-fns.h>
> +#include <asm/smp_plat.h>
> +
> +static struct cpuidle_driver renesas_cpuidle_default_driver = {
> + .name = "renesas_default_cpuidle",
> + .owner = THIS_MODULE,
> + .states[0] = ARM_CPUIDLE_WFI_STATE,
> + .safe_state_index = 0, /* C1 */
> + .state_count = 1,
> +};
> +
> +static struct renesas_cpuidle_driver default_driver = {
> + .target_cpu = -1, /* default */
> + .renesas_drv = &renesas_cpuidle_default_driver,
> +};
> +
> +static struct renesas_cpuidle cpuidle_data = {
> + .num_drvs = 1,
> + .rcd = &default_driver,
> +};
> +
> +static int __init renesas_idle_driver_init(struct device *dev,
> + struct renesas_cpuidle_driver *rcd)
> +{
> + struct cpumask *cpumask = NULL;
> + int cpu;
> +
> + for_each_online_cpu(cpu) {
> + if (smp_cpuid_part(cpu) == rcd->target_cpu ||
> + rcd->target_cpu == -1) { /* default */
> + if (!cpumask) {
> + cpumask = devm_kzalloc(dev,
> + cpumask_size(), GFP_KERNEL);
> + if (!cpumask)
> + return -ENOMEM;
> + }
> + cpumask_set_cpu(cpu, cpumask);
> + rcd->renesas_drv->cpumask = cpumask;
> + }
> + }
> +
> + return 0;
> +}
> +
> +static int renesas_cpuidle_probe(struct platform_device *pdev)
> +{
> + struct renesas_cpuidle *pd = pdev->dev.platform_data;
> + struct renesas_cpuidle_driver *rcd;
> + int i, j, ret;
> +
> + if (!pd->num_drvs || !pd->rcd)
> + pd = &cpuidle_data;
> +
> + for (i = 0; i < pd->num_drvs; i++) {
> + rcd = pd->rcd + i;
> + ret = renesas_idle_driver_init(&pdev->dev, rcd);
> + if (ret)
> + goto out_uninit_driver;
> +
> + if (!rcd->renesas_drv->cpumask)
> + continue;
> +
> + ret = cpuidle_register(rcd->renesas_drv, NULL);
> + if (ret) {
> + dev_err(&pdev->dev,
> + "failed to register cpuidle driver\n");
> + goto out_uninit_driver;
> + }
> + }
> +
> + return 0;
> +
> +out_uninit_driver:
> + for (j = 0; j < i; j++) {
> + rcd = pd->rcd + j;
> +
> + if (!rcd->renesas_drv->cpumask)
> + continue;
> +
> + cpuidle_unregister(rcd->renesas_drv);
> + }
> +
> + return ret;
> +}
The initialization looks very complex. Can you explain why and what the
code is doing ?
> +static struct platform_driver renesas_cpuidle_driver = {
> + .probe = renesas_cpuidle_probe,
> + .driver = {
> + .name = "cpuidle-renesas",
> + .owner = THIS_MODULE,
> + },
> +};
> +
> +module_platform_driver(renesas_cpuidle_driver);
> +
> +MODULE_DESCRIPTION("Renesas cpuidle driver");
> +MODULE_LICENSE("GPL v2");
> diff --git a/include/linux/platform_data/renesas-cpuidle.h b/include/linux/platform_data/renesas-cpuidle.h
> new file mode 100644
> index 0000000..9446215
> --- /dev/null
> +++ b/include/linux/platform_data/renesas-cpuidle.h
> @@ -0,0 +1,24 @@
> +/*
> + * renesas-cpuidle.h -- CPUIdle support code for Renesas ARM
> + *
> + * Copyright (C) 2014 Renesas Electronics Corporation
> + *
> + * This file is subject to the terms and conditions of the GNU General Public
> + * License. See the file "COPYING" in the main directory of this archive
> + * for more details.
> + */
> +
> +#ifndef __RENESAS_CPUIDLE_H__
> +#define __RENESAS_CPUIDLE_H__
> +
> +struct renesas_cpuidle_driver {
> + unsigned int target_cpu;
> + struct cpuidle_driver *renesas_drv;
> +};
> +
> +struct renesas_cpuidle {
> + unsigned int num_drvs;
> + struct renesas_cpuidle_driver *rcd;
> +};
> +
> +#endif /* __RENESAS_CPUIDLE_H__ */
>
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [RFC/PATCH 4/6] ARM: shmobile: r8a7791: Add Core-Standby CPUIdle support for r8a7791
2015-03-04 4:55 ` Keita Kobayashi
@ 2015-03-05 18:11 ` Daniel Lezcano
-1 siblings, 0 replies; 34+ messages in thread
From: Daniel Lezcano @ 2015-03-05 18:11 UTC (permalink / raw)
To: Keita Kobayashi, horms, rjw; +Cc: linux-sh, linux-pm, magnus.damm
On 03/04/2015 05:55 AM, Keita Kobayashi wrote:
> This patch Add the wfi and Core-Standby for CPUIdle power states
> support for the r8a7791 SoC.
>
> Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
> ---
> arch/arm/mach-shmobile/pm-r8a7791.c | 41 +++++++++++++++++++++++++++++++++++++
> 1 file changed, 41 insertions(+)
>
> diff --git a/arch/arm/mach-shmobile/pm-r8a7791.c b/arch/arm/mach-shmobile/pm-r8a7791.c
> index 25f107b..6c00d37 100644
> --- a/arch/arm/mach-shmobile/pm-r8a7791.c
> +++ b/arch/arm/mach-shmobile/pm-r8a7791.c
> @@ -10,8 +10,13 @@
> * for more details.
> */
>
> +#include <linux/cpuidle.h>
> #include <linux/kernel.h>
> #include <linux/smp.h>
> +#include <linux/platform_data/renesas-cpuidle.h>
> +#include <linux/pm.h>
> +#include <asm/cpuidle.h>
> +#include <asm/cputype.h>
> #include <asm/io.h>
> #include "common.h"
> #include "pm-rcar.h"
> @@ -43,6 +48,41 @@ static inline void r8a7791_sysc_init(void) {}
>
> #endif /* CONFIG_SMP */
>
> +#ifdef CONFIG_ARM_RENESAS_CPUIDLE
> +static struct cpuidle_driver r8a7791_cpuidle_driver = {
> + .name = "rcar_r8a7791_cpuidle",
> + .owner = THIS_MODULE,
> + .states = {
> + [0] = ARM_CPUIDLE_WFI_STATE,
> + [1] = {
> + .name = "Core-Standby",
> + .desc = "Core Standby Mode",
> + .exit_latency = 2800,
> + .target_residency = 2800,
> + .enter = shmobile_smp_apmu_enter_cpuidle,
> + },
> + },
> + .state_count = 2,
> +};
It would be nice to have the code self contained. I am pretty sure this
possible to have the cpuidle bits into drivers/cpuidle and the low level
pm code here.
> +static struct renesas_cpuidle_driver r8a7791_cpuidle = {
> + .target_cpu = ARM_CPU_PART_CORTEX_A15,
> + .renesas_drv = &r8a7791_cpuidle_driver,
> +};
> +
> +static struct renesas_cpuidle r8a7791_data = {
> + .num_drvs = 1,
> + .rcd = &r8a7791_cpuidle,
> +};
> +
> +static void __init r8a7791_cpuidle_init(void)
> +{
> + shmobile_cpuidle_set_driver(&r8a7791_data);
> +}
> +#else
> +static void __init r8a7791_cpuidle_init(void) {}
> +#endif
> +
> void __init r8a7791_pm_init(void)
> {
> void __iomem *p;
> @@ -70,4 +110,5 @@ void __init r8a7791_pm_init(void)
>
> r8a7791_sysc_init();
> shmobile_smp_apmu_suspend_init();
> + r8a7791_cpuidle_init();
> }
>
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [RFC/PATCH 4/6] ARM: shmobile: r8a7791: Add Core-Standby CPUIdle support for r8a7791
@ 2015-03-05 18:11 ` Daniel Lezcano
0 siblings, 0 replies; 34+ messages in thread
From: Daniel Lezcano @ 2015-03-05 18:11 UTC (permalink / raw)
To: Keita Kobayashi, horms, rjw; +Cc: linux-sh, linux-pm, magnus.damm
On 03/04/2015 05:55 AM, Keita Kobayashi wrote:
> This patch Add the wfi and Core-Standby for CPUIdle power states
> support for the r8a7791 SoC.
>
> Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
> ---
> arch/arm/mach-shmobile/pm-r8a7791.c | 41 +++++++++++++++++++++++++++++++++++++
> 1 file changed, 41 insertions(+)
>
> diff --git a/arch/arm/mach-shmobile/pm-r8a7791.c b/arch/arm/mach-shmobile/pm-r8a7791.c
> index 25f107b..6c00d37 100644
> --- a/arch/arm/mach-shmobile/pm-r8a7791.c
> +++ b/arch/arm/mach-shmobile/pm-r8a7791.c
> @@ -10,8 +10,13 @@
> * for more details.
> */
>
> +#include <linux/cpuidle.h>
> #include <linux/kernel.h>
> #include <linux/smp.h>
> +#include <linux/platform_data/renesas-cpuidle.h>
> +#include <linux/pm.h>
> +#include <asm/cpuidle.h>
> +#include <asm/cputype.h>
> #include <asm/io.h>
> #include "common.h"
> #include "pm-rcar.h"
> @@ -43,6 +48,41 @@ static inline void r8a7791_sysc_init(void) {}
>
> #endif /* CONFIG_SMP */
>
> +#ifdef CONFIG_ARM_RENESAS_CPUIDLE
> +static struct cpuidle_driver r8a7791_cpuidle_driver = {
> + .name = "rcar_r8a7791_cpuidle",
> + .owner = THIS_MODULE,
> + .states = {
> + [0] = ARM_CPUIDLE_WFI_STATE,
> + [1] = {
> + .name = "Core-Standby",
> + .desc = "Core Standby Mode",
> + .exit_latency = 2800,
> + .target_residency = 2800,
> + .enter = shmobile_smp_apmu_enter_cpuidle,
> + },
> + },
> + .state_count = 2,
> +};
It would be nice to have the code self contained. I am pretty sure this
possible to have the cpuidle bits into drivers/cpuidle and the low level
pm code here.
> +static struct renesas_cpuidle_driver r8a7791_cpuidle = {
> + .target_cpu = ARM_CPU_PART_CORTEX_A15,
> + .renesas_drv = &r8a7791_cpuidle_driver,
> +};
> +
> +static struct renesas_cpuidle r8a7791_data = {
> + .num_drvs = 1,
> + .rcd = &r8a7791_cpuidle,
> +};
> +
> +static void __init r8a7791_cpuidle_init(void)
> +{
> + shmobile_cpuidle_set_driver(&r8a7791_data);
> +}
> +#else
> +static void __init r8a7791_cpuidle_init(void) {}
> +#endif
> +
> void __init r8a7791_pm_init(void)
> {
> void __iomem *p;
> @@ -70,4 +110,5 @@ void __init r8a7791_pm_init(void)
>
> r8a7791_sysc_init();
> shmobile_smp_apmu_suspend_init();
> + r8a7791_cpuidle_init();
> }
>
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [RFC/PATCH 5/6] ARM: shmobile: r8a7790: Add Core-Standby CPUIdle support for r8a7790
2015-03-04 4:55 ` Keita Kobayashi
@ 2015-03-05 18:13 ` Daniel Lezcano
-1 siblings, 0 replies; 34+ messages in thread
From: Daniel Lezcano @ 2015-03-05 18:13 UTC (permalink / raw)
To: Keita Kobayashi, horms, rjw; +Cc: linux-sh, linux-pm, magnus.damm
On 03/04/2015 05:55 AM, Keita Kobayashi wrote:
> Add the CPUIdle support power state support for the r8a7790 SoC.
> This patch add the wfi and Core-Standby for CPUIdle power states
> support for the Cortex-A15 and add the wfi power state support for
> the Cortex-A7.
>
> Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
> ---
> arch/arm/mach-shmobile/pm-r8a7790.c | 55 +++++++++++++++++++++++++++++++++++++
> 1 file changed, 55 insertions(+)
>
> diff --git a/arch/arm/mach-shmobile/pm-r8a7790.c b/arch/arm/mach-shmobile/pm-r8a7790.c
> index 80e8d95..6a3751f 100644
> --- a/arch/arm/mach-shmobile/pm-r8a7790.c
> +++ b/arch/arm/mach-shmobile/pm-r8a7790.c
> @@ -10,8 +10,13 @@
> * for more details.
> */
>
> +#include <linux/cpuidle.h>
> #include <linux/kernel.h>
> #include <linux/smp.h>
> +#include <linux/platform_data/renesas-cpuidle.h>
> +#include <linux/pm.h>
> +#include <asm/cpuidle.h>
> +#include <asm/cputype.h>
> #include <asm/io.h>
> #include "common.h"
> #include "pm-rcar.h"
> @@ -48,6 +53,55 @@ static inline void r8a7790_sysc_init(void) {}
>
> #endif /* CONFIG_SMP */
>
> +#ifdef CONFIG_ARM_RENESAS_CPUIDLE
> +static struct cpuidle_driver r8a7790_ca15_cpuidle_driver = {
> + .name = "rcar_r8a7790_ca15_cpuidle",
> + .owner = THIS_MODULE,
> + .states = {
> + [0] = ARM_CPUIDLE_WFI_STATE,
> + [1] = {
> + .name = "Core-Standby",
> + .desc = "Core Standby Mode",
> + .exit_latency = 3000,
> + .target_residency = 3000,
> + .enter = shmobile_smp_apmu_enter_cpuidle,
> + },
> + },
> + .state_count = 2,
> +};
> +
> +static struct cpuidle_driver r8a7790_ca7_cpuidle_driver = {
> + .name = "rcar_r8a7790_ca7_cpuidle",
> + .owner = THIS_MODULE,
> + .states[0] = ARM_CPUIDLE_WFI_STATE,
> + .safe_state_index = 0, /* C1 */
> + .state_count = 1,
> +};
> +
> +static struct renesas_cpuidle_driver r8a7790_cpuidle[] = {
> + [0] = {
> + .target_cpu = ARM_CPU_PART_CORTEX_A15,
> + .renesas_drv = &r8a7790_ca15_cpuidle_driver,
> + },
> + [1] = {
> + .target_cpu = ARM_CPU_PART_CORTEX_A7,
> + .renesas_drv = &r8a7790_ca7_cpuidle_driver,
> + },
> +};
Did you look if you can add your driver into
drivers/cpuidle/cpuidle-big-little.c ? I think you have all the
infrastructure already there.
> +static struct renesas_cpuidle r8a7790_data = {
> + .num_drvs = ARRAY_SIZE(r8a7790_cpuidle),
> + .rcd = r8a7790_cpuidle,
> +};
> +
> +static void __init r8a7790_cpuidle_init(void)
> +{
> + shmobile_cpuidle_set_driver(&r8a7790_data);
> +}
> +#else
> +static void __init r8a7790_cpuidle_init(void) {}
> +#endif
> +
> void __init r8a7790_pm_init(void)
> {
> void __iomem *p;
> @@ -79,4 +133,5 @@ void __init r8a7790_pm_init(void)
>
> r8a7790_sysc_init();
> shmobile_smp_apmu_suspend_init();
> + r8a7790_cpuidle_init();
> }
>
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [RFC/PATCH 5/6] ARM: shmobile: r8a7790: Add Core-Standby CPUIdle support for r8a7790
@ 2015-03-05 18:13 ` Daniel Lezcano
0 siblings, 0 replies; 34+ messages in thread
From: Daniel Lezcano @ 2015-03-05 18:13 UTC (permalink / raw)
To: Keita Kobayashi, horms, rjw; +Cc: linux-sh, linux-pm, magnus.damm
On 03/04/2015 05:55 AM, Keita Kobayashi wrote:
> Add the CPUIdle support power state support for the r8a7790 SoC.
> This patch add the wfi and Core-Standby for CPUIdle power states
> support for the Cortex-A15 and add the wfi power state support for
> the Cortex-A7.
>
> Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
> ---
> arch/arm/mach-shmobile/pm-r8a7790.c | 55 +++++++++++++++++++++++++++++++++++++
> 1 file changed, 55 insertions(+)
>
> diff --git a/arch/arm/mach-shmobile/pm-r8a7790.c b/arch/arm/mach-shmobile/pm-r8a7790.c
> index 80e8d95..6a3751f 100644
> --- a/arch/arm/mach-shmobile/pm-r8a7790.c
> +++ b/arch/arm/mach-shmobile/pm-r8a7790.c
> @@ -10,8 +10,13 @@
> * for more details.
> */
>
> +#include <linux/cpuidle.h>
> #include <linux/kernel.h>
> #include <linux/smp.h>
> +#include <linux/platform_data/renesas-cpuidle.h>
> +#include <linux/pm.h>
> +#include <asm/cpuidle.h>
> +#include <asm/cputype.h>
> #include <asm/io.h>
> #include "common.h"
> #include "pm-rcar.h"
> @@ -48,6 +53,55 @@ static inline void r8a7790_sysc_init(void) {}
>
> #endif /* CONFIG_SMP */
>
> +#ifdef CONFIG_ARM_RENESAS_CPUIDLE
> +static struct cpuidle_driver r8a7790_ca15_cpuidle_driver = {
> + .name = "rcar_r8a7790_ca15_cpuidle",
> + .owner = THIS_MODULE,
> + .states = {
> + [0] = ARM_CPUIDLE_WFI_STATE,
> + [1] = {
> + .name = "Core-Standby",
> + .desc = "Core Standby Mode",
> + .exit_latency = 3000,
> + .target_residency = 3000,
> + .enter = shmobile_smp_apmu_enter_cpuidle,
> + },
> + },
> + .state_count = 2,
> +};
> +
> +static struct cpuidle_driver r8a7790_ca7_cpuidle_driver = {
> + .name = "rcar_r8a7790_ca7_cpuidle",
> + .owner = THIS_MODULE,
> + .states[0] = ARM_CPUIDLE_WFI_STATE,
> + .safe_state_index = 0, /* C1 */
> + .state_count = 1,
> +};
> +
> +static struct renesas_cpuidle_driver r8a7790_cpuidle[] = {
> + [0] = {
> + .target_cpu = ARM_CPU_PART_CORTEX_A15,
> + .renesas_drv = &r8a7790_ca15_cpuidle_driver,
> + },
> + [1] = {
> + .target_cpu = ARM_CPU_PART_CORTEX_A7,
> + .renesas_drv = &r8a7790_ca7_cpuidle_driver,
> + },
> +};
Did you look if you can add your driver into
drivers/cpuidle/cpuidle-big-little.c ? I think you have all the
infrastructure already there.
> +static struct renesas_cpuidle r8a7790_data = {
> + .num_drvs = ARRAY_SIZE(r8a7790_cpuidle),
> + .rcd = r8a7790_cpuidle,
> +};
> +
> +static void __init r8a7790_cpuidle_init(void)
> +{
> + shmobile_cpuidle_set_driver(&r8a7790_data);
> +}
> +#else
> +static void __init r8a7790_cpuidle_init(void) {}
> +#endif
> +
> void __init r8a7790_pm_init(void)
> {
> void __iomem *p;
> @@ -79,4 +133,5 @@ void __init r8a7790_pm_init(void)
>
> r8a7790_sysc_init();
> shmobile_smp_apmu_suspend_init();
> + r8a7790_cpuidle_init();
> }
>
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [RFC/PATCH 0/6] Add CPUIdle support for Renesas SoCs
2015-03-05 18:02 ` Daniel Lezcano
@ 2015-03-06 9:38 ` keita kobayashi
-1 siblings, 0 replies; 34+ messages in thread
From: keita kobayashi @ 2015-03-06 9:38 UTC (permalink / raw)
To: Daniel Lezcano; +Cc: horms, rjw, linux-sh, linux-pm, magnus.damm
Hi Daniel
(2015/03/06 3:02), Daniel Lezcano wrote:
> On 03/04/2015 05:55 AM, Keita Kobayashi wrote:
>> Hello
>>
>> These patches add CPUIdle support for Renesas SoCs.
>> These patches have been tested on Renesas Gen2 series with
>> following cases on renesas-devel-20150301-v4.0-rc1 tag.
>>
>> [Test case]
>> a. Lager board(CA15 * 4)
>> b. Lager board(CA7 * 4)
>> c. Lager board(CA15 * 4 + CA7 *4)
>> d. Koelsch board(CA15 * 2)
>>
>> These cases work fine.
>>
>> Keita Kobayashi (6):
>> cpuidle: renesas: Add CPUIdle Driver for Renesas SoCs
>> ARM: shmobile: Change CPUIdle InterFace
>> ARM: shmobile: APMU: Add Core-Standby function for CPUIdle
>> ARM: shmobile: r8a7791: Add Core-Standby CPUIdle support for r8a7791
>> ARM: shmobile: r8a7790: Add Core-Standby CPUIdle support for r8a7790
>> ARM: shmobile: Enable Renesas CPUIdle for shmobile_defconfig
>>
>> arch/arm/configs/shmobile_defconfig | 2 +
>> arch/arm/mach-shmobile/common.h | 8 +-
>> arch/arm/mach-shmobile/cpuidle.c | 31 ++++---
>> arch/arm/mach-shmobile/platsmp-apmu.c | 20 ++++-
>> arch/arm/mach-shmobile/pm-r8a7790.c | 55 ++++++++++++
>> arch/arm/mach-shmobile/pm-r8a7791.c | 41 +++++++++
>> drivers/cpuidle/Kconfig.arm | 8 ++
>> drivers/cpuidle/Makefile | 1 +
>> drivers/cpuidle/cpuidle-renesas.c | 118 ++++++++++++++++++++++++++
>> include/linux/platform_data/renesas-cpuidle.h | 24 ++++++
>> 10 files changed, 294 insertions(+), 14 deletions(-)
>> create mode 100644 drivers/cpuidle/cpuidle-renesas.c
>> create mode 100644 include/linux/platform_data/renesas-cpuidle.h
>
> Hi Keita,
>
> the platform approach to pass private data from the arch specific to the cpuidle driver no longer accepted. Unfortunately, there is no alternate solution upstream.
>
> But hopefully, there is a patchset [1] submitted for upstreaming which unify arm32/64 into a single generic cpuidle driver and use the DT to define the idle functions to be used.
>
> I suggest you have a look at this patchset if it can fit your need.
>
> -- Daniel
>
> [1] https://lkml.org/lkml/2015/3/3/271
Thank you for information.
I will take a look at the patch series.
Regards.
Keita Kobayashi
>
>
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [RFC/PATCH 0/6] Add CPUIdle support for Renesas SoCs
@ 2015-03-06 9:38 ` keita kobayashi
0 siblings, 0 replies; 34+ messages in thread
From: keita kobayashi @ 2015-03-06 9:38 UTC (permalink / raw)
To: Daniel Lezcano; +Cc: horms, rjw, linux-sh, linux-pm, magnus.damm
Hi Daniel
(2015/03/06 3:02), Daniel Lezcano wrote:
> On 03/04/2015 05:55 AM, Keita Kobayashi wrote:
>> Hello
>>
>> These patches add CPUIdle support for Renesas SoCs.
>> These patches have been tested on Renesas Gen2 series with
>> following cases on renesas-devel-20150301-v4.0-rc1 tag.
>>
>> [Test case]
>> a. Lager board(CA15 * 4)
>> b. Lager board(CA7 * 4)
>> c. Lager board(CA15 * 4 + CA7 *4)
>> d. Koelsch board(CA15 * 2)
>>
>> These cases work fine.
>>
>> Keita Kobayashi (6):
>> cpuidle: renesas: Add CPUIdle Driver for Renesas SoCs
>> ARM: shmobile: Change CPUIdle InterFace
>> ARM: shmobile: APMU: Add Core-Standby function for CPUIdle
>> ARM: shmobile: r8a7791: Add Core-Standby CPUIdle support for r8a7791
>> ARM: shmobile: r8a7790: Add Core-Standby CPUIdle support for r8a7790
>> ARM: shmobile: Enable Renesas CPUIdle for shmobile_defconfig
>>
>> arch/arm/configs/shmobile_defconfig | 2 +
>> arch/arm/mach-shmobile/common.h | 8 +-
>> arch/arm/mach-shmobile/cpuidle.c | 31 ++++---
>> arch/arm/mach-shmobile/platsmp-apmu.c | 20 ++++-
>> arch/arm/mach-shmobile/pm-r8a7790.c | 55 ++++++++++++
>> arch/arm/mach-shmobile/pm-r8a7791.c | 41 +++++++++
>> drivers/cpuidle/Kconfig.arm | 8 ++
>> drivers/cpuidle/Makefile | 1 +
>> drivers/cpuidle/cpuidle-renesas.c | 118 ++++++++++++++++++++++++++
>> include/linux/platform_data/renesas-cpuidle.h | 24 ++++++
>> 10 files changed, 294 insertions(+), 14 deletions(-)
>> create mode 100644 drivers/cpuidle/cpuidle-renesas.c
>> create mode 100644 include/linux/platform_data/renesas-cpuidle.h
>
> Hi Keita,
>
> the platform approach to pass private data from the arch specific to the cpuidle driver no longer accepted. Unfortunately, there is no alternate solution upstream.
>
> But hopefully, there is a patchset [1] submitted for upstreaming which unify arm32/64 into a single generic cpuidle driver and use the DT to define the idle functions to be used.
>
> I suggest you have a look at this patchset if it can fit your need.
>
> -- Daniel
>
> [1] https://lkml.org/lkml/2015/3/3/271
Thank you for information.
I will take a look at the patch series.
Regards.
Keita Kobayashi
>
>
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [RFC/PATCH 0/6] Add CPUIdle support for Renesas SoCs
2015-03-06 9:38 ` keita kobayashi
@ 2015-03-09 15:21 ` Lina Iyer
-1 siblings, 0 replies; 34+ messages in thread
From: Lina Iyer @ 2015-03-09 15:21 UTC (permalink / raw)
To: keita kobayashi
Cc: Daniel Lezcano, horms, rjw, linux-sh, linux-pm, magnus.damm
On Fri, Mar 06 2015 at 02:38 -0700, keita kobayashi wrote:
>Hi Daniel
>
>(2015/03/06 3:02), Daniel Lezcano wrote:
>
>> On 03/04/2015 05:55 AM, Keita Kobayashi wrote:
>>> Hello
>>>
>>> These patches add CPUIdle support for Renesas SoCs.
>>> These patches have been tested on Renesas Gen2 series with
>>> following cases on renesas-devel-20150301-v4.0-rc1 tag.
>>>
>>> [Test case]
>>> a. Lager board(CA15 * 4)
>>> b. Lager board(CA7 * 4)
>>> c. Lager board(CA15 * 4 + CA7 *4)
>>> d. Koelsch board(CA15 * 2)
>>>
>>> These cases work fine.
>>>
>>> Keita Kobayashi (6):
>>> cpuidle: renesas: Add CPUIdle Driver for Renesas SoCs
>>> ARM: shmobile: Change CPUIdle InterFace
>>> ARM: shmobile: APMU: Add Core-Standby function for CPUIdle
>>> ARM: shmobile: r8a7791: Add Core-Standby CPUIdle support for r8a7791
>>> ARM: shmobile: r8a7790: Add Core-Standby CPUIdle support for r8a7790
>>> ARM: shmobile: Enable Renesas CPUIdle for shmobile_defconfig
>>>
>>> arch/arm/configs/shmobile_defconfig | 2 +
>>> arch/arm/mach-shmobile/common.h | 8 +-
>>> arch/arm/mach-shmobile/cpuidle.c | 31 ++++---
>>> arch/arm/mach-shmobile/platsmp-apmu.c | 20 ++++-
>>> arch/arm/mach-shmobile/pm-r8a7790.c | 55 ++++++++++++
>>> arch/arm/mach-shmobile/pm-r8a7791.c | 41 +++++++++
>>> drivers/cpuidle/Kconfig.arm | 8 ++
>>> drivers/cpuidle/Makefile | 1 +
>>> drivers/cpuidle/cpuidle-renesas.c | 118 ++++++++++++++++++++++++++
>>> include/linux/platform_data/renesas-cpuidle.h | 24 ++++++
>>> 10 files changed, 294 insertions(+), 14 deletions(-)
>>> create mode 100644 drivers/cpuidle/cpuidle-renesas.c
>>> create mode 100644 include/linux/platform_data/renesas-cpuidle.h
>>
>> Hi Keita,
>>
>> the platform approach to pass private data from the arch specific to the cpuidle driver no longer accepted. Unfortunately, there is no alternate solution upstream.
>>
>> But hopefully, there is a patchset [1] submitted for upstreaming which unify arm32/64 into a single generic cpuidle driver and use the DT to define the idle functions to be used.
>>
>> I suggest you have a look at this patchset if it can fit your need.
>>
>> -- Daniel
>>
>> [1] https://lkml.org/lkml/2015/3/3/271
>
>Thank you for information.
>I will take a look at the patch series.
Hi Kieta,
Please also have a look at the v15 of the cpuidle support for QCOM SoC.
Sent just now. It is based on [1].
Thanks,
Lina
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [RFC/PATCH 0/6] Add CPUIdle support for Renesas SoCs
@ 2015-03-09 15:21 ` Lina Iyer
0 siblings, 0 replies; 34+ messages in thread
From: Lina Iyer @ 2015-03-09 15:21 UTC (permalink / raw)
To: keita kobayashi
Cc: Daniel Lezcano, horms, rjw, linux-sh, linux-pm, magnus.damm
On Fri, Mar 06 2015 at 02:38 -0700, keita kobayashi wrote:
>Hi Daniel
>
>(2015/03/06 3:02), Daniel Lezcano wrote:
>
>> On 03/04/2015 05:55 AM, Keita Kobayashi wrote:
>>> Hello
>>>
>>> These patches add CPUIdle support for Renesas SoCs.
>>> These patches have been tested on Renesas Gen2 series with
>>> following cases on renesas-devel-20150301-v4.0-rc1 tag.
>>>
>>> [Test case]
>>> a. Lager board(CA15 * 4)
>>> b. Lager board(CA7 * 4)
>>> c. Lager board(CA15 * 4 + CA7 *4)
>>> d. Koelsch board(CA15 * 2)
>>>
>>> These cases work fine.
>>>
>>> Keita Kobayashi (6):
>>> cpuidle: renesas: Add CPUIdle Driver for Renesas SoCs
>>> ARM: shmobile: Change CPUIdle InterFace
>>> ARM: shmobile: APMU: Add Core-Standby function for CPUIdle
>>> ARM: shmobile: r8a7791: Add Core-Standby CPUIdle support for r8a7791
>>> ARM: shmobile: r8a7790: Add Core-Standby CPUIdle support for r8a7790
>>> ARM: shmobile: Enable Renesas CPUIdle for shmobile_defconfig
>>>
>>> arch/arm/configs/shmobile_defconfig | 2 +
>>> arch/arm/mach-shmobile/common.h | 8 +-
>>> arch/arm/mach-shmobile/cpuidle.c | 31 ++++---
>>> arch/arm/mach-shmobile/platsmp-apmu.c | 20 ++++-
>>> arch/arm/mach-shmobile/pm-r8a7790.c | 55 ++++++++++++
>>> arch/arm/mach-shmobile/pm-r8a7791.c | 41 +++++++++
>>> drivers/cpuidle/Kconfig.arm | 8 ++
>>> drivers/cpuidle/Makefile | 1 +
>>> drivers/cpuidle/cpuidle-renesas.c | 118 ++++++++++++++++++++++++++
>>> include/linux/platform_data/renesas-cpuidle.h | 24 ++++++
>>> 10 files changed, 294 insertions(+), 14 deletions(-)
>>> create mode 100644 drivers/cpuidle/cpuidle-renesas.c
>>> create mode 100644 include/linux/platform_data/renesas-cpuidle.h
>>
>> Hi Keita,
>>
>> the platform approach to pass private data from the arch specific to the cpuidle driver no longer accepted. Unfortunately, there is no alternate solution upstream.
>>
>> But hopefully, there is a patchset [1] submitted for upstreaming which unify arm32/64 into a single generic cpuidle driver and use the DT to define the idle functions to be used.
>>
>> I suggest you have a look at this patchset if it can fit your need.
>>
>> -- Daniel
>>
>> [1] https://lkml.org/lkml/2015/3/3/271
>
>Thank you for information.
>I will take a look at the patch series.
Hi Kieta,
Please also have a look at the v15 of the cpuidle support for QCOM SoC.
Sent just now. It is based on [1].
Thanks,
Lina
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [RFC/PATCH 0/6] Add CPUIdle support for Renesas SoCs
2015-03-09 15:21 ` Lina Iyer
@ 2015-03-09 15:32 ` Daniel Lezcano
-1 siblings, 0 replies; 34+ messages in thread
From: Daniel Lezcano @ 2015-03-09 15:32 UTC (permalink / raw)
To: keita kobayashi; +Cc: Lina Iyer, horms, rjw, linux-sh, linux-pm, magnus.damm
On 03/09/2015 04:21 PM, Lina Iyer wrote:
> On Fri, Mar 06 2015 at 02:38 -0700, keita kobayashi wrote:
>> Hi Daniel
[ ... ]
>>>
>>> Hi Keita,
>>>
>>> the platform approach to pass private data from the arch specific to
>>> the cpuidle driver no longer accepted. Unfortunately, there is no
>>> alternate solution upstream.
>>>
>>> But hopefully, there is a patchset [1] submitted for upstreaming
>>> which unify arm32/64 into a single generic cpuidle driver and use the
>>> DT to define the idle functions to be used.
>>>
>>> I suggest you have a look at this patchset if it can fit your need.
>>>
>>> -- Daniel
>>>
>>> [1] https://lkml.org/lkml/2015/3/3/271
>>
>> Thank you for information.
>> I will take a look at the patch series.
>
> Hi Kieta,
>
> Please also have a look at the v15 of the cpuidle support for QCOM SoC.
> Sent just now. It is based on [1].
Lina's patchset is available at:
https://www.mail-archive.com/devicetree@vger.kernel.org/msg64700.html
Thanks
-- Daniel
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [RFC/PATCH 0/6] Add CPUIdle support for Renesas SoCs
@ 2015-03-09 15:32 ` Daniel Lezcano
0 siblings, 0 replies; 34+ messages in thread
From: Daniel Lezcano @ 2015-03-09 15:32 UTC (permalink / raw)
To: keita kobayashi; +Cc: Lina Iyer, horms, rjw, linux-sh, linux-pm, magnus.damm
On 03/09/2015 04:21 PM, Lina Iyer wrote:
> On Fri, Mar 06 2015 at 02:38 -0700, keita kobayashi wrote:
>> Hi Daniel
[ ... ]
>>>
>>> Hi Keita,
>>>
>>> the platform approach to pass private data from the arch specific to
>>> the cpuidle driver no longer accepted. Unfortunately, there is no
>>> alternate solution upstream.
>>>
>>> But hopefully, there is a patchset [1] submitted for upstreaming
>>> which unify arm32/64 into a single generic cpuidle driver and use the
>>> DT to define the idle functions to be used.
>>>
>>> I suggest you have a look at this patchset if it can fit your need.
>>>
>>> -- Daniel
>>>
>>> [1] https://lkml.org/lkml/2015/3/3/271
>>
>> Thank you for information.
>> I will take a look at the patch series.
>
> Hi Kieta,
>
> Please also have a look at the v15 of the cpuidle support for QCOM SoC.
> Sent just now. It is based on [1].
Lina's patchset is available at:
https://www.mail-archive.com/devicetree@vger.kernel.org/msg64700.html
Thanks
-- Daniel
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [RFC/PATCH 0/6] Add CPUIdle support for Renesas SoCs
2015-03-09 15:32 ` Daniel Lezcano
@ 2015-03-13 5:01 ` keita kobayashi
-1 siblings, 0 replies; 34+ messages in thread
From: keita kobayashi @ 2015-03-13 5:01 UTC (permalink / raw)
To: Daniel Lezcano; +Cc: Lina Iyer, horms, rjw, linux-sh, linux-pm, magnus.damm
Hi Daniel, Lina
Sorry for late reply.
(2015/03/10 0:32), Daniel Lezcano wrote:
> On 03/09/2015 04:21 PM, Lina Iyer wrote:
>> On Fri, Mar 06 2015 at 02:38 -0700, keita kobayashi wrote:
>>> Hi Daniel
>
> [ ... ]
>
>>>>
>>>> Hi Keita,
>>>>
>>>> the platform approach to pass private data from the arch specific to
>>>> the cpuidle driver no longer accepted. Unfortunately, there is no
>>>> alternate solution upstream.
>>>>
>>>> But hopefully, there is a patchset [1] submitted for upstreaming
>>>> which unify arm32/64 into a single generic cpuidle driver and use the
>>>> DT to define the idle functions to be used.
>>>>
>>>> I suggest you have a look at this patchset if it can fit your need.
>>>>
>>>> -- Daniel
>>>>
>>>> [1] https://lkml.org/lkml/2015/3/3/271
>>>
>>> Thank you for information.
>>> I will take a look at the patch series.
>>
>> Hi Kieta,
>>
>> Please also have a look at the v15 of the cpuidle support for QCOM SoC.
>> Sent just now. It is based on [1].
> > Lina's patchset is available at:
>
> https://www.mail-archive.com/devicetree@vger.kernel.org/msg64700.html
>
> Thanks
> -- Daniel
>
Thank you for information.
I will confirm it.
Regards.
Keita Kobayashi
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [RFC/PATCH 0/6] Add CPUIdle support for Renesas SoCs
@ 2015-03-13 5:01 ` keita kobayashi
0 siblings, 0 replies; 34+ messages in thread
From: keita kobayashi @ 2015-03-13 5:01 UTC (permalink / raw)
To: Daniel Lezcano; +Cc: Lina Iyer, horms, rjw, linux-sh, linux-pm, magnus.damm
Hi Daniel, Lina
Sorry for late reply.
(2015/03/10 0:32), Daniel Lezcano wrote:
> On 03/09/2015 04:21 PM, Lina Iyer wrote:
>> On Fri, Mar 06 2015 at 02:38 -0700, keita kobayashi wrote:
>>> Hi Daniel
>
> [ ... ]
>
>>>>
>>>> Hi Keita,
>>>>
>>>> the platform approach to pass private data from the arch specific to
>>>> the cpuidle driver no longer accepted. Unfortunately, there is no
>>>> alternate solution upstream.
>>>>
>>>> But hopefully, there is a patchset [1] submitted for upstreaming
>>>> which unify arm32/64 into a single generic cpuidle driver and use the
>>>> DT to define the idle functions to be used.
>>>>
>>>> I suggest you have a look at this patchset if it can fit your need.
>>>>
>>>> -- Daniel
>>>>
>>>> [1] https://lkml.org/lkml/2015/3/3/271
>>>
>>> Thank you for information.
>>> I will take a look at the patch series.
>>
>> Hi Kieta,
>>
>> Please also have a look at the v15 of the cpuidle support for QCOM SoC.
>> Sent just now. It is based on [1].
> > Lina's patchset is available at:
>
> https://www.mail-archive.com/devicetree@vger.kernel.org/msg64700.html
>
> Thanks
> -- Daniel
>
Thank you for information.
I will confirm it.
Regards.
Keita Kobayashi
^ permalink raw reply [flat|nested] 34+ messages in thread
end of thread, other threads:[~2015-03-13 5:02 UTC | newest]
Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-04 4:55 [RFC/PATCH 0/6] Add CPUIdle support for Renesas SoCs Keita Kobayashi
2015-03-04 4:55 ` Keita Kobayashi
2015-03-04 4:55 ` [RFC/PATCH 1/6] cpuidle: renesas: Add CPUIdle Driver " Keita Kobayashi
2015-03-04 4:55 ` Keita Kobayashi
2015-03-05 18:05 ` Daniel Lezcano
2015-03-05 18:05 ` Daniel Lezcano
2015-03-04 4:55 ` [RFC/PATCH 2/6] ARM: shmobile: Change CPUIdle InterFace Keita Kobayashi
2015-03-04 4:55 ` Keita Kobayashi
2015-03-04 4:55 ` [RFC/PATCH 3/6] ARM: shmobile: APMU: Add Core-Standby function for CPUIdle Keita Kobayashi
2015-03-04 4:55 ` Keita Kobayashi
2015-03-04 4:55 ` [RFC/PATCH 4/6] ARM: shmobile: r8a7791: Add Core-Standby CPUIdle support for r8a7791 Keita Kobayashi
2015-03-04 4:55 ` Keita Kobayashi
[not found] ` <CAKDJKT6vx8xhHtxCerXen0NqRao5d5hzZdj8LtSJ4hiMjhZXdA@mail.gmail.com>
2015-03-05 0:29 ` Simon Horman
2015-03-05 0:29 ` Simon Horman
2015-03-05 1:19 ` keita kobayashi
2015-03-05 1:19 ` keita kobayashi
2015-03-05 18:11 ` Daniel Lezcano
2015-03-05 18:11 ` Daniel Lezcano
2015-03-04 4:55 ` [RFC/PATCH 5/6] ARM: shmobile: r8a7790: Add Core-Standby CPUIdle support for r8a7790 Keita Kobayashi
2015-03-04 4:55 ` Keita Kobayashi
2015-03-05 18:13 ` Daniel Lezcano
2015-03-05 18:13 ` Daniel Lezcano
2015-03-04 4:55 ` [RFC/PATCH 6/6] ARM: shmobile: Enable Renesas CPUIdle for shmobile_defconfig Keita Kobayashi
2015-03-04 4:55 ` Keita Kobayashi
2015-03-05 18:02 ` [RFC/PATCH 0/6] Add CPUIdle support for Renesas SoCs Daniel Lezcano
2015-03-05 18:02 ` Daniel Lezcano
2015-03-06 9:38 ` keita kobayashi
2015-03-06 9:38 ` keita kobayashi
2015-03-09 15:21 ` Lina Iyer
2015-03-09 15:21 ` Lina Iyer
2015-03-09 15:32 ` Daniel Lezcano
2015-03-09 15:32 ` Daniel Lezcano
2015-03-13 5:01 ` keita kobayashi
2015-03-13 5:01 ` 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.