summaryrefslogtreecommitdiff
path: root/firmware/thread.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-02-05 04:43:19 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-02-05 04:43:19 +0000
commit1f021af60cd0351a309666c2e32b3d1b8b2cbd6f (patch)
tree88710bcc59d80831327b00d59af0eb6a6f758de6 /firmware/thread.c
parent3f85a4bc97fb2120870fcd4a6650fd72d4a6338f (diff)
downloadrockbox-1f021af60cd0351a309666c2e32b3d1b8b2cbd6f.tar.gz
rockbox-1f021af60cd0351a309666c2e32b3d1b8b2cbd6f.zip
Gigabeat S mixer: Make some progress. Get the tick and core sleep working using the AVIC. Redo the startup code to remap from IRAM and not include the lcd driver frambuffer in the remapping (until it can be moved). Clean up LCD driver. For other misc. changes, see the diffs. Now it progresses to ATA init and fails with -11 but without crashing or hanging. Replace all bootloaders.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16216 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/thread.c')
-rw-r--r--firmware/thread.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/firmware/thread.c b/firmware/thread.c
index fdef2cdf2b..41160a080a 100644
--- a/firmware/thread.c
+++ b/firmware/thread.c
@@ -750,6 +750,18 @@ static inline void core_sleep(void)
750{ 750{
751 #warning TODO: Implement core_sleep 751 #warning TODO: Implement core_sleep
752} 752}
753#elif CONFIG_CPU == IMX31L
754static inline void core_sleep(void)
755{
756 asm volatile (
757 "mov r0, #0 \n"
758 "mcr p15, 0, r0, c7, c0, 4 \n" /* Wait for interrupt */
759 "mrs r0, cpsr \n" /* Unmask IRQ/FIQ at core level */
760 "bic r0, r0, #0xc0 \n"
761 "msr cpsr_c, r0 \n"
762 : : : "r0"
763 );
764}
753#else 765#else
754static inline void core_sleep(void) 766static inline void core_sleep(void)
755{ 767{
@@ -2542,6 +2554,9 @@ void init_threads(void)
2542 struct thread_entry *thread; 2554 struct thread_entry *thread;
2543 int slot; 2555 int slot;
2544 2556
2557 memset(threads, 0, sizeof(threads));
2558 memset(cores, 0, sizeof(cores));
2559
2545 /* CPU will initialize first and then sleep */ 2560 /* CPU will initialize first and then sleep */
2546 slot = find_empty_thread_slot(); 2561 slot = find_empty_thread_slot();
2547 2562