* [PATCH V4 01/20] ARM: exynos: cpuidle: Prevent forward declaration
2014-04-10 9:55 [PATCH V4 00/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle Daniel Lezcano
@ 2014-04-10 9:55 ` Daniel Lezcano
2014-04-10 9:55 ` [PATCH V4 02/20] ARM: exynos: cpuidle: Use cpuidle_register Daniel Lezcano
` (18 subsequent siblings)
19 siblings, 0 replies; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-10 9:55 UTC (permalink / raw)
To: linux-arm-kernel
Move the structure below the 'exynos4_enter_lowpower' function so no more
need of forward declaration.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/cpuidle.c | 40 ++++++++++++++++++----------------------
1 file changed, 18 insertions(+), 22 deletions(-)
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index b530231..9623a05 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -59,30 +59,8 @@
#define PWR_CTRL2_CORE2_UP_RATIO (1 << 4)
#define PWR_CTRL2_CORE1_UP_RATIO (1 << 0)
-static int exynos4_enter_lowpower(struct cpuidle_device *dev,
- struct cpuidle_driver *drv,
- int index);
-
static DEFINE_PER_CPU(struct cpuidle_device, exynos4_cpuidle_device);
-static struct cpuidle_driver exynos4_idle_driver = {
- .name = "exynos4_idle",
- .owner = THIS_MODULE,
- .states = {
- [0] = ARM_CPUIDLE_WFI_STATE,
- [1] = {
- .enter = exynos4_enter_lowpower,
- .exit_latency = 300,
- .target_residency = 100000,
- .flags = CPUIDLE_FLAG_TIME_VALID,
- .name = "C1",
- .desc = "ARM power down",
- },
- },
- .state_count = 2,
- .safe_state_index = 0,
-};
-
/* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */
static void exynos4_set_wakeupmask(void)
{
@@ -213,6 +191,24 @@ static void __init exynos5_core_down_clk(void)
__raw_writel(tmp, EXYNOS5_PWR_CTRL2);
}
+static struct cpuidle_driver exynos4_idle_driver = {
+ .name = "exynos4_idle",
+ .owner = THIS_MODULE,
+ .states = {
+ [0] = ARM_CPUIDLE_WFI_STATE,
+ [1] = {
+ .enter = exynos4_enter_lowpower,
+ .exit_latency = 300,
+ .target_residency = 100000,
+ .flags = CPUIDLE_FLAG_TIME_VALID,
+ .name = "C1",
+ .desc = "ARM power down",
+ },
+ },
+ .state_count = 2,
+ .safe_state_index = 0,
+};
+
static int exynos_cpuidle_probe(struct platform_device *pdev)
{
int cpu_id, ret;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH V4 02/20] ARM: exynos: cpuidle: Use cpuidle_register
2014-04-10 9:55 [PATCH V4 00/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle Daniel Lezcano
2014-04-10 9:55 ` [PATCH V4 01/20] ARM: exynos: cpuidle: Prevent forward declaration Daniel Lezcano
@ 2014-04-10 9:55 ` Daniel Lezcano
2014-04-10 9:55 ` [PATCH V4 03/20] ARM: exynos: cpuidle: Change function name prefix Daniel Lezcano
` (17 subsequent siblings)
19 siblings, 0 replies; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-10 9:55 UTC (permalink / raw)
To: linux-arm-kernel
Use the cpuidle generic function 'cpuidle_register'. That saves us from some
extra lines of code and unneeded variables.
A side effect of this change is a bug fix where before the cpuidle driver was
registered for each_online_cpu and now it is for each_possible_cpu.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/cpuidle.c | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index 9623a05..b7cd75b 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -59,8 +59,6 @@
#define PWR_CTRL2_CORE2_UP_RATIO (1 << 4)
#define PWR_CTRL2_CORE1_UP_RATIO (1 << 0)
-static DEFINE_PER_CPU(struct cpuidle_device, exynos4_cpuidle_device);
-
/* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */
static void exynos4_set_wakeupmask(void)
{
@@ -211,8 +209,7 @@ static struct cpuidle_driver exynos4_idle_driver = {
static int exynos_cpuidle_probe(struct platform_device *pdev)
{
- int cpu_id, ret;
- struct cpuidle_device *device;
+ int ret;
if (soc_is_exynos5250())
exynos5_core_down_clk();
@@ -220,23 +217,12 @@ static int exynos_cpuidle_probe(struct platform_device *pdev)
if (soc_is_exynos5440())
exynos4_idle_driver.state_count = 1;
- ret = cpuidle_register_driver(&exynos4_idle_driver);
+ ret = cpuidle_register(&exynos4_idle_driver, NULL);
if (ret) {
dev_err(&pdev->dev, "failed to register cpuidle driver\n");
return ret;
}
- for_each_online_cpu(cpu_id) {
- device = &per_cpu(exynos4_cpuidle_device, cpu_id);
- device->cpu = cpu_id;
-
- ret = cpuidle_register_device(device);
- if (ret) {
- dev_err(&pdev->dev, "failed to register cpuidle device\n");
- return ret;
- }
- }
-
return 0;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH V4 03/20] ARM: exynos: cpuidle: Change function name prefix
2014-04-10 9:55 [PATCH V4 00/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle Daniel Lezcano
2014-04-10 9:55 ` [PATCH V4 01/20] ARM: exynos: cpuidle: Prevent forward declaration Daniel Lezcano
2014-04-10 9:55 ` [PATCH V4 02/20] ARM: exynos: cpuidle: Use cpuidle_register Daniel Lezcano
@ 2014-04-10 9:55 ` Daniel Lezcano
2014-04-10 9:55 ` [PATCH V4 04/20] ARM: exynos: cpuidle: Encapsulate register access inside a function Daniel Lezcano
` (16 subsequent siblings)
19 siblings, 0 replies; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-10 9:55 UTC (permalink / raw)
To: linux-arm-kernel
The driver was initially written for exynos4 but the driver is used also for
exynos5.
Change the function prefix name exynos4 -> exynos
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/cpuidle.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index b7cd75b..16e3325 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -60,7 +60,7 @@
#define PWR_CTRL2_CORE1_UP_RATIO (1 << 0)
/* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */
-static void exynos4_set_wakeupmask(void)
+static void exynos_set_wakeupmask(void)
{
__raw_writel(0x0000ff3e, S5P_WAKEUP_MASK);
}
@@ -91,13 +91,13 @@ static int idle_finisher(unsigned long flags)
return 1;
}
-static int exynos4_enter_core0_aftr(struct cpuidle_device *dev,
+static int exynos_enter_core0_aftr(struct cpuidle_device *dev,
struct cpuidle_driver *drv,
int index)
{
unsigned long tmp;
- exynos4_set_wakeupmask();
+ exynos_set_wakeupmask();
/* Set value of power down register for aftr mode */
exynos_sys_powerdown_conf(SYS_AFTR);
@@ -141,7 +141,7 @@ static int exynos4_enter_core0_aftr(struct cpuidle_device *dev,
return index;
}
-static int exynos4_enter_lowpower(struct cpuidle_device *dev,
+static int exynos_enter_lowpower(struct cpuidle_device *dev,
struct cpuidle_driver *drv,
int index)
{
@@ -154,7 +154,7 @@ static int exynos4_enter_lowpower(struct cpuidle_device *dev,
if (new_index == 0)
return arm_cpuidle_simple_enter(dev, drv, new_index);
else
- return exynos4_enter_core0_aftr(dev, drv, new_index);
+ return exynos_enter_core0_aftr(dev, drv, new_index);
}
static void __init exynos5_core_down_clk(void)
@@ -189,13 +189,13 @@ static void __init exynos5_core_down_clk(void)
__raw_writel(tmp, EXYNOS5_PWR_CTRL2);
}
-static struct cpuidle_driver exynos4_idle_driver = {
- .name = "exynos4_idle",
+static struct cpuidle_driver exynos_idle_driver = {
+ .name = "exynos_idle",
.owner = THIS_MODULE,
.states = {
[0] = ARM_CPUIDLE_WFI_STATE,
[1] = {
- .enter = exynos4_enter_lowpower,
+ .enter = exynos_enter_lowpower,
.exit_latency = 300,
.target_residency = 100000,
.flags = CPUIDLE_FLAG_TIME_VALID,
@@ -215,9 +215,9 @@ static int exynos_cpuidle_probe(struct platform_device *pdev)
exynos5_core_down_clk();
if (soc_is_exynos5440())
- exynos4_idle_driver.state_count = 1;
+ exynos_idle_driver.state_count = 1;
- ret = cpuidle_register(&exynos4_idle_driver, NULL);
+ ret = cpuidle_register(&exynos_idle_driver, NULL);
if (ret) {
dev_err(&pdev->dev, "failed to register cpuidle driver\n");
return ret;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH V4 04/20] ARM: exynos: cpuidle: Encapsulate register access inside a function
2014-04-10 9:55 [PATCH V4 00/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle Daniel Lezcano
` (2 preceding siblings ...)
2014-04-10 9:55 ` [PATCH V4 03/20] ARM: exynos: cpuidle: Change function name prefix Daniel Lezcano
@ 2014-04-10 9:55 ` Daniel Lezcano
2014-04-10 9:55 ` [PATCH V4 05/20] ARM: exynos: cpuidle: Move some code inside the idle_finisher Daniel Lezcano
` (15 subsequent siblings)
19 siblings, 0 replies; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-10 9:55 UTC (permalink / raw)
To: linux-arm-kernel
That makes the code cleaner and encapsulted. The function will be reused in the
next patch.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/pm.c | 65 ++++++++++++++++++++++++++++-----------------
1 file changed, 41 insertions(+), 24 deletions(-)
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index 15af0ce..adfdf4b 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -103,6 +103,42 @@ static int exynos_irq_set_wake(struct irq_data *data, unsigned int state)
/* For Cortex-A9 Diagnostic and Power control register */
static unsigned int save_arm_register[2];
+static void exynos_cpu_save_register(void)
+{
+ unsigned long tmp;
+
+ /* Save Power control register */
+ asm ("mrc p15, 0, %0, c15, c0, 0"
+ : "=r" (tmp) : : "cc");
+
+ save_arm_register[0] = tmp;
+
+ /* Save Diagnostic register */
+ asm ("mrc p15, 0, %0, c15, c0, 1"
+ : "=r" (tmp) : : "cc");
+
+ save_arm_register[1] = tmp;
+}
+
+static void exynos_cpu_restore_register(void)
+{
+ unsigned long tmp;
+
+ /* Restore Power control register */
+ tmp = save_arm_register[0];
+
+ asm volatile ("mcr p15, 0, %0, c15, c0, 0"
+ : : "r" (tmp)
+ : "cc");
+
+ /* Restore Diagnostic register */
+ tmp = save_arm_register[1];
+
+ asm volatile ("mcr p15, 0, %0, c15, c0, 1"
+ : : "r" (tmp)
+ : "cc");
+}
+
static int exynos_cpu_suspend(unsigned long arg)
{
#ifdef CONFIG_CACHE_L2X0
@@ -162,17 +198,8 @@ static int exynos_pm_suspend(void)
tmp = (S5P_USE_STANDBY_WFI0 | S5P_USE_STANDBY_WFE0);
__raw_writel(tmp, S5P_CENTRAL_SEQ_OPTION);
- if (!soc_is_exynos5250()) {
- /* Save Power control register */
- asm ("mrc p15, 0, %0, c15, c0, 0"
- : "=r" (tmp) : : "cc");
- save_arm_register[0] = tmp;
-
- /* Save Diagnostic register */
- asm ("mrc p15, 0, %0, c15, c0, 1"
- : "=r" (tmp) : : "cc");
- save_arm_register[1] = tmp;
- }
+ if (!soc_is_exynos5250())
+ exynos_cpu_save_register();
return 0;
}
@@ -196,19 +223,9 @@ static void exynos_pm_resume(void)
/* No need to perform below restore code */
goto early_wakeup;
}
- if (!soc_is_exynos5250()) {
- /* Restore Power control register */
- tmp = save_arm_register[0];
- asm volatile ("mcr p15, 0, %0, c15, c0, 0"
- : : "r" (tmp)
- : "cc");
-
- /* Restore Diagnostic register */
- tmp = save_arm_register[1];
- asm volatile ("mcr p15, 0, %0, c15, c0, 1"
- : : "r" (tmp)
- : "cc");
- }
+
+ if (!soc_is_exynos5250())
+ exynos_cpu_restore_register();
/* For release retention */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH V4 05/20] ARM: exynos: cpuidle: Move some code inside the idle_finisher
2014-04-10 9:55 [PATCH V4 00/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle Daniel Lezcano
` (3 preceding siblings ...)
2014-04-10 9:55 ` [PATCH V4 04/20] ARM: exynos: cpuidle: Encapsulate register access inside a function Daniel Lezcano
@ 2014-04-10 9:55 ` Daniel Lezcano
2014-04-10 9:55 ` [PATCH V4 06/20] ARM: exynos: cpuidle: Fix S5P_WAKEUP_STAT call Daniel Lezcano
` (14 subsequent siblings)
19 siblings, 0 replies; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-10 9:55 UTC (permalink / raw)
To: linux-arm-kernel
Move the code around to differentiate different section of code and prepare it
to be factored out in the next patches.
The call order changed but hat doesn't have a side effect because they are
independent. The important call is cpu_do_idle() which must be done the last.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/cpuidle.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index 16e3325..cdfb1ae 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -87,7 +87,16 @@ static void restore_cpu_arch_register(void)
static int idle_finisher(unsigned long flags)
{
+ exynos_set_wakeupmask();
+
+ __raw_writel(virt_to_phys(s3c_cpu_resume), REG_DIRECTGO_ADDR);
+ __raw_writel(S5P_CHECK_AFTR, REG_DIRECTGO_FLAG);
+
+ /* Set value of power down register for aftr mode */
+ exynos_sys_powerdown_conf(SYS_AFTR);
+
cpu_do_idle();
+
return 1;
}
@@ -97,14 +106,6 @@ static int exynos_enter_core0_aftr(struct cpuidle_device *dev,
{
unsigned long tmp;
- exynos_set_wakeupmask();
-
- /* Set value of power down register for aftr mode */
- exynos_sys_powerdown_conf(SYS_AFTR);
-
- __raw_writel(virt_to_phys(exynos_cpu_resume), REG_DIRECTGO_ADDR);
- __raw_writel(S5P_CHECK_AFTR, REG_DIRECTGO_FLAG);
-
save_cpu_arch_register();
/* Setting Central Sequence Register for power down mode */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH V4 06/20] ARM: exynos: cpuidle: Fix S5P_WAKEUP_STAT call
2014-04-10 9:55 [PATCH V4 00/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle Daniel Lezcano
` (4 preceding siblings ...)
2014-04-10 9:55 ` [PATCH V4 05/20] ARM: exynos: cpuidle: Move some code inside the idle_finisher Daniel Lezcano
@ 2014-04-10 9:55 ` Daniel Lezcano
2014-04-10 9:55 ` [PATCH V4 07/20] ARM: exynos: cpuidle: Use the cpu_pm notifier Daniel Lezcano
` (13 subsequent siblings)
19 siblings, 0 replies; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-10 9:55 UTC (permalink / raw)
To: linux-arm-kernel
This function should be called only when the powerdown sequence fails.
Even if the current code does not hurt, by moving this line, we have the same
code than the one in pm.c.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/cpuidle.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index cdfb1ae..6663349 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -134,11 +134,10 @@ static int exynos_enter_core0_aftr(struct cpuidle_device *dev,
if (!(tmp & S5P_CENTRAL_LOWPWR_CFG)) {
tmp |= S5P_CENTRAL_LOWPWR_CFG;
__raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION);
+ /* Clear wakeup state register */
+ __raw_writel(0x0, S5P_WAKEUP_STAT);
}
- /* Clear wakeup state register */
- __raw_writel(0x0, S5P_WAKEUP_STAT);
-
return index;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH V4 07/20] ARM: exynos: cpuidle: Use the cpu_pm notifier
2014-04-10 9:55 [PATCH V4 00/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle Daniel Lezcano
` (5 preceding siblings ...)
2014-04-10 9:55 ` [PATCH V4 06/20] ARM: exynos: cpuidle: Fix S5P_WAKEUP_STAT call Daniel Lezcano
@ 2014-04-10 9:55 ` Daniel Lezcano
2014-04-10 9:55 ` [PATCH V4 08/20] ARM: exynos: cpuidle: Move scu_enable in " Daniel Lezcano
` (12 subsequent siblings)
19 siblings, 0 replies; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-10 9:55 UTC (permalink / raw)
To: linux-arm-kernel
Use the cpu_pm_enter/exit notifier to group some pm code inside the pm file.
The save and restore code is duplicated across pm.c and cpuidle.c. By using
the cpu_pm notifier, we can factor out the routine.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/cpuidle.c | 24 ------------------------
arch/arm/mach-exynos/pm.c | 29 +++++++++++++++++++++++++++++
2 files changed, 29 insertions(+), 24 deletions(-)
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index 6663349..7f1f4ef 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -65,26 +65,6 @@ static void exynos_set_wakeupmask(void)
__raw_writel(0x0000ff3e, S5P_WAKEUP_MASK);
}
-static unsigned int g_pwr_ctrl, g_diag_reg;
-
-static void save_cpu_arch_register(void)
-{
- /*read power control register*/
- asm("mrc p15, 0, %0, c15, c0, 0" : "=r"(g_pwr_ctrl) : : "cc");
- /*read diagnostic register*/
- asm("mrc p15, 0, %0, c15, c0, 1" : "=r"(g_diag_reg) : : "cc");
- return;
-}
-
-static void restore_cpu_arch_register(void)
-{
- /*write power control register*/
- asm("mcr p15, 0, %0, c15, c0, 0" : : "r"(g_pwr_ctrl) : "cc");
- /*write diagnostic register*/
- asm("mcr p15, 0, %0, c15, c0, 1" : : "r"(g_diag_reg) : "cc");
- return;
-}
-
static int idle_finisher(unsigned long flags)
{
exynos_set_wakeupmask();
@@ -106,8 +86,6 @@ static int exynos_enter_core0_aftr(struct cpuidle_device *dev,
{
unsigned long tmp;
- save_cpu_arch_register();
-
/* Setting Central Sequence Register for power down mode */
tmp = __raw_readl(S5P_CENTRAL_SEQ_CONFIGURATION);
tmp &= ~S5P_CENTRAL_LOWPWR_CFG;
@@ -122,8 +100,6 @@ static int exynos_enter_core0_aftr(struct cpuidle_device *dev,
#endif
cpu_pm_exit();
- restore_cpu_arch_register();
-
/*
* If PMU failed while entering sleep mode, WFI will be
* ignored by PMU and then exiting cpu_do_idle().
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index adfdf4b..67d75fe 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -16,6 +16,7 @@
#include <linux/init.h>
#include <linux/suspend.h>
#include <linux/syscore_ops.h>
+#include <linux/cpu_pm.h>
#include <linux/io.h>
#include <linux/irqchip/arm-gic.h>
#include <linux/err.h>
@@ -321,10 +322,38 @@ static const struct platform_suspend_ops exynos_suspend_ops = {
.valid = suspend_valid_only_mem,
};
+static int exynos_cpu_pm_notifier(struct notifier_block *self,
+ unsigned long cmd, void *v)
+{
+ int cpu = smp_processor_id();
+
+ switch (cmd) {
+ case CPU_PM_ENTER:
+ if (cpu == 0) {
+ exynos_cpu_save_register();
+ }
+ break;
+
+ case CPU_PM_EXIT:
+ if (cpu == 0) {
+ exynos_cpu_restore_register();
+ }
+ break;
+ }
+
+ return NOTIFY_OK;
+}
+
+static struct notifier_block exynos_cpu_pm_notifier_block = {
+ .notifier_call = exynos_cpu_pm_notifier,
+};
+
void __init exynos_pm_init(void)
{
u32 tmp;
+ cpu_pm_register_notifier(&exynos_cpu_pm_notifier_block);
+
/* Platform-specific GIC callback */
gic_arch_extn.irq_set_wake = exynos_irq_set_wake;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH V4 08/20] ARM: exynos: cpuidle: Move scu_enable in the cpu_pm notifier
2014-04-10 9:55 [PATCH V4 00/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle Daniel Lezcano
` (6 preceding siblings ...)
2014-04-10 9:55 ` [PATCH V4 07/20] ARM: exynos: cpuidle: Use the cpu_pm notifier Daniel Lezcano
@ 2014-04-10 9:55 ` Daniel Lezcano
2014-04-10 9:55 ` [PATCH V4 09/20] ARM: exynos: cpuidle: Remove ifdef for scu_enable Daniel Lezcano
` (11 subsequent siblings)
19 siblings, 0 replies; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-10 9:55 UTC (permalink / raw)
To: linux-arm-kernel
We make the cpuidle code less arch dependent.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/cpuidle.c | 6 ------
arch/arm/mach-exynos/pm.c | 4 ++++
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index 7f1f4ef..ce31004 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -18,7 +18,6 @@
#include <linux/platform_device.h>
#include <asm/proc-fns.h>
-#include <asm/smp_scu.h>
#include <asm/suspend.h>
#include <asm/unified.h>
#include <asm/cpuidle.h>
@@ -93,11 +92,6 @@ static int exynos_enter_core0_aftr(struct cpuidle_device *dev,
cpu_pm_enter();
cpu_suspend(0, idle_finisher);
-
-#ifdef CONFIG_SMP
- if (!soc_is_exynos5250())
- scu_enable(S5P_VA_SCU);
-#endif
cpu_pm_exit();
/*
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index 67d75fe..aba577f 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -336,6 +336,10 @@ static int exynos_cpu_pm_notifier(struct notifier_block *self,
case CPU_PM_EXIT:
if (cpu == 0) {
+#ifdef CONFIG_SMP
+ if (!soc_is_exynos5250())
+ scu_enable(S5P_VA_SCU);
+#endif
exynos_cpu_restore_register();
}
break;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH V4 09/20] ARM: exynos: cpuidle: Remove ifdef for scu_enable
2014-04-10 9:55 [PATCH V4 00/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle Daniel Lezcano
` (7 preceding siblings ...)
2014-04-10 9:55 ` [PATCH V4 08/20] ARM: exynos: cpuidle: Move scu_enable in " Daniel Lezcano
@ 2014-04-10 9:55 ` Daniel Lezcano
2014-04-10 9:55 ` [PATCH V4 10/20] ARM: exynos: cpuidle: Move clock setup to pm.c Daniel Lezcano
` (10 subsequent siblings)
19 siblings, 0 replies; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-10 9:55 UTC (permalink / raw)
To: linux-arm-kernel
The scu_enable function is already a noop in the scu's header file is
CONFIG_SMP=n, so no need to use these macros in the code.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/pm.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index aba577f..9773a00 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -244,7 +244,7 @@ static void exynos_pm_resume(void)
s3c_pm_do_restore_core(exynos_core_save, ARRAY_SIZE(exynos_core_save));
- if (IS_ENABLED(CONFIG_SMP) && !soc_is_exynos5250())
+ if (!soc_is_exynos5250())
scu_enable(S5P_VA_SCU);
early_wakeup:
@@ -336,10 +336,8 @@ static int exynos_cpu_pm_notifier(struct notifier_block *self,
case CPU_PM_EXIT:
if (cpu == 0) {
-#ifdef CONFIG_SMP
if (!soc_is_exynos5250())
scu_enable(S5P_VA_SCU);
-#endif
exynos_cpu_restore_register();
}
break;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH V4 10/20] ARM: exynos: cpuidle: Move clock setup to pm.c
2014-04-10 9:55 [PATCH V4 00/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle Daniel Lezcano
` (8 preceding siblings ...)
2014-04-10 9:55 ` [PATCH V4 09/20] ARM: exynos: cpuidle: Remove ifdef for scu_enable Daniel Lezcano
@ 2014-04-10 9:55 ` Daniel Lezcano
2014-04-10 13:57 ` Tomasz Figa
2014-04-10 9:55 ` [PATCH V4 11/20] ARM: exynos: cpuidle: Pass wakeup mask parameter to function Daniel Lezcano
` (9 subsequent siblings)
19 siblings, 1 reply; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-10 9:55 UTC (permalink / raw)
To: linux-arm-kernel
One more step is moving the clock ratio setting at idle time in pm.c
The macro names have been changed to be consistent with the other macros
name in the file.
Note, the clock divider was working only when cpuidle was enabled because it
was in its init routine. With this change, the clock divider is set in the pm's
init routine, so it will also operate when the cpuidle driver is not set, which
is good.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/cpuidle.c | 54 ---------------------------------------
arch/arm/mach-exynos/pm.c | 35 +++++++++++++++++++++++++
arch/arm/mach-exynos/regs-pmu.h | 19 ++++++++++++++
3 files changed, 54 insertions(+), 54 deletions(-)
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index ce31004..97a441f 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -39,25 +39,6 @@
#define S5P_CHECK_AFTR 0xFCBA0D10
-#define EXYNOS5_PWR_CTRL1 (S5P_VA_CMU + 0x01020)
-#define EXYNOS5_PWR_CTRL2 (S5P_VA_CMU + 0x01024)
-
-#define PWR_CTRL1_CORE2_DOWN_RATIO (7 << 28)
-#define PWR_CTRL1_CORE1_DOWN_RATIO (7 << 16)
-#define PWR_CTRL1_DIV2_DOWN_EN (1 << 9)
-#define PWR_CTRL1_DIV1_DOWN_EN (1 << 8)
-#define PWR_CTRL1_USE_CORE1_WFE (1 << 5)
-#define PWR_CTRL1_USE_CORE0_WFE (1 << 4)
-#define PWR_CTRL1_USE_CORE1_WFI (1 << 1)
-#define PWR_CTRL1_USE_CORE0_WFI (1 << 0)
-
-#define PWR_CTRL2_DIV2_UP_EN (1 << 25)
-#define PWR_CTRL2_DIV1_UP_EN (1 << 24)
-#define PWR_CTRL2_DUR_STANDBY2_VAL (1 << 16)
-#define PWR_CTRL2_DUR_STANDBY1_VAL (1 << 8)
-#define PWR_CTRL2_CORE2_UP_RATIO (1 << 4)
-#define PWR_CTRL2_CORE1_UP_RATIO (1 << 0)
-
/* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */
static void exynos_set_wakeupmask(void)
{
@@ -127,38 +108,6 @@ static int exynos_enter_lowpower(struct cpuidle_device *dev,
return exynos_enter_core0_aftr(dev, drv, new_index);
}
-static void __init exynos5_core_down_clk(void)
-{
- unsigned int tmp;
-
- /*
- * Enable arm clock down (in idle) and set arm divider
- * ratios in WFI/WFE state.
- */
- tmp = PWR_CTRL1_CORE2_DOWN_RATIO | \
- PWR_CTRL1_CORE1_DOWN_RATIO | \
- PWR_CTRL1_DIV2_DOWN_EN | \
- PWR_CTRL1_DIV1_DOWN_EN | \
- PWR_CTRL1_USE_CORE1_WFE | \
- PWR_CTRL1_USE_CORE0_WFE | \
- PWR_CTRL1_USE_CORE1_WFI | \
- PWR_CTRL1_USE_CORE0_WFI;
- __raw_writel(tmp, EXYNOS5_PWR_CTRL1);
-
- /*
- * Enable arm clock up (on exiting idle). Set arm divider
- * ratios when not in idle along with the standby duration
- * ratios.
- */
- tmp = PWR_CTRL2_DIV2_UP_EN | \
- PWR_CTRL2_DIV1_UP_EN | \
- PWR_CTRL2_DUR_STANDBY2_VAL | \
- PWR_CTRL2_DUR_STANDBY1_VAL | \
- PWR_CTRL2_CORE2_UP_RATIO | \
- PWR_CTRL2_CORE1_UP_RATIO;
- __raw_writel(tmp, EXYNOS5_PWR_CTRL2);
-}
-
static struct cpuidle_driver exynos_idle_driver = {
.name = "exynos_idle",
.owner = THIS_MODULE,
@@ -181,9 +130,6 @@ static int exynos_cpuidle_probe(struct platform_device *pdev)
{
int ret;
- if (soc_is_exynos5250())
- exynos5_core_down_clk();
-
if (soc_is_exynos5440())
exynos_idle_driver.state_count = 1;
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index 9773a00..c4138bf 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -140,6 +140,38 @@ static void exynos_cpu_restore_register(void)
: "cc");
}
+static void __init exynos5_core_down_clk(void)
+{
+ unsigned int tmp;
+
+ /*
+ * Enable arm clock down (in idle) and set arm divider
+ * ratios in WFI/WFE state.
+ */
+ tmp = EXYNOS5_PWR_CTRL1_CORE2_DOWN_RATIO | \
+ EXYNOS5_PWR_CTRL1_CORE1_DOWN_RATIO | \
+ EXYNOS5_PWR_CTRL1_DIV2_DOWN_EN | \
+ EXYNOS5_PWR_CTRL1_DIV1_DOWN_EN | \
+ EXYNOS5_PWR_CTRL1_USE_CORE1_WFE | \
+ EXYNOS5_PWR_CTRL1_USE_CORE0_WFE | \
+ EXYNOS5_PWR_CTRL1_USE_CORE1_WFI | \
+ EXYNOS5_PWR_CTRL1_USE_CORE0_WFI;
+ __raw_writel(tmp, EXYNOS5_PWR_CTRL1);
+
+ /*
+ * Enable arm clock up (on exiting idle). Set arm divider
+ * ratios when not in idle along with the standby duration
+ * ratios.
+ */
+ tmp = EXYNOS5_PWR_CTRL2_DIV2_UP_EN | \
+ EXYNOS5_PWR_CTRL2_DIV1_UP_EN | \
+ EXYNOS5_PWR_CTRL2_DUR_STANDBY2_VAL | \
+ EXYNOS5_PWR_CTRL2_DUR_STANDBY1_VAL | \
+ EXYNOS5_PWR_CTRL2_CORE2_UP_RATIO | \
+ EXYNOS5_PWR_CTRL2_CORE1_UP_RATIO;
+ __raw_writel(tmp, EXYNOS5_PWR_CTRL2);
+}
+
static int exynos_cpu_suspend(unsigned long arg)
{
#ifdef CONFIG_CACHE_L2X0
@@ -244,6 +276,9 @@ static void exynos_pm_resume(void)
s3c_pm_do_restore_core(exynos_core_save, ARRAY_SIZE(exynos_core_save));
+ if (soc_is_exynos5250())
+ exynos5_core_down_clk();
+
if (!soc_is_exynos5250())
scu_enable(S5P_VA_SCU);
diff --git a/arch/arm/mach-exynos/regs-pmu.h b/arch/arm/mach-exynos/regs-pmu.h
index 4f6a256..35c4eb3 100644
--- a/arch/arm/mach-exynos/regs-pmu.h
+++ b/arch/arm/mach-exynos/regs-pmu.h
@@ -313,4 +313,23 @@
#define EXYNOS5_OPTION_USE_RETENTION (1 << 4)
+#define EXYNOS5_PWR_CTRL1 (S5P_VA_CMU + 0x01020)
+#define EXYNOS5_PWR_CTRL2 (S5P_VA_CMU + 0x01024)
+
+#define EXYNOS5_PWR_CTRL1_CORE2_DOWN_RATIO (7 << 28)
+#define EXYNOS5_PWR_CTRL1_CORE1_DOWN_RATIO (7 << 16)
+#define EXYNOS5_PWR_CTRL1_DIV2_DOWN_EN (1 << 9)
+#define EXYNOS5_PWR_CTRL1_DIV1_DOWN_EN (1 << 8)
+#define EXYNOS5_PWR_CTRL1_USE_CORE1_WFE (1 << 5)
+#define EXYNOS5_PWR_CTRL1_USE_CORE0_WFE (1 << 4)
+#define EXYNOS5_PWR_CTRL1_USE_CORE1_WFI (1 << 1)
+#define EXYNOS5_PWR_CTRL1_USE_CORE0_WFI (1 << 0)
+
+#define EXYNOS5_PWR_CTRL2_DIV2_UP_EN (1 << 25)
+#define EXYNOS5_PWR_CTRL2_DIV1_UP_EN (1 << 24)
+#define EXYNOS5_PWR_CTRL2_DUR_STANDBY2_VAL (1 << 16)
+#define EXYNOS5_PWR_CTRL2_DUR_STANDBY1_VAL (1 << 8)
+#define EXYNOS5_PWR_CTRL2_CORE2_UP_RATIO (1 << 4)
+#define EXYNOS5_PWR_CTRL2_CORE1_UP_RATIO (1 << 0)
+
#endif /* __ASM_ARCH_REGS_PMU_H */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH V4 10/20] ARM: exynos: cpuidle: Move clock setup to pm.c
2014-04-10 9:55 ` [PATCH V4 10/20] ARM: exynos: cpuidle: Move clock setup to pm.c Daniel Lezcano
@ 2014-04-10 13:57 ` Tomasz Figa
2014-04-10 14:23 ` Daniel Lezcano
0 siblings, 1 reply; 27+ messages in thread
From: Tomasz Figa @ 2014-04-10 13:57 UTC (permalink / raw)
To: linux-arm-kernel
Hi Daniel,
On 10.04.2014 11:55, Daniel Lezcano wrote:
> One more step is moving the clock ratio setting at idle time in pm.c
>
> The macro names have been changed to be consistent with the other macros
> name in the file.
>
> Note, the clock divider was working only when cpuidle was enabled because it
> was in its init routine. With this change, the clock divider is set in the pm's
> init routine, so it will also operate when the cpuidle driver is not set, which
> is good.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Reviewed-by: Tomasz Figa <t.figa@samsung.com>
> ---
> arch/arm/mach-exynos/cpuidle.c | 54 ---------------------------------------
> arch/arm/mach-exynos/pm.c | 35 +++++++++++++++++++++++++
> arch/arm/mach-exynos/regs-pmu.h | 19 ++++++++++++++
> 3 files changed, 54 insertions(+), 54 deletions(-)
Sorry that I didn't mention that before, but now I recall that there was
already a similar patch moving this code to Exynos5250 clock driver,
which is the best place for setup of any CMU registers and a step
towards removing one more static IO mapping.
Also one more thing below.
> diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
> index ce31004..97a441f 100644
> --- a/arch/arm/mach-exynos/cpuidle.c
> +++ b/arch/arm/mach-exynos/cpuidle.c
> @@ -39,25 +39,6 @@
>
> #define S5P_CHECK_AFTR 0xFCBA0D10
>
> -#define EXYNOS5_PWR_CTRL1 (S5P_VA_CMU + 0x01020)
> -#define EXYNOS5_PWR_CTRL2 (S5P_VA_CMU + 0x01024)
> -
> -#define PWR_CTRL1_CORE2_DOWN_RATIO (7 << 28)
> -#define PWR_CTRL1_CORE1_DOWN_RATIO (7 << 16)
> -#define PWR_CTRL1_DIV2_DOWN_EN (1 << 9)
> -#define PWR_CTRL1_DIV1_DOWN_EN (1 << 8)
> -#define PWR_CTRL1_USE_CORE1_WFE (1 << 5)
> -#define PWR_CTRL1_USE_CORE0_WFE (1 << 4)
> -#define PWR_CTRL1_USE_CORE1_WFI (1 << 1)
> -#define PWR_CTRL1_USE_CORE0_WFI (1 << 0)
> -
> -#define PWR_CTRL2_DIV2_UP_EN (1 << 25)
> -#define PWR_CTRL2_DIV1_UP_EN (1 << 24)
> -#define PWR_CTRL2_DUR_STANDBY2_VAL (1 << 16)
> -#define PWR_CTRL2_DUR_STANDBY1_VAL (1 << 8)
> -#define PWR_CTRL2_CORE2_UP_RATIO (1 << 4)
> -#define PWR_CTRL2_CORE1_UP_RATIO (1 << 0)
> -
> /* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */
> static void exynos_set_wakeupmask(void)
> {
> @@ -127,38 +108,6 @@ static int exynos_enter_lowpower(struct cpuidle_device *dev,
> return exynos_enter_core0_aftr(dev, drv, new_index);
> }
>
> -static void __init exynos5_core_down_clk(void)
> -{
> - unsigned int tmp;
> -
> - /*
> - * Enable arm clock down (in idle) and set arm divider
> - * ratios in WFI/WFE state.
> - */
> - tmp = PWR_CTRL1_CORE2_DOWN_RATIO | \
> - PWR_CTRL1_CORE1_DOWN_RATIO | \
> - PWR_CTRL1_DIV2_DOWN_EN | \
> - PWR_CTRL1_DIV1_DOWN_EN | \
> - PWR_CTRL1_USE_CORE1_WFE | \
> - PWR_CTRL1_USE_CORE0_WFE | \
> - PWR_CTRL1_USE_CORE1_WFI | \
> - PWR_CTRL1_USE_CORE0_WFI;
> - __raw_writel(tmp, EXYNOS5_PWR_CTRL1);
> -
> - /*
> - * Enable arm clock up (on exiting idle). Set arm divider
> - * ratios when not in idle along with the standby duration
> - * ratios.
> - */
> - tmp = PWR_CTRL2_DIV2_UP_EN | \
> - PWR_CTRL2_DIV1_UP_EN | \
> - PWR_CTRL2_DUR_STANDBY2_VAL | \
> - PWR_CTRL2_DUR_STANDBY1_VAL | \
> - PWR_CTRL2_CORE2_UP_RATIO | \
> - PWR_CTRL2_CORE1_UP_RATIO;
> - __raw_writel(tmp, EXYNOS5_PWR_CTRL2);
> -}
> -
> static struct cpuidle_driver exynos_idle_driver = {
> .name = "exynos_idle",
> .owner = THIS_MODULE,
> @@ -181,9 +130,6 @@ static int exynos_cpuidle_probe(struct platform_device *pdev)
> {
> int ret;
>
> - if (soc_is_exynos5250())
> - exynos5_core_down_clk();
> -
> if (soc_is_exynos5440())
> exynos_idle_driver.state_count = 1;
>
> diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
> index 9773a00..c4138bf 100644
> --- a/arch/arm/mach-exynos/pm.c
> +++ b/arch/arm/mach-exynos/pm.c
> @@ -140,6 +140,38 @@ static void exynos_cpu_restore_register(void)
> : "cc");
> }
>
> +static void __init exynos5_core_down_clk(void)
> +{
> + unsigned int tmp;
> +
> + /*
> + * Enable arm clock down (in idle) and set arm divider
> + * ratios in WFI/WFE state.
> + */
> + tmp = EXYNOS5_PWR_CTRL1_CORE2_DOWN_RATIO | \
> + EXYNOS5_PWR_CTRL1_CORE1_DOWN_RATIO | \
> + EXYNOS5_PWR_CTRL1_DIV2_DOWN_EN | \
> + EXYNOS5_PWR_CTRL1_DIV1_DOWN_EN | \
> + EXYNOS5_PWR_CTRL1_USE_CORE1_WFE | \
> + EXYNOS5_PWR_CTRL1_USE_CORE0_WFE | \
> + EXYNOS5_PWR_CTRL1_USE_CORE1_WFI | \
> + EXYNOS5_PWR_CTRL1_USE_CORE0_WFI;
> + __raw_writel(tmp, EXYNOS5_PWR_CTRL1);
> +
> + /*
> + * Enable arm clock up (on exiting idle). Set arm divider
> + * ratios when not in idle along with the standby duration
> + * ratios.
> + */
> + tmp = EXYNOS5_PWR_CTRL2_DIV2_UP_EN | \
> + EXYNOS5_PWR_CTRL2_DIV1_UP_EN | \
> + EXYNOS5_PWR_CTRL2_DUR_STANDBY2_VAL | \
> + EXYNOS5_PWR_CTRL2_DUR_STANDBY1_VAL | \
> + EXYNOS5_PWR_CTRL2_CORE2_UP_RATIO | \
> + EXYNOS5_PWR_CTRL2_CORE1_UP_RATIO;
> + __raw_writel(tmp, EXYNOS5_PWR_CTRL2);
> +}
> +
> static int exynos_cpu_suspend(unsigned long arg)
> {
> #ifdef CONFIG_CACHE_L2X0
> @@ -244,6 +276,9 @@ static void exynos_pm_resume(void)
>
> s3c_pm_do_restore_core(exynos_core_save, ARRAY_SIZE(exynos_core_save));
>
> + if (soc_is_exynos5250())
> + exynos5_core_down_clk();
> +
Originally this code was executed at system boot-up, but now it is
happening on resume from sleep. Is this change desired?
Best regards,
Tomasz
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH V4 10/20] ARM: exynos: cpuidle: Move clock setup to pm.c
2014-04-10 13:57 ` Tomasz Figa
@ 2014-04-10 14:23 ` Daniel Lezcano
2014-04-10 15:34 ` Tomasz Figa
0 siblings, 1 reply; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-10 14:23 UTC (permalink / raw)
To: linux-arm-kernel
On 04/10/2014 03:57 PM, Tomasz Figa wrote:
> Hi Daniel,
>
> On 10.04.2014 11:55, Daniel Lezcano wrote:
>> One more step is moving the clock ratio setting at idle time in pm.c
>>
>> The macro names have been changed to be consistent with the other macros
>> name in the file.
>>
>> Note, the clock divider was working only when cpuidle was enabled
>> because it
>> was in its init routine. With this change, the clock divider is set in
>> the pm's
>> init routine, so it will also operate when the cpuidle driver is not
>> set, which
>> is good.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
>> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
>> Reviewed-by: Tomasz Figa <t.figa@samsung.com>
>> ---
>> arch/arm/mach-exynos/cpuidle.c | 54
>> ---------------------------------------
>> arch/arm/mach-exynos/pm.c | 35 +++++++++++++++++++++++++
>> arch/arm/mach-exynos/regs-pmu.h | 19 ++++++++++++++
>> 3 files changed, 54 insertions(+), 54 deletions(-)
>
> Sorry that I didn't mention that before, but now I recall that there was
> already a similar patch moving this code to Exynos5250 clock driver,
> which is the best place for setup of any CMU registers and a step
> towards removing one more static IO mapping.
Yes, Bartlomiej mentioned it.
Is it possible to merge this mentioned patch or to give a pointer to it
so I can integrate it into the patchset ?
> Also one more thing below.
>
[ ... ]
>> {
>> #ifdef CONFIG_CACHE_L2X0
>> @@ -244,6 +276,9 @@ static void exynos_pm_resume(void)
>>
>> s3c_pm_do_restore_core(exynos_core_save,
>> ARRAY_SIZE(exynos_core_save));
>>
>> + if (soc_is_exynos5250())
>> + exynos5_core_down_clk();
>> +
>
> Originally this code was executed at system boot-up, but now it is
> happening on resume from sleep. Is this change desired?
Argh ! Sounds like I got a bad fuzz there.
--
<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] 27+ messages in thread
* [PATCH V4 10/20] ARM: exynos: cpuidle: Move clock setup to pm.c
2014-04-10 14:23 ` Daniel Lezcano
@ 2014-04-10 15:34 ` Tomasz Figa
2014-04-11 8:30 ` Daniel Lezcano
0 siblings, 1 reply; 27+ messages in thread
From: Tomasz Figa @ 2014-04-10 15:34 UTC (permalink / raw)
To: linux-arm-kernel
On 10.04.2014 16:23, Daniel Lezcano wrote:
> On 04/10/2014 03:57 PM, Tomasz Figa wrote:
>> Hi Daniel,
>>
>> On 10.04.2014 11:55, Daniel Lezcano wrote:
>>> One more step is moving the clock ratio setting at idle time in pm.c
>>>
>>> The macro names have been changed to be consistent with the other macros
>>> name in the file.
>>>
>>> Note, the clock divider was working only when cpuidle was enabled
>>> because it
>>> was in its init routine. With this change, the clock divider is set in
>>> the pm's
>>> init routine, so it will also operate when the cpuidle driver is not
>>> set, which
>>> is good.
>>>
>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
>>> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
>>> Reviewed-by: Tomasz Figa <t.figa@samsung.com>
>>> ---
>>> arch/arm/mach-exynos/cpuidle.c | 54
>>> ---------------------------------------
>>> arch/arm/mach-exynos/pm.c | 35 +++++++++++++++++++++++++
>>> arch/arm/mach-exynos/regs-pmu.h | 19 ++++++++++++++
>>> 3 files changed, 54 insertions(+), 54 deletions(-)
>>
>> Sorry that I didn't mention that before, but now I recall that there was
>> already a similar patch moving this code to Exynos5250 clock driver,
>> which is the best place for setup of any CMU registers and a step
>> towards removing one more static IO mapping.
>
> Yes, Bartlomiej mentioned it.
>
> Is it possible to merge this mentioned patch or to give a pointer to it
> so I can integrate it into the patchset ?
http://marc.info/?l=linux-arm-kernel&m=138147021207626&w=2
I wonder if it still applies cleanly, though...
Best regards,
Tomasz
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH V4 10/20] ARM: exynos: cpuidle: Move clock setup to pm.c
2014-04-10 15:34 ` Tomasz Figa
@ 2014-04-11 8:30 ` Daniel Lezcano
2014-04-11 8:49 ` Tomasz Figa
0 siblings, 1 reply; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-11 8:30 UTC (permalink / raw)
To: linux-arm-kernel
On 04/10/2014 05:34 PM, Tomasz Figa wrote:
> On 10.04.2014 16:23, Daniel Lezcano wrote:
>> On 04/10/2014 03:57 PM, Tomasz Figa wrote:
>>> Hi Daniel,
>>>
>>> On 10.04.2014 11:55, Daniel Lezcano wrote:
>>>> One more step is moving the clock ratio setting at idle time in pm.c
>>>>
>>>> The macro names have been changed to be consistent with the other
>>>> macros
>>>> name in the file.
>>>>
>>>> Note, the clock divider was working only when cpuidle was enabled
>>>> because it
>>>> was in its init routine. With this change, the clock divider is set in
>>>> the pm's
>>>> init routine, so it will also operate when the cpuidle driver is not
>>>> set, which
>>>> is good.
>>>>
>>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>>> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
>>>> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
>>>> Reviewed-by: Tomasz Figa <t.figa@samsung.com>
>>>> ---
>>>> arch/arm/mach-exynos/cpuidle.c | 54
>>>> ---------------------------------------
>>>> arch/arm/mach-exynos/pm.c | 35 +++++++++++++++++++++++++
>>>> arch/arm/mach-exynos/regs-pmu.h | 19 ++++++++++++++
>>>> 3 files changed, 54 insertions(+), 54 deletions(-)
>>>
>>> Sorry that I didn't mention that before, but now I recall that there was
>>> already a similar patch moving this code to Exynos5250 clock driver,
>>> which is the best place for setup of any CMU registers and a step
>>> towards removing one more static IO mapping.
>>
>> Yes, Bartlomiej mentioned it.
>>
>> Is it possible to merge this mentioned patch or to give a pointer to it
>> so I can integrate it into the patchset ?
>
> http://marc.info/?l=linux-arm-kernel&m=138147021207626&w=2
>
> I wonder if it still applies cleanly, though...
Ok, if I refer to the date, this patch has been lost in the limbus. So I
can integrate it with my patchset without conflicting with any tree. Right ?
--
<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] 27+ messages in thread
* [PATCH V4 10/20] ARM: exynos: cpuidle: Move clock setup to pm.c
2014-04-11 8:30 ` Daniel Lezcano
@ 2014-04-11 8:49 ` Tomasz Figa
2014-04-11 8:55 ` Daniel Lezcano
0 siblings, 1 reply; 27+ messages in thread
From: Tomasz Figa @ 2014-04-11 8:49 UTC (permalink / raw)
To: linux-arm-kernel
On 11.04.2014 10:30, Daniel Lezcano wrote:
> On 04/10/2014 05:34 PM, Tomasz Figa wrote:
>> On 10.04.2014 16:23, Daniel Lezcano wrote:
>>> On 04/10/2014 03:57 PM, Tomasz Figa wrote:
>>>> Hi Daniel,
>>>>
>>>> On 10.04.2014 11:55, Daniel Lezcano wrote:
>>>>> One more step is moving the clock ratio setting at idle time in pm.c
>>>>>
>>>>> The macro names have been changed to be consistent with the other
>>>>> macros
>>>>> name in the file.
>>>>>
>>>>> Note, the clock divider was working only when cpuidle was enabled
>>>>> because it
>>>>> was in its init routine. With this change, the clock divider is set in
>>>>> the pm's
>>>>> init routine, so it will also operate when the cpuidle driver is not
>>>>> set, which
>>>>> is good.
>>>>>
>>>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>>>> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
>>>>> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
>>>>> Reviewed-by: Tomasz Figa <t.figa@samsung.com>
>>>>> ---
>>>>> arch/arm/mach-exynos/cpuidle.c | 54
>>>>> ---------------------------------------
>>>>> arch/arm/mach-exynos/pm.c | 35 +++++++++++++++++++++++++
>>>>> arch/arm/mach-exynos/regs-pmu.h | 19 ++++++++++++++
>>>>> 3 files changed, 54 insertions(+), 54 deletions(-)
>>>>
>>>> Sorry that I didn't mention that before, but now I recall that there
>>>> was
>>>> already a similar patch moving this code to Exynos5250 clock driver,
>>>> which is the best place for setup of any CMU registers and a step
>>>> towards removing one more static IO mapping.
>>>
>>> Yes, Bartlomiej mentioned it.
>>>
>>> Is it possible to merge this mentioned patch or to give a pointer to it
>>> so I can integrate it into the patchset ?
>>
>> http://marc.info/?l=linux-arm-kernel&m=138147021207626&w=2
>>
>> I wonder if it still applies cleanly, though...
>
> Ok, if I refer to the date, this patch has been lost in the limbus. So I
> can integrate it with my patchset without conflicting with any tree.
> Right ?
>
As I suspected, it doesn't apply onto current sources. I have attached a
rebased version. Feel free to send it as a part of next version of your
series.
Best regards,
Tomasz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ARM-EXYNOS-Move-arm-core-power-down-clock-to-exynos5.patch
Type: text/x-patch
Size: 6226 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140411/1ad9e7d6/attachment.bin>
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH V4 10/20] ARM: exynos: cpuidle: Move clock setup to pm.c
2014-04-11 8:49 ` Tomasz Figa
@ 2014-04-11 8:55 ` Daniel Lezcano
0 siblings, 0 replies; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-11 8:55 UTC (permalink / raw)
To: linux-arm-kernel
On 04/11/2014 10:49 AM, Tomasz Figa wrote:
> On 11.04.2014 10:30, Daniel Lezcano wrote:
>> On 04/10/2014 05:34 PM, Tomasz Figa wrote:
>>> On 10.04.2014 16:23, Daniel Lezcano wrote:
>>>> On 04/10/2014 03:57 PM, Tomasz Figa wrote:
>>>>> Hi Daniel,
>>>>>
>>>>> On 10.04.2014 11:55, Daniel Lezcano wrote:
>>>>>> One more step is moving the clock ratio setting at idle time in pm.c
>>>>>>
>>>>>> The macro names have been changed to be consistent with the other
>>>>>> macros
>>>>>> name in the file.
>>>>>>
>>>>>> Note, the clock divider was working only when cpuidle was enabled
>>>>>> because it
>>>>>> was in its init routine. With this change, the clock divider is
>>>>>> set in
>>>>>> the pm's
>>>>>> init routine, so it will also operate when the cpuidle driver is not
>>>>>> set, which
>>>>>> is good.
>>>>>>
>>>>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>>>>> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
>>>>>> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
>>>>>> Reviewed-by: Tomasz Figa <t.figa@samsung.com>
>>>>>> ---
>>>>>> arch/arm/mach-exynos/cpuidle.c | 54
>>>>>> ---------------------------------------
>>>>>> arch/arm/mach-exynos/pm.c | 35 +++++++++++++++++++++++++
>>>>>> arch/arm/mach-exynos/regs-pmu.h | 19 ++++++++++++++
>>>>>> 3 files changed, 54 insertions(+), 54 deletions(-)
>>>>>
>>>>> Sorry that I didn't mention that before, but now I recall that there
>>>>> was
>>>>> already a similar patch moving this code to Exynos5250 clock driver,
>>>>> which is the best place for setup of any CMU registers and a step
>>>>> towards removing one more static IO mapping.
>>>>
>>>> Yes, Bartlomiej mentioned it.
>>>>
>>>> Is it possible to merge this mentioned patch or to give a pointer to it
>>>> so I can integrate it into the patchset ?
>>>
>>> http://marc.info/?l=linux-arm-kernel&m=138147021207626&w=2
>>>
>>> I wonder if it still applies cleanly, though...
>>
>> Ok, if I refer to the date, this patch has been lost in the limbus. So I
>> can integrate it with my patchset without conflicting with any tree.
>> Right ?
>>
>
> As I suspected, it doesn't apply onto current sources. I have attached a
> rebased version. Feel free to send it as a part of next version of your
> series.
Thanks Tomasz !
--
<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] 27+ messages in thread
* [PATCH V4 11/20] ARM: exynos: cpuidle: Pass wakeup mask parameter to function
2014-04-10 9:55 [PATCH V4 00/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle Daniel Lezcano
` (9 preceding siblings ...)
2014-04-10 9:55 ` [PATCH V4 10/20] ARM: exynos: cpuidle: Move clock setup to pm.c Daniel Lezcano
@ 2014-04-10 9:55 ` Daniel Lezcano
2014-04-10 9:55 ` [PATCH V4 12/20] ARM: exynos: cpuidle: Encapsulate boot vector code into a function Daniel Lezcano
` (8 subsequent siblings)
19 siblings, 0 replies; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-10 9:55 UTC (permalink / raw)
To: linux-arm-kernel
Pass the wakeup mask to 'exynos_set_wakeupmask' as this function could be used
for different idle states with different mask.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
arch/arm/mach-exynos/cpuidle.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index 97a441f..ddbb2c5 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -40,14 +40,14 @@
#define S5P_CHECK_AFTR 0xFCBA0D10
/* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */
-static void exynos_set_wakeupmask(void)
+static void exynos_set_wakeupmask(long mask)
{
- __raw_writel(0x0000ff3e, S5P_WAKEUP_MASK);
+ __raw_writel(mask, S5P_WAKEUP_MASK);
}
static int idle_finisher(unsigned long flags)
{
- exynos_set_wakeupmask();
+ exynos_set_wakeupmask(0x0000ff3e);
__raw_writel(virt_to_phys(s3c_cpu_resume), REG_DIRECTGO_ADDR);
__raw_writel(S5P_CHECK_AFTR, REG_DIRECTGO_FLAG);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH V4 12/20] ARM: exynos: cpuidle: Encapsulate boot vector code into a function
2014-04-10 9:55 [PATCH V4 00/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle Daniel Lezcano
` (10 preceding siblings ...)
2014-04-10 9:55 ` [PATCH V4 11/20] ARM: exynos: cpuidle: Pass wakeup mask parameter to function Daniel Lezcano
@ 2014-04-10 9:55 ` Daniel Lezcano
2014-04-10 9:55 ` [PATCH V4 13/20] ARM: exynos: cpuidle: Disable cpuidle for 5440 Daniel Lezcano
` (7 subsequent siblings)
19 siblings, 0 replies; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-10 9:55 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
arch/arm/mach-exynos/cpuidle.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index ddbb2c5..ed7a439 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -45,13 +45,16 @@ static void exynos_set_wakeupmask(long mask)
__raw_writel(mask, S5P_WAKEUP_MASK);
}
+static void exynos_cpu_set_boot_vector(long flags)
+{
+ __raw_writel(virt_to_phys(exynos_cpu_resume), REG_DIRECTGO_ADDR);
+ __raw_writel(flags, REG_DIRECTGO_FLAG);
+}
+
static int idle_finisher(unsigned long flags)
{
exynos_set_wakeupmask(0x0000ff3e);
-
- __raw_writel(virt_to_phys(s3c_cpu_resume), REG_DIRECTGO_ADDR);
- __raw_writel(S5P_CHECK_AFTR, REG_DIRECTGO_FLAG);
-
+ exynos_cpu_set_boot_vector(S5P_CHECK_AFTR);
/* Set value of power down register for aftr mode */
exynos_sys_powerdown_conf(SYS_AFTR);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH V4 13/20] ARM: exynos: cpuidle: Disable cpuidle for 5440
2014-04-10 9:55 [PATCH V4 00/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle Daniel Lezcano
` (11 preceding siblings ...)
2014-04-10 9:55 ` [PATCH V4 12/20] ARM: exynos: cpuidle: Encapsulate boot vector code into a function Daniel Lezcano
@ 2014-04-10 9:55 ` Daniel Lezcano
2014-04-10 9:55 ` [PATCH V4 14/20] ARM: exynos: cpuidle: Encapsulate the AFTR code into a function Daniel Lezcano
` (6 subsequent siblings)
19 siblings, 0 replies; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-10 9:55 UTC (permalink / raw)
To: linux-arm-kernel
There is no point to register the cpuidle driver for the 5440 as it has only
one WFI state which is the default idle function when the cpuidle driver is
disabled.
By disabling cpuidle we prevent to enter to the governor computation for
nothing, thus saving a lot of processing time.
The only drawback is the statistic via sysfs on this state which is lost but
it is meaningless and it could be retrieved from the ftrace easily.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Acked-by: Amit Kucheria <amit.kucheria@linaro.org>
---
arch/arm/mach-exynos/cpuidle.c | 3 ---
arch/arm/mach-exynos/exynos.c | 3 +++
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index ed7a439..d7091e0 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -133,9 +133,6 @@ static int exynos_cpuidle_probe(struct platform_device *pdev)
{
int ret;
- if (soc_is_exynos5440())
- exynos_idle_driver.state_count = 1;
-
ret = cpuidle_register(&exynos_idle_driver, NULL);
if (ret) {
dev_err(&pdev->dev, "failed to register cpuidle driver\n");
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index b567361..fe8dac8 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -227,6 +227,9 @@ static struct platform_device exynos_cpuidle = {
void __init exynos_cpuidle_init(void)
{
+ if (soc_is_exynos5440())
+ return;
+
platform_device_register(&exynos_cpuidle);
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH V4 14/20] ARM: exynos: cpuidle: Encapsulate the AFTR code into a function
2014-04-10 9:55 [PATCH V4 00/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle Daniel Lezcano
` (12 preceding siblings ...)
2014-04-10 9:55 ` [PATCH V4 13/20] ARM: exynos: cpuidle: Disable cpuidle for 5440 Daniel Lezcano
@ 2014-04-10 9:55 ` Daniel Lezcano
2014-04-10 9:55 ` [PATCH V4 15/20] ARM: exynos: cpuidle: Move the AFTR state function into pm.c Daniel Lezcano
` (5 subsequent siblings)
19 siblings, 0 replies; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-10 9:55 UTC (permalink / raw)
To: linux-arm-kernel
Let's encapsulate the AFTR state specific call into a single function.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
arch/arm/mach-exynos/cpuidle.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index d7091e0..0d3c839 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -51,13 +51,17 @@ static void exynos_cpu_set_boot_vector(long flags)
__raw_writel(flags, REG_DIRECTGO_FLAG);
}
-static int idle_finisher(unsigned long flags)
+static void exynos_enter_aftr(void)
{
exynos_set_wakeupmask(0x0000ff3e);
exynos_cpu_set_boot_vector(S5P_CHECK_AFTR);
/* Set value of power down register for aftr mode */
exynos_sys_powerdown_conf(SYS_AFTR);
+}
+static int idle_finisher(unsigned long flags)
+{
+ exynos_enter_aftr();
cpu_do_idle();
return 1;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH V4 15/20] ARM: exynos: cpuidle: Move the AFTR state function into pm.c
2014-04-10 9:55 [PATCH V4 00/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle Daniel Lezcano
` (13 preceding siblings ...)
2014-04-10 9:55 ` [PATCH V4 14/20] ARM: exynos: cpuidle: Encapsulate the AFTR code into a function Daniel Lezcano
@ 2014-04-10 9:55 ` Daniel Lezcano
2014-04-10 9:55 ` [PATCH V4 16/20] ARM: exynos: cpuidle: Move the power sequence call in the cpu_pm notifier Daniel Lezcano
` (4 subsequent siblings)
19 siblings, 0 replies; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-10 9:55 UTC (permalink / raw)
To: linux-arm-kernel
In order to remove depedency on pm code, let's move the 'exynos_enter_aftr'
function into the pm.c file as well as the other helper functions.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
arch/arm/mach-exynos/common.h | 1 +
arch/arm/mach-exynos/cpuidle.c | 29 -----------------------------
arch/arm/mach-exynos/pm.c | 29 +++++++++++++++++++++++++++++
3 files changed, 30 insertions(+), 29 deletions(-)
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index 9ef3f83..30123a0 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -62,5 +62,6 @@ struct exynos_pmu_conf {
};
extern void exynos_sys_powerdown_conf(enum sys_powerdown mode);
+extern void exynos_enter_aftr(void);
#endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index 0d3c839..5c5a4d1 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -30,35 +30,6 @@
#include "common.h"
#include "regs-pmu.h"
-#define REG_DIRECTGO_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \
- S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \
- (S5P_VA_SYSRAM + 0x24) : S5P_INFORM0))
-#define REG_DIRECTGO_FLAG (samsung_rev() == EXYNOS4210_REV_1_1 ? \
- S5P_INFORM6 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \
- (S5P_VA_SYSRAM + 0x20) : S5P_INFORM1))
-
-#define S5P_CHECK_AFTR 0xFCBA0D10
-
-/* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */
-static void exynos_set_wakeupmask(long mask)
-{
- __raw_writel(mask, S5P_WAKEUP_MASK);
-}
-
-static void exynos_cpu_set_boot_vector(long flags)
-{
- __raw_writel(virt_to_phys(exynos_cpu_resume), REG_DIRECTGO_ADDR);
- __raw_writel(flags, REG_DIRECTGO_FLAG);
-}
-
-static void exynos_enter_aftr(void)
-{
- exynos_set_wakeupmask(0x0000ff3e);
- exynos_cpu_set_boot_vector(S5P_CHECK_AFTR);
- /* Set value of power down register for aftr mode */
- exynos_sys_powerdown_conf(SYS_AFTR);
-}
-
static int idle_finisher(unsigned long flags)
{
exynos_enter_aftr();
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index c4138bf..f75d9b9 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -101,6 +101,35 @@ static int exynos_irq_set_wake(struct irq_data *data, unsigned int state)
return -ENOENT;
}
+#define EXYNOS_BOOT_VECTOR_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \
+ S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \
+ (S5P_VA_SYSRAM + 0x24) : S5P_INFORM0))
+#define EXYNOS_BOOT_VECTOR_FLAG (samsung_rev() == EXYNOS4210_REV_1_1 ? \
+ S5P_INFORM6 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \
+ (S5P_VA_SYSRAM + 0x20) : S5P_INFORM1))
+
+#define S5P_CHECK_AFTR 0xFCBA0D10
+
+/* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */
+static void exynos_set_wakeupmask(long mask)
+{
+ __raw_writel(mask, S5P_WAKEUP_MASK);
+}
+
+static void exynos_cpu_set_boot_vector(long flags)
+{
+ __raw_writel(virt_to_phys(exynos_cpu_resume), EXYNOS_BOOT_VECTOR_ADDR);
+ __raw_writel(flags, EXYNOS_BOOT_VECTOR_FLAG);
+}
+
+void exynos_enter_aftr(void)
+{
+ exynos_set_wakeupmask(0x0000ff3e);
+ exynos_cpu_set_boot_vector(S5P_CHECK_AFTR);
+ /* Set value of power down register for aftr mode */
+ exynos_sys_powerdown_conf(SYS_AFTR);
+}
+
/* For Cortex-A9 Diagnostic and Power control register */
static unsigned int save_arm_register[2];
--
1.7.9.5
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH V4 16/20] ARM: exynos: cpuidle: Move the power sequence call in the cpu_pm notifier
2014-04-10 9:55 [PATCH V4 00/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle Daniel Lezcano
` (14 preceding siblings ...)
2014-04-10 9:55 ` [PATCH V4 15/20] ARM: exynos: cpuidle: Move the AFTR state function into pm.c Daniel Lezcano
@ 2014-04-10 9:55 ` Daniel Lezcano
2014-04-10 9:55 ` [PATCH V4 17/20] ARM: exynos: cpuidle: Move S5P_CHECK_SLEEP into pm.c Daniel Lezcano
` (3 subsequent siblings)
19 siblings, 0 replies; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-10 9:55 UTC (permalink / raw)
To: linux-arm-kernel
The code to initiate and exit the powerdown sequence is the same in pm.c and
cpuidle.c.
Let's split the common part in the pm.c and reuse it from the cpu_pm notifier.
That is one more step forward to make the cpuidle driver arch indenpendant.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
arch/arm/mach-exynos/cpuidle.c | 22 ----------------------
arch/arm/mach-exynos/pm.c | 24 ++++++++++++++++++++----
2 files changed, 20 insertions(+), 26 deletions(-)
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index 5c5a4d1..0651293 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -28,7 +28,6 @@
#include <mach/map.h>
#include "common.h"
-#include "regs-pmu.h"
static int idle_finisher(unsigned long flags)
{
@@ -42,31 +41,10 @@ static int exynos_enter_core0_aftr(struct cpuidle_device *dev,
struct cpuidle_driver *drv,
int index)
{
- unsigned long tmp;
-
- /* Setting Central Sequence Register for power down mode */
- tmp = __raw_readl(S5P_CENTRAL_SEQ_CONFIGURATION);
- tmp &= ~S5P_CENTRAL_LOWPWR_CFG;
- __raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION);
-
cpu_pm_enter();
cpu_suspend(0, idle_finisher);
cpu_pm_exit();
- /*
- * If PMU failed while entering sleep mode, WFI will be
- * ignored by PMU and then exiting cpu_do_idle().
- * S5P_CENTRAL_LOWPWR_CFG bit will not be set automatically
- * in this situation.
- */
- tmp = __raw_readl(S5P_CENTRAL_SEQ_CONFIGURATION);
- if (!(tmp & S5P_CENTRAL_LOWPWR_CFG)) {
- tmp |= S5P_CENTRAL_LOWPWR_CFG;
- __raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION);
- /* Clear wakeup state register */
- __raw_writel(0x0, S5P_WAKEUP_STAT);
- }
-
return index;
}
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index f75d9b9..a943e97 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -245,15 +245,21 @@ static void exynos_pm_prepare(void)
__raw_writel(virt_to_phys(exynos_cpu_resume), S5P_INFORM0);
}
-static int exynos_pm_suspend(void)
+static void exynos_pm_central_suspend(void)
{
unsigned long tmp;
/* Setting Central Sequence Register for power down mode */
-
tmp = __raw_readl(S5P_CENTRAL_SEQ_CONFIGURATION);
tmp &= ~S5P_CENTRAL_LOWPWR_CFG;
__raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION);
+}
+
+static int exynos_pm_suspend(void)
+{
+ unsigned long tmp;
+
+ exynos_pm_central_suspend();
/* Setting SEQ_OPTION register */
@@ -266,7 +272,7 @@ static int exynos_pm_suspend(void)
return 0;
}
-static void exynos_pm_resume(void)
+static int exynos_pm_central_resume(void)
{
unsigned long tmp;
@@ -283,9 +289,17 @@ static void exynos_pm_resume(void)
/* clear the wakeup state register */
__raw_writel(0x0, S5P_WAKEUP_STAT);
/* No need to perform below restore code */
- goto early_wakeup;
+ return -1;
}
+ return 0;
+}
+
+static void exynos_pm_resume(void)
+{
+ if (exynos_pm_central_resume())
+ goto early_wakeup;
+
if (!soc_is_exynos5250())
exynos_cpu_restore_register();
@@ -394,6 +408,7 @@ static int exynos_cpu_pm_notifier(struct notifier_block *self,
switch (cmd) {
case CPU_PM_ENTER:
if (cpu == 0) {
+ exynos_pm_central_suspend();
exynos_cpu_save_register();
}
break;
@@ -403,6 +418,7 @@ static int exynos_cpu_pm_notifier(struct notifier_block *self,
if (!soc_is_exynos5250())
scu_enable(S5P_VA_SCU);
exynos_cpu_restore_register();
+ exynos_pm_central_resume();
}
break;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH V4 17/20] ARM: exynos: cpuidle: Move S5P_CHECK_SLEEP into pm.c
2014-04-10 9:55 [PATCH V4 00/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle Daniel Lezcano
` (15 preceding siblings ...)
2014-04-10 9:55 ` [PATCH V4 16/20] ARM: exynos: cpuidle: Move the power sequence call in the cpu_pm notifier Daniel Lezcano
@ 2014-04-10 9:55 ` Daniel Lezcano
2014-04-10 9:55 ` [PATCH V4 18/20] ARM: exynos: cpuidle: Pass the AFTR callback to the platform_data Daniel Lezcano
` (2 subsequent siblings)
19 siblings, 0 replies; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-10 9:55 UTC (permalink / raw)
To: linux-arm-kernel
This macro is only used there.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
arch/arm/mach-exynos/pm.c | 3 ++-
arch/arm/mach-exynos/regs-pmu.h | 2 --
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index a943e97..aa23662 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -108,7 +108,8 @@ static int exynos_irq_set_wake(struct irq_data *data, unsigned int state)
S5P_INFORM6 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \
(S5P_VA_SYSRAM + 0x20) : S5P_INFORM1))
-#define S5P_CHECK_AFTR 0xFCBA0D10
+#define S5P_CHECK_AFTR 0xFCBA0D10
+#define S5P_CHECK_SLEEP 0x00000BAD
/* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */
static void exynos_set_wakeupmask(long mask)
diff --git a/arch/arm/mach-exynos/regs-pmu.h b/arch/arm/mach-exynos/regs-pmu.h
index 35c4eb3..d7803c4 100644
--- a/arch/arm/mach-exynos/regs-pmu.h
+++ b/arch/arm/mach-exynos/regs-pmu.h
@@ -119,8 +119,6 @@
#define S5P_CORE_LOCAL_PWR_EN 0x3
#define S5P_INT_LOCAL_PWR_EN 0x7
-#define S5P_CHECK_SLEEP 0x00000BAD
-
/* Only for EXYNOS4210 */
#define S5P_CMU_CLKSTOP_LCD1_LOWPWR S5P_PMUREG(0x1154)
#define S5P_CMU_RESET_LCD1_LOWPWR S5P_PMUREG(0x1174)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH V4 18/20] ARM: exynos: cpuidle: Pass the AFTR callback to the platform_data
2014-04-10 9:55 [PATCH V4 00/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle Daniel Lezcano
` (16 preceding siblings ...)
2014-04-10 9:55 ` [PATCH V4 17/20] ARM: exynos: cpuidle: Move S5P_CHECK_SLEEP into pm.c Daniel Lezcano
@ 2014-04-10 9:55 ` Daniel Lezcano
2014-04-10 9:55 ` [PATCH V4 19/20] ARM: exynos: cpuidle: Cleanup all unneeded headers from cpuidle.c Daniel Lezcano
2014-04-10 9:55 ` [PATCH V4 20/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle directory Daniel Lezcano
19 siblings, 0 replies; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-10 9:55 UTC (permalink / raw)
To: linux-arm-kernel
No more dependency on the arch code. The platform_data field is used to set the
PM callback as the other cpuidle drivers.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
arch/arm/mach-exynos/cpuidle.c | 4 +++-
arch/arm/mach-exynos/exynos.c | 5 +++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index 0651293..ef592ad 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -27,7 +27,7 @@
#include <mach/map.h>
-#include "common.h"
+static void (*exynos_enter_aftr)(void);
static int idle_finisher(unsigned long flags)
{
@@ -86,6 +86,8 @@ static int exynos_cpuidle_probe(struct platform_device *pdev)
{
int ret;
+ exynos_enter_aftr = (void *)(pdev->dev.platform_data);
+
ret = cpuidle_register(&exynos_idle_driver, NULL);
if (ret) {
dev_err(&pdev->dev, "failed to register cpuidle driver\n");
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index fe8dac8..d22f0e4 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -221,8 +221,9 @@ void exynos_restart(enum reboot_mode mode, const char *cmd)
}
static struct platform_device exynos_cpuidle = {
- .name = "exynos_cpuidle",
- .id = -1,
+ .name = "exynos_cpuidle",
+ .dev.platform_data = exynos_enter_aftr,
+ .id = -1,
};
void __init exynos_cpuidle_init(void)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH V4 19/20] ARM: exynos: cpuidle: Cleanup all unneeded headers from cpuidle.c
2014-04-10 9:55 [PATCH V4 00/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle Daniel Lezcano
` (17 preceding siblings ...)
2014-04-10 9:55 ` [PATCH V4 18/20] ARM: exynos: cpuidle: Pass the AFTR callback to the platform_data Daniel Lezcano
@ 2014-04-10 9:55 ` Daniel Lezcano
2014-04-10 9:55 ` [PATCH V4 20/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle directory Daniel Lezcano
19 siblings, 0 replies; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-10 9:55 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
arch/arm/mach-exynos/cpuidle.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index ef592ad..52ef229a 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -8,25 +8,15 @@
* published by the Free Software Foundation.
*/
-#include <linux/kernel.h>
-#include <linux/init.h>
#include <linux/cpuidle.h>
#include <linux/cpu_pm.h>
-#include <linux/io.h>
#include <linux/export.h>
-#include <linux/time.h>
#include <linux/platform_device.h>
#include <asm/proc-fns.h>
#include <asm/suspend.h>
-#include <asm/unified.h>
#include <asm/cpuidle.h>
-#include <plat/cpu.h>
-#include <plat/pm.h>
-
-#include <mach/map.h>
-
static void (*exynos_enter_aftr)(void);
static int idle_finisher(unsigned long flags)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH V4 20/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle directory
2014-04-10 9:55 [PATCH V4 00/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle Daniel Lezcano
` (18 preceding siblings ...)
2014-04-10 9:55 ` [PATCH V4 19/20] ARM: exynos: cpuidle: Cleanup all unneeded headers from cpuidle.c Daniel Lezcano
@ 2014-04-10 9:55 ` Daniel Lezcano
19 siblings, 0 replies; 27+ messages in thread
From: Daniel Lezcano @ 2014-04-10 9:55 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/Makefile | 1 -
drivers/cpuidle/Kconfig.arm | 6 ++++++
drivers/cpuidle/Makefile | 1 +
.../cpuidle.c => drivers/cpuidle/cpuidle-exynos.c | 0
4 files changed, 7 insertions(+), 1 deletion(-)
rename arch/arm/mach-exynos/cpuidle.c => drivers/cpuidle/cpuidle-exynos.c (100%)
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index a656dbe..21bd364 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -16,7 +16,6 @@ obj-$(CONFIG_ARCH_EXYNOS) += exynos.o
obj-$(CONFIG_PM_SLEEP) += pm.o sleep.o
obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o
-obj-$(CONFIG_CPU_IDLE) += cpuidle.o
obj-$(CONFIG_ARCH_EXYNOS) += pmu.o
diff --git a/drivers/cpuidle/Kconfig.arm b/drivers/cpuidle/Kconfig.arm
index d988948..364c984 100644
--- a/drivers/cpuidle/Kconfig.arm
+++ b/drivers/cpuidle/Kconfig.arm
@@ -44,3 +44,9 @@ config ARM_AT91_CPUIDLE
depends on ARCH_AT91
help
Select this to enable cpuidle for AT91 processors
+
+config ARM_EXYNOS_CPUIDLE
+ bool "Cpu Idle Driver for the Exynos processors"
+ depends on ARCH_EXYNOS
+ help
+ Select this to enable cpuidle for Exynos processors
diff --git a/drivers/cpuidle/Makefile b/drivers/cpuidle/Makefile
index f71ae1b..0d1540a 100644
--- a/drivers/cpuidle/Makefile
+++ b/drivers/cpuidle/Makefile
@@ -13,6 +13,7 @@ obj-$(CONFIG_ARM_KIRKWOOD_CPUIDLE) += cpuidle-kirkwood.o
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
###############################################################################
# POWERPC drivers
diff --git a/arch/arm/mach-exynos/cpuidle.c b/drivers/cpuidle/cpuidle-exynos.c
similarity index 100%
rename from arch/arm/mach-exynos/cpuidle.c
rename to drivers/cpuidle/cpuidle-exynos.c
--
1.7.9.5
^ permalink raw reply related [flat|nested] 27+ messages in thread