From 22ae232db2d62c47c512ca800253e1609f31c336 Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Sun, 9 Nov 2008 23:56:54 +0000 Subject: core_sleep(): only write once the same implementation, and add as3525 to the list git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19057 a1c6a512-1295-4272-9138-f99709370657 --- firmware/thread.c | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/firmware/thread.c b/firmware/thread.c index 23463f596c..c500fc4818 100644 --- a/firmware/thread.c +++ b/firmware/thread.c @@ -777,28 +777,9 @@ static inline void core_sleep(void) "msr cpsr_c, r0 \n" /* Enable IRQ, restore FIQ */ : : : "r0", "r1", "r2"); } -#elif defined(CPU_TCC780X) || defined(CPU_TCC77X) -static inline void core_sleep(void) -{ - /* Single core only for now. Use the generic ARMv5 wait for IRQ */ - asm volatile ( - "mov r0, #0 \n" - "mcr p15, 0, r0, c7, c0, 4 \n" /* Wait for interrupt */ - : : : "r0" - ); - enable_irq(); -} -#elif CONFIG_CPU == IMX31L -static inline void core_sleep(void) -{ - asm volatile ( - "mov r0, #0 \n" - "mcr p15, 0, r0, c7, c0, 4 \n" /* Wait for interrupt */ - : : : "r0" - ); - enable_irq(); -} -#elif CONFIG_CPU == DM320 +#elif defined(CPU_TCC780X) || defined(CPU_TCC77X) /* Single core only for now */ \ +|| CONFIG_CPU == IMX31L || CONFIG_CPU == DM320 || CONFIG_CPU == AS3525 +/* Use the generic ARMv4/v5 wait for IRQ */ static inline void core_sleep(void) { asm volatile ( -- cgit v1.2.3