summaryrefslogtreecommitdiff
path: root/firmware/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/thread.c')
-rw-r--r--firmware/thread.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/thread.c b/firmware/thread.c
index d6a4a4f3db..8834666b54 100644
--- a/firmware/thread.c
+++ b/firmware/thread.c
@@ -23,7 +23,7 @@
23#include "kernel.h" 23#include "kernel.h"
24#include "cpu.h" 24#include "cpu.h"
25 25
26#if CONFIG_CPU == MCF5249 26#ifdef CPU_COLDFIRE
27struct regs 27struct regs
28{ 28{
29 unsigned int d[6]; /* d2-d7 */ 29 unsigned int d[6]; /* d2-d7 */
@@ -68,7 +68,7 @@ void switch_thread(void) __attribute__ ((section(".icode")));
68static inline void store_context(void* addr) __attribute__ ((always_inline)); 68static inline void store_context(void* addr) __attribute__ ((always_inline));
69static inline void load_context(const void* addr) __attribute__ ((always_inline)); 69static inline void load_context(const void* addr) __attribute__ ((always_inline));
70 70
71#if CONFIG_CPU == MCF5249 71#ifdef CPU_COLDFIRE
72/*--------------------------------------------------------------------------- 72/*---------------------------------------------------------------------------
73 * Store non-volatile context. 73 * Store non-volatile context.
74 *--------------------------------------------------------------------------- 74 *---------------------------------------------------------------------------
@@ -212,7 +212,7 @@ void switch_thread(void)
212 while (num_sleepers == num_threads) 212 while (num_sleepers == num_threads)
213 { 213 {
214 /* Enter sleep mode, woken up on interrupt */ 214 /* Enter sleep mode, woken up on interrupt */
215#if CONFIG_CPU == MCF5249 215#ifdef CPU_COLDFIRE
216 asm volatile ("stop #0x2000"); 216 asm volatile ("stop #0x2000");
217#elif CONFIG_CPU == SH7034 217#elif CONFIG_CPU == SH7034
218 SBYCR &= 0x7F; 218 SBYCR &= 0x7F;
@@ -285,7 +285,7 @@ int create_thread(void (*function)(void), void* stack, int stack_size,
285 thread_stack[num_threads] = stack; 285 thread_stack[num_threads] = stack;
286 thread_stack_size[num_threads] = stack_size; 286 thread_stack_size[num_threads] = stack_size;
287 regs = &thread_contexts[num_threads]; 287 regs = &thread_contexts[num_threads];
288#if (CONFIG_CPU == MCF5249) || (CONFIG_CPU == SH7034) 288#if defined(CPU_COLDFIRE) || (CONFIG_CPU == SH7034)
289 /* Align stack to an even 32 bit boundary */ 289 /* Align stack to an even 32 bit boundary */
290 regs->sp = (void*)(((unsigned int)stack + stack_size) & ~3); 290 regs->sp = (void*)(((unsigned int)stack + stack_size) & ~3);
291#elif CONFIG_CPU == TCC730 291#elif CONFIG_CPU == TCC730
@@ -333,7 +333,7 @@ void init_threads(void)
333 thread_name[0] = main_thread_name; 333 thread_name[0] = main_thread_name;
334 thread_stack[0] = stackbegin; 334 thread_stack[0] = stackbegin;
335 thread_stack_size[0] = (int)stackend - (int)stackbegin; 335 thread_stack_size[0] = (int)stackend - (int)stackbegin;
336#if (CONFIG_CPU == MCF5249) || (CONFIG_CPU == SH7034) 336#if defined(CPU_COLDFIRE) || (CONFIG_CPU == SH7034)
337 thread_contexts[0].start = 0; /* thread 0 already running */ 337 thread_contexts[0].start = 0; /* thread 0 already running */
338#elif CONFIG_CPU == TCC730 338#elif CONFIG_CPU == TCC730
339 thread_contexts[0].started = 1; 339 thread_contexts[0].started = 1;