ARM: mach-h720x: move special idle code out of line
... and hook it to arm_pm_idle. Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
This commit is contained in:
parent
8925b0f88e
commit
50edbf78f5
2 changed files with 19 additions and 6 deletions
|
@ -247,3 +247,21 @@ void h720x_restart(char mode, const char *cmd)
|
||||||
{
|
{
|
||||||
CPU_REG (PMU_BASE, PMU_STAT) |= PMU_WARMRESET;
|
CPU_REG (PMU_BASE, PMU_STAT) |= PMU_WARMRESET;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void h720x__idle(void)
|
||||||
|
{
|
||||||
|
CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_IDLE;
|
||||||
|
nop();
|
||||||
|
nop();
|
||||||
|
CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_RUN;
|
||||||
|
nop();
|
||||||
|
nop();
|
||||||
|
}
|
||||||
|
|
||||||
|
static int __init h720x_idle_init(void)
|
||||||
|
{
|
||||||
|
arm_pm_idle = h720x__idle;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
arch_initcall(h720x_idle_init);
|
||||||
|
|
|
@ -16,12 +16,7 @@
|
||||||
|
|
||||||
static void arch_idle(void)
|
static void arch_idle(void)
|
||||||
{
|
{
|
||||||
CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_IDLE;
|
cpu_do_idle();
|
||||||
nop();
|
|
||||||
nop();
|
|
||||||
CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_RUN;
|
|
||||||
nop();
|
|
||||||
nop();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue