diff options
30 files changed, 55 insertions, 50 deletions
diff --git a/apps/codecs/Tremor/asm_mcf5249.h b/apps/codecs/Tremor/asm_mcf5249.h index 3aaa66b4af..7b071f96c2 100644 --- a/apps/codecs/Tremor/asm_mcf5249.h +++ b/apps/codecs/Tremor/asm_mcf5249.h @@ -19,7 +19,7 @@ #include "os_types.h" -#if CONFIG_CPU == MCF5249 && !defined(SIMULATOR) +#ifdef CPU_COLDFIRE && !defined(SIMULATOR) /* attribute for 16-byte alignment */ #define LINE_ATTR __attribute__ ((aligned (16))) diff --git a/apps/codecs/Tremor/block.c b/apps/codecs/Tremor/block.c index f51622b5ed..fb451f6868 100644 --- a/apps/codecs/Tremor/block.c +++ b/apps/codecs/Tremor/block.c @@ -260,7 +260,7 @@ int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb){ vorbis_info *vi=v->vi; codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; private_state *b=v->backend_state; -#if CONFIG_CPU == MCF5249 +#ifdef CPU_COLDFIRE int j; #else int i,j; @@ -310,7 +310,7 @@ int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb){ /* large/large */ ogg_int32_t *pcm=v->pcm[j]+prevCenter; ogg_int32_t *p=vb->pcm[j]; -#if CONFIG_CPU == MCF5249 +#ifdef CPU_COLDFIRE mcf5249_vect_add(pcm, p, n1); #else for(i=0;i<n1;i++) @@ -320,7 +320,7 @@ int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb){ /* large/small */ ogg_int32_t *pcm=v->pcm[j]+prevCenter+n1/2-n0/2; ogg_int32_t *p=vb->pcm[j]; -#if CONFIG_CPU == MCF5249 +#ifdef CPU_COLDFIRE mcf5249_vect_add(pcm, p, n0); #else for(i=0;i<n0;i++) @@ -332,7 +332,7 @@ int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb){ /* small/large */ ogg_int32_t *pcm=v->pcm[j]+prevCenter; ogg_int32_t *p=vb->pcm[j]+n1/2-n0/2; -#if CONFIG_CPU == MCF5249 +#ifdef CPU_COLDFIRE mcf5249_vect_add(pcm, p, n0); mcf5249_vect_copy(&pcm[n0], &p[n0], n1/2-n0/2); #else @@ -345,7 +345,7 @@ int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb){ /* small/small */ ogg_int32_t *pcm=v->pcm[j]+prevCenter; ogg_int32_t *p=vb->pcm[j]; -#if CONFIG_CPU == MCF5249 +#ifdef CPU_COLDFIRE mcf5249_vect_add(pcm, p, n0); #else for(i=0;i<n0;i++) @@ -358,7 +358,7 @@ int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb){ { ogg_int32_t *pcm=v->pcm[j]+thisCenter; ogg_int32_t *p=vb->pcm[j]+n; -#if CONFIG_CPU == MCF5249 +#ifdef CPU_COLDFIRE mcf5249_vect_copy(pcm, p, n); #else for(i=0;i<n;i++) diff --git a/apps/codecs/Tremor/vorbisfile.c b/apps/codecs/Tremor/vorbisfile.c index c8fad7372b..060b0bac89 100644 --- a/apps/codecs/Tremor/vorbisfile.c +++ b/apps/codecs/Tremor/vorbisfile.c @@ -1291,7 +1291,7 @@ int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos){ if(ret<0)return(ret); _make_decode_ready(vf); -#if CONFIG_CPU == MCF5249 && !defined(SIMULATOR) +#ifdef CPU_COLDFIRE && !defined(SIMULATOR) mcf5249_init_mac(); #endif @@ -1552,7 +1552,7 @@ long ov_read(OggVorbis_File *vf,char *buffer,int bytes_req,int *bitstream){ if(vf->ready_state<OPENED)return(OV_EINVAL); -#if CONFIG_CPU == MCF5249 && !defined(SIMULATOR) +#ifdef CPU_COLDFIRE && !defined(SIMULATOR) mcf5249_init_mac(); #endif diff --git a/apps/codecs/Tremor/window.c b/apps/codecs/Tremor/window.c index 5a9f4ec6a6..5c7b83f4f2 100644 --- a/apps/codecs/Tremor/window.c +++ b/apps/codecs/Tremor/window.c @@ -68,7 +68,7 @@ void _vorbis_apply_window(ogg_int32_t *d,const void *window_p[2], long rightbegin=n/2+n/4-rn/4; long rightend=rightbegin+rn/2; -#if CONFIG_CPU == MCF5249 +#ifdef CPU_COLDFIRE memset((void *)&d[0], 0, sizeof(ogg_int32_t)*leftbegin); /* mcf5249_vect_zero(&d[0], leftbegin); */ mcf5249_vect_mult_fw(&d[leftbegin], &window[lW][0], leftend-leftbegin); diff --git a/apps/codecs/libFLAC/SOURCES b/apps/codecs/libFLAC/SOURCES index d3a1673c70..d4b6ab532a 100644 --- a/apps/codecs/libFLAC/SOURCES +++ b/apps/codecs/libFLAC/SOURCES @@ -10,6 +10,6 @@ md5.c memory.c seekable_stream_decoder.c stream_decoder.c -#if CONFIG_CPU==MCF5249 && !defined(SIMULATOR) +#ifdef CPU_COLDFIRE && !defined(SIMULATOR) coldfire.S #endif diff --git a/apps/codecs/libFLAC/stream_decoder.c b/apps/codecs/libFLAC/stream_decoder.c index 8ff9c8bbd0..cb622a9695 100644 --- a/apps/codecs/libFLAC/stream_decoder.c +++ b/apps/codecs/libFLAC/stream_decoder.c @@ -43,7 +43,7 @@ #include "private/lpc.h" #include "private/memory.h" -#if CONFIG_CPU==MCF5249 +#ifdef CPU_COLDFIRE #include <private/coldfire.h> #endif @@ -299,7 +299,7 @@ FLAC_API FLAC__StreamDecoderState FLAC__stream_decoder_init(FLAC__StreamDecoder */ FLAC__cpu_info(&decoder->private_->cpuinfo); /* first default to the non-asm routines */ -#if CONFIG_CPU==MCF5249 && !defined(SIMULATOR) +#ifdef CPU_COLDFIRE && !defined(SIMULATOR) decoder->private_->local_lpc_restore_signal = FLAC__lpc_restore_signal_mcf5249; decoder->private_->local_lpc_restore_signal_16bit = FLAC__lpc_restore_signal_mcf5249; decoder->private_->local_lpc_restore_signal_16bit_order8 = FLAC__lpc_restore_signal_mcf5249; diff --git a/apps/codecs/liba52/a52_internal.h b/apps/codecs/liba52/a52_internal.h index 4de21d9dde..14e5795146 100644 --- a/apps/codecs/liba52/a52_internal.h +++ b/apps/codecs/liba52/a52_internal.h @@ -141,7 +141,7 @@ typedef int16_t quantizer_t; #if 0 #define MUL(a,b) ((int)(((int64_t)(a) * (b) + (1 << 29)) >> 30)) #define MUL_L(a,b) ((int)(((int64_t)(a) * (b) + (1 << 25)) >> 26)) -#elif CONFIG_CPU==MCF5249 && !defined(SIMULATOR) +#elif defined(CPU_COLDFIRE) && !defined(SIMULATOR) /* loses 1 bit of accuracy */ #define MUL(a, b) \ ({ \ diff --git a/apps/codecs/liba52/parse.c b/apps/codecs/liba52/parse.c index 3025fb54b6..c06381be9e 100644 --- a/apps/codecs/liba52/parse.c +++ b/apps/codecs/liba52/parse.c @@ -58,7 +58,7 @@ a52_state_t * a52_init (uint32_t mm_accel) a52_state_t * state; int i; - #if CONFIG_CPU==MCF5249 && !defined(SIMULATOR) + #ifdef CPU_COLDFIRE && !defined(SIMULATOR) asm volatile ("move.l #0x30, %macsr"); /* frac. mode with rounding */ #endif /* diff --git a/apps/codecs/libmad/SOURCES b/apps/codecs/libmad/SOURCES index 34a2a68818..5e76423abf 100644 --- a/apps/codecs/libmad/SOURCES +++ b/apps/codecs/libmad/SOURCES @@ -9,6 +9,6 @@ stream.c synth.c timer.c version.c -#if CONFIG_CPU==MCF5249 && !defined(SIMULATOR) +#ifdef CPU_COLDFIRE && !defined(SIMULATOR) imdct_mcf5249.S #endif diff --git a/apps/codecs/libmad/global.h b/apps/codecs/libmad/global.h index bba9f062bf..17dd1dd804 100644 --- a/apps/codecs/libmad/global.h +++ b/apps/codecs/libmad/global.h @@ -24,7 +24,7 @@ # ifndef LIBMAD_GLOBAL_H # define LIBMAD_GLOBAL_H -#if CONFIG_CPU==MCF5249 && !defined(SIMULATOR) +#ifdef CPU_COLDFIRE && !defined(SIMULATOR) #define FPM_COLDFIRE_EMAC #else #define FPM_DEFAULT diff --git a/apps/codecs/libmad/layer3.c b/apps/codecs/libmad/layer3.c index aa46a71c16..e8b80e7ce4 100644 --- a/apps/codecs/libmad/layer3.c +++ b/apps/codecs/libmad/layer3.c @@ -1765,7 +1765,7 @@ void imdct36(mad_fixed_t const x[18], mad_fixed_t y[36]) * DESCRIPTION: perform X[18]->x[36] IMDCT */ -# if CONFIG_CPU==MCF5249 && !defined(SIMULATOR) +# ifdef CPU_COLDFIRE && !defined(SIMULATOR) /* emac optimized imdct36, it is very ugly and i hope to replace it soon. * for now it is actually somewhat faster than the stock implementation. */ @@ -2633,7 +2633,7 @@ void imdct36(mad_fixed_t const X[18], mad_fixed_t x[36]) x[26] = x[27] = MAD_F_MLZ(hi, lo) + t5; } -#endif /* MCF5249 */ +#endif /* CPU_COLDFIRE */ # endif @@ -2729,7 +2729,7 @@ void III_imdct_l(mad_fixed_t const X[18], mad_fixed_t z[36], * DESCRIPTION: perform IMDCT and windowing for short blocks */ -# if CONFIG_CPU==MCF5249 && !defined(SIMULATOR) +# ifdef CPU_COLDFIRE && !defined(SIMULATOR) void III_imdct_s(mad_fixed_t const X[18], mad_fixed_t z[36]); #else diff --git a/apps/codecs/libmusepack/math.h b/apps/codecs/libmusepack/math.h index 8d1e50dda5..532f1350c4 100644 --- a/apps/codecs/libmusepack/math.h +++ b/apps/codecs/libmusepack/math.h @@ -99,7 +99,7 @@ static inline MPC_SAMPLE_FORMAT MPC_MULTIPLY_EX(MPC_SAMPLE_FORMAT item1,MPC_SAMP #ifdef MPC_HAVE_MULHIGH #define MPC_MULTIPLY_FRACT(X,Y) _MulHigh(X,Y) #else -#if CONFIG_CPU==MCF5249 && !defined(SIMULATOR) +#ifdef CPU_COLDFIRE && !defined(SIMULATOR) /* loses one bit of accuracy. the rest of the macros won't be as easy as this... */ #define MPC_MULTIPLY_FRACT(X,Y) \ diff --git a/apps/codecs/libmusepack/synth_filter.c b/apps/codecs/libmusepack/synth_filter.c index 78cf4d1765..105dbb0008 100644 --- a/apps/codecs/libmusepack/synth_filter.c +++ b/apps/codecs/libmusepack/synth_filter.c @@ -335,7 +335,7 @@ static void Synthese_Filter_float_internal(MPC_SAMPLE_FORMAT * OutData,MPC_SAMPL { mpc_uint32_t n; - #if CONFIG_CPU==MCF5249 && !defined(SIMULATOR) + #ifdef CPU_COLDFIRE && !defined(SIMULATOR) asm volatile ("move.l #0x20, %macsr"); /* fractional emac mode */ #endif for ( n = 0; n < 36; n++, Y += 32 ) { @@ -350,7 +350,7 @@ static void Synthese_Filter_float_internal(MPC_SAMPLE_FORMAT * OutData,MPC_SAMPL for ( k = 0; k < 32; k++, D += 16, V++ ) { - #if CONFIG_CPU==MCF5249 && !defined(SIMULATOR) + #ifdef CPU_COLDFIRE && !defined(SIMULATOR) asm volatile ( "movem.l (%[D]), %%d0-%%d3\n\t" "move.l (%[V]), %%a5\n\t" diff --git a/apps/codecs/libwavpack/SOURCES b/apps/codecs/libwavpack/SOURCES index 17399351fd..28e8fb3584 100644 --- a/apps/codecs/libwavpack/SOURCES +++ b/apps/codecs/libwavpack/SOURCES @@ -5,7 +5,7 @@ unpack.c pack.c words.c wputils.c -#if CONFIG_CPU==MCF5249 && !defined(SIMULATOR) +#ifdef CPU_COLDFIRE && !defined(SIMULATOR) coldfire.S #endif diff --git a/apps/codecs/libwavpack/unpack.c b/apps/codecs/libwavpack/unpack.c index aaab2aa928..dcc776e42a 100644 --- a/apps/codecs/libwavpack/unpack.c +++ b/apps/codecs/libwavpack/unpack.c @@ -286,7 +286,7 @@ int read_config_info (WavpackContext *wpc, WavpackMetadata *wpmd) // samples unpacked, which can be less than the number requested if an error // occurs or the end of the block is reached. -#if CONFIG_CPU==MCF5249 && !defined(SIMULATOR) +#ifdef CPU_COLDFIRE && !defined(SIMULATOR) extern void decorr_stereo_pass_cont_mcf5249 (struct decorr_pass *dpp, long *buffer, long sample_count); #else static void decorr_stereo_pass_cont (struct decorr_pass *dpp, long *buffer, long sample_count); @@ -348,7 +348,7 @@ long unpack_samples (WavpackContext *wpc, long *buffer, ulong sample_count) else for (tcount = wps->num_terms, dpp = wps->decorr_passes; tcount--; dpp++) { decorr_stereo_pass (dpp, buffer, 8); -#if CONFIG_CPU==MCF5249 && !defined(SIMULATOR) +#ifdef CPU_COLDFIRE && !defined(SIMULATOR) decorr_stereo_pass_cont_mcf5249 (dpp, buffer + 16, sample_count - 8); #else decorr_stereo_pass_cont (dpp, buffer + 16, sample_count - 8); @@ -510,7 +510,7 @@ static void decorr_stereo_pass (struct decorr_pass *dpp, long *buffer, long samp dpp->weight_B = weight_B; } -#if CONFIG_CPU != MCF5249 || defined(SIMULATOR) +#ifndef CPU_COLDFIRE || defined(SIMULATOR) static void decorr_stereo_pass_cont (struct decorr_pass *dpp, long *buffer, long sample_count) { diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 1e88954434..39475dd94a 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -713,7 +713,7 @@ bool dbg_ports(void) return false; } } -#elif CONFIG_CPU == MCF5249 +#elif defined(CPU_COLDFIRE) unsigned int gpio_out; unsigned int gpio1_out; unsigned int gpio_read; @@ -1563,7 +1563,7 @@ bool debug_menu(void) #if CONFIG_CPU == SH7034 { "Dump ROM contents", dbg_save_roms }, #endif -#if CONFIG_CPU == SH7034 || CONFIG_CPU == MCF5249 +#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) { "View I/O ports", dbg_ports }, #endif #ifdef HAVE_ADJUSTABLE_CPU_FREQ diff --git a/apps/dsp.c b/apps/dsp.c index ee14b86973..8e20a68aed 100644 --- a/apps/dsp.c +++ b/apps/dsp.c @@ -36,7 +36,7 @@ #define SAMPLE_BUF_SIZE 256 #define RESAMPLE_BUF_SIZE (256 * 4) /* Enough for 11,025 Hz -> 44,100 Hz*/ -#if CONFIG_CPU == MCF5249 && !defined(SIMULATOR) +#ifdef CPU_COLDFIRE && !defined(SIMULATOR) #define INIT() asm volatile ("move.l #0xb0, %macsr") /* frac, round, clip */ /* Multiply 2 32-bit integers and return the 32 most significant bits of the diff --git a/apps/plugins/plugin.lds b/apps/plugins/plugin.lds index 41193d950c..8ac3410eeb 100644 --- a/apps/plugins/plugin.lds +++ b/apps/plugins/plugin.lds @@ -2,7 +2,7 @@ /* These output formats should be in the config-files */ -#if CONFIG_CPU == MCF5249 +#ifdef CPU_COLDFIRE OUTPUT_FORMAT(elf32-m68k) #else OUTPUT_FORMAT(elf32-sh) diff --git a/firmware/SOURCES b/firmware/SOURCES index 199c4cb80e..2fca3ffab5 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES @@ -37,7 +37,7 @@ common/timefuncs.c #if CONFIG_CPU == SH7034 common/memcpy_a.S common/memset_a.S -#elif CONFIG_CPU == MCF5249 +#elif defined(CPU_COLDFIRE) common/memcpy.c common/memset_a.S #else diff --git a/firmware/app.lds b/firmware/app.lds index 135e521ef4..ef7cb19d33 100644 --- a/firmware/app.lds +++ b/firmware/app.lds @@ -1,7 +1,7 @@ #include "config.h" ENTRY(start) -#if CONFIG_CPU == MCF5249 +#ifdef CPU_COLDFIRE OUTPUT_FORMAT(elf32-m68k) #elif CONFIG_CPU == TCC730 OUTPUT_FORMAT(elf32-calmrisc16) @@ -187,7 +187,7 @@ SECTIONS _iramend = .; } > IRAM -#if CONFIG_CPU == MCF5249 +#ifdef CPU_COLDFIRE .stack : { *(.stack) @@ -207,7 +207,7 @@ SECTIONS } > DRAM #endif -#if CONFIG_CPU == MCF5249 +#ifdef CPU_COLDFIRE .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram): #else .bss : diff --git a/firmware/boot.lds b/firmware/boot.lds index bdab6c9c97..4ce0eb974c 100644 --- a/firmware/boot.lds +++ b/firmware/boot.lds @@ -1,7 +1,7 @@ #include "config.h" ENTRY(start) -#if CONFIG_CPU == MCF5249 +#ifdef CPU_COLDFIRE OUTPUT_FORMAT(elf32-m68k) #else OUTPUT_FORMAT(elf32-sh) diff --git a/firmware/common/memcpy_a.S b/firmware/common/memcpy_a.S index e129b99442..3fd3f3f753 100644 --- a/firmware/common/memcpy_a.S +++ b/firmware/common/memcpy_a.S @@ -170,7 +170,7 @@ _memcpy: mov r7,r0 /* return dest start address */ .end: .size _memcpy,.end-_memcpy -#elif CONFIG_CPU == MCF5249 +#elif defined(CPU_COLDFIRE) .align 2 .global memcpy .type memcpy,@function diff --git a/firmware/common/memset_a.S b/firmware/common/memset_a.S index c3499c60c3..ba1e470a48 100644 --- a/firmware/common/memset_a.S +++ b/firmware/common/memset_a.S @@ -106,7 +106,7 @@ _memset: .end: .size _memset,.end-_memset -#elif CONFIG_CPU == MCF5249 +#elif defined(CPU_COLDFIRE) .global memset .type memset,@function diff --git a/firmware/export/config.h b/firmware/export/config.h index 1654072a3a..6b77f0dfc1 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -118,6 +118,11 @@ /* no known platform */ #endif +/* define for all cpus from coldfire family */ +#if (CONFIG_CPU == MCF5249) || (CONFIG_CPU == MCF5250) +#define CPU_COLDFIRE +#endif + #ifndef CODEC_SIZE #define CODEC_SIZE 0 #endif diff --git a/firmware/export/system.h b/firmware/export/system.h index f379b325d3..39663f1087 100644 --- a/firmware/export/system.h +++ b/firmware/export/system.h @@ -103,7 +103,7 @@ enum { : /* %0 */ I_CONSTRAINT((char)(mask)), \ /* %1 */ "z"(address-GBR)) -#elif CONFIG_CPU == MCF5249 +#elif defined(CPU_COLDFIRE) #define or_l(mask, address) \ asm \ ("or.l %0,(%1)" \ @@ -182,7 +182,7 @@ static inline unsigned long SWAB32(unsigned long value) #define invalidate_icache() -#elif CONFIG_CPU == MCF5249 +#elif defined(CPU_COLDFIRE) #define HIGHEST_IRQ_LEVEL (7<<8) static inline int set_irq_level(int level) { diff --git a/firmware/kernel.c b/firmware/kernel.c index 5fec25d9b8..44927cd1c3 100644 --- a/firmware/kernel.c +++ b/firmware/kernel.c @@ -205,7 +205,7 @@ void IMIA0(void) TSR0 &= ~0x01; } -#elif CONFIG_CPU == MCF5249 +#elif defined(CPU_COLDFIRE) void tick_start(unsigned int interval_in_ms) { unsigned int count; diff --git a/firmware/panic.c b/firmware/panic.c index 37a185f990..fb024693e1 100644 --- a/firmware/panic.c +++ b/firmware/panic.c @@ -43,7 +43,7 @@ void panicf( const char *fmt, ...) /* Disable interrupts */ #if CONFIG_CPU == SH7034 asm volatile ("ldc\t%0,sr" : : "r"(15<<4)); -#elif CONFIG_CPU == MCF5249 +#elif defined(CPU_COLDFIRE) asm volatile ("move.w #0x2700,%sr"); #endif #endif diff --git a/firmware/rom.lds b/firmware/rom.lds index a4328b0ff5..632a69ed9e 100644 --- a/firmware/rom.lds +++ b/firmware/rom.lds @@ -1,7 +1,7 @@ #include "config.h" ENTRY(start) -#if CONFIG_CPU == MCF5249 +#ifdef CPU_COLDFIRE OUTPUT_FORMAT(elf32-m68k) #else OUTPUT_FORMAT(elf32-sh) diff --git a/firmware/system.c b/firmware/system.c index 219ad976bc..13d424d02b 100644 --- a/firmware/system.c +++ b/firmware/system.c @@ -303,7 +303,7 @@ void system_init(void) -#elif CONFIG_CPU == MCF5249 +#elif defined(CPU_COLDFIRE) #define default_interrupt(name) \ extern __attribute__((weak,alias("UIE"))) void name (void) @@ -1104,7 +1104,7 @@ int system_memory_guard(int newmode) void system_reboot (void) { -#if CONFIG_CPU == MCF5249 +#ifdef CPU_COLDFIRE set_cpu_frequency(0); asm(" move.w #0x2700,%sr"); 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 @@ #include "kernel.h" #include "cpu.h" -#if CONFIG_CPU == MCF5249 +#ifdef CPU_COLDFIRE struct regs { unsigned int d[6]; /* d2-d7 */ @@ -68,7 +68,7 @@ void switch_thread(void) __attribute__ ((section(".icode"))); static inline void store_context(void* addr) __attribute__ ((always_inline)); static inline void load_context(const void* addr) __attribute__ ((always_inline)); -#if CONFIG_CPU == MCF5249 +#ifdef CPU_COLDFIRE /*--------------------------------------------------------------------------- * Store non-volatile context. *--------------------------------------------------------------------------- @@ -212,7 +212,7 @@ void switch_thread(void) while (num_sleepers == num_threads) { /* Enter sleep mode, woken up on interrupt */ -#if CONFIG_CPU == MCF5249 +#ifdef CPU_COLDFIRE asm volatile ("stop #0x2000"); #elif CONFIG_CPU == SH7034 SBYCR &= 0x7F; @@ -285,7 +285,7 @@ int create_thread(void (*function)(void), void* stack, int stack_size, thread_stack[num_threads] = stack; thread_stack_size[num_threads] = stack_size; regs = &thread_contexts[num_threads]; -#if (CONFIG_CPU == MCF5249) || (CONFIG_CPU == SH7034) +#if defined(CPU_COLDFIRE) || (CONFIG_CPU == SH7034) /* Align stack to an even 32 bit boundary */ regs->sp = (void*)(((unsigned int)stack + stack_size) & ~3); #elif CONFIG_CPU == TCC730 @@ -333,7 +333,7 @@ void init_threads(void) thread_name[0] = main_thread_name; thread_stack[0] = stackbegin; thread_stack_size[0] = (int)stackend - (int)stackbegin; -#if (CONFIG_CPU == MCF5249) || (CONFIG_CPU == SH7034) +#if defined(CPU_COLDFIRE) || (CONFIG_CPU == SH7034) thread_contexts[0].start = 0; /* thread 0 already running */ #elif CONFIG_CPU == TCC730 thread_contexts[0].started = 1; |