summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorRob Purchase <shotofadds@rockbox.org>2008-03-22 13:18:47 +0000
committerRob Purchase <shotofadds@rockbox.org>2008-03-22 13:18:47 +0000
commit1836971d5152b44e905c4b6ed0e641e6d4f361fb (patch)
tree82c4c1856339dc9763e880b888252696549af53d /firmware
parentbc227c0aa2849e125d2eb00cd14660c56e966ae6 (diff)
downloadrockbox-1836971d5152b44e905c4b6ed0e641e6d4f361fb.tar.gz
rockbox-1836971d5152b44e905c4b6ed0e641e6d4f361fb.zip
Implement core_sleep() for TCC780x (single core).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16740 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/thread.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/firmware/thread.c b/firmware/thread.c
index d348f7439d..8bebfedbf5 100644
--- a/firmware/thread.c
+++ b/firmware/thread.c
@@ -758,6 +758,19 @@ static inline void core_sleep(void)
758{ 758{
759 #warning TODO: Implement core_sleep 759 #warning TODO: Implement core_sleep
760} 760}
761#elif defined(CPU_TCC780X)
762static inline void core_sleep(void)
763{
764 /* Single core only for now. Use the generic ARMv5 wait for IRQ */
765 asm volatile (
766 "mov r0, #0 \n"
767 "mcr p15, 0, r0, c7, c0, 4 \n" /* Wait for interrupt */
768 "mrs r0, cpsr \n" /* Unmask IRQ/FIQ at core level */
769 "bic r0, r0, #0xc0 \n"
770 "msr cpsr_c, r0 \n"
771 : : : "r0"
772 );
773}
761#elif CONFIG_CPU == IMX31L 774#elif CONFIG_CPU == IMX31L
762static inline void core_sleep(void) 775static inline void core_sleep(void)
763{ 776{