summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-gemini/board-dt.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-gemini/board-dt.c')
-rw-r--r--arch/arm/mach-gemini/board-dt.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-gemini/board-dt.c b/arch/arm/mach-gemini/board-dt.c
index 208ea99cdc47..c0c0ebdd551e 100644
--- a/arch/arm/mach-gemini/board-dt.c
+++ b/arch/arm/mach-gemini/board-dt.c
@@ -7,6 +7,8 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
+#include <asm/system_misc.h>
+#include <asm/proc-fns.h>
#ifdef CONFIG_DEBUG_GEMINI
/* This is needed for LL-debug/earlyprintk/debug-macro.S */
@@ -27,6 +29,27 @@ static void __init gemini_map_io(void)
#define gemini_map_io NULL
#endif
+static void gemini_idle(void)
+{
+ /*
+ * Because of broken hardware we have to enable interrupts or the CPU
+ * will never wakeup... Acctualy it is not very good to enable
+ * interrupts first since scheduler can miss a tick, but there is
+ * no other way around this. Platforms that needs it for power saving
+ * should enable it in init code, since by default it is
+ * disabled.
+ */
+
+ /* FIXME: Enabling interrupts here is racy! */
+ local_irq_enable();
+ cpu_do_idle();
+}
+
+static void __init gemini_init_machine(void)
+{
+ arm_pm_idle = gemini_idle;
+}
+
static const char *gemini_board_compat[] = {
"cortina,gemini",
NULL,
@@ -34,5 +57,6 @@ static const char *gemini_board_compat[] = {
DT_MACHINE_START(GEMINI_DT, "Gemini (Device Tree)")
.map_io = gemini_map_io,
+ .init_machine = gemini_init_machine,
.dt_compat = gemini_board_compat,
MACHINE_END