From 45cff183a209608631d58da5dfaa49b891c47828 Mon Sep 17 00:00:00 2001 From: Andrew Boie Date: Tue, 7 Jun 2016 10:26:57 -0700 Subject: [PATCH] nios2: implement nano_cpu_idle and nano_cpu_atomic_idle Nios II does not have a power saving instruction, so there is nothing to really do here other than ensure that interrupts are in the correct state when leaving nano_cpu_atomic_idle(). Change-Id: I664c7542dc2fc1795a453d35e183a737dcb20c38 Signed-off-by: Andrew Boie --- arch/nios2/core/cpu_idle.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/nios2/core/cpu_idle.c b/arch/nios2/core/cpu_idle.c index 84ab6fba98b..e4c3f192c7a 100644 --- a/arch/nios2/core/cpu_idle.c +++ b/arch/nios2/core/cpu_idle.c @@ -29,7 +29,9 @@ */ void nano_cpu_idle(void) { - /* STUB */ + /* Do nothing but return to the caller. This CPU does not have any + * kind of power saving instruction. + */ } /** @@ -55,6 +57,9 @@ void nano_cpu_idle(void) */ void nano_cpu_atomic_idle(unsigned int key) { - /* STUB */ + /* Do nothing but restore IRQ state. This CPU does not have any + * kind of power saving instruction. + */ + irq_unlock(key); }