summaryrefslogtreecommitdiff
path: root/apps/codecs
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2009-02-11 12:55:51 +0000
committerMichael Sevakis <jethead71@rockbox.org>2009-02-11 12:55:51 +0000
commit21f0c9a2829415f52b64cbdf965b01525e78f17a (patch)
treeb5cb8021097722969f75784011c9f64f991c0c3d /apps/codecs
parent4cd7597172d916db9fc99bde4c03b669366f852a (diff)
Make basic cache functions into calls, and get rid of CACHE_FUNCTION_WRAPPERS and CACHE_FUNCTIONS_AS_CALL macros. Rename flush/invalidate_icache to cpucache_flush/invalidate. They're inlined only if an implementation isn't provided by defining HAVE_CPUCACHE_FLUSH/INVALIDATE.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19971 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
-rw-r--r--apps/codecs/codec_crt0.c4
-rw-r--r--apps/codecs/mpa.c2
-rw-r--r--apps/codecs/spc.c6
3 files changed, 5 insertions, 7 deletions
diff --git a/apps/codecs/codec_crt0.c b/apps/codecs/codec_crt0.c
index 467e115de9..09b6982246 100644
--- a/apps/codecs/codec_crt0.c
+++ b/apps/codecs/codec_crt0.c
@@ -34,8 +34,6 @@ extern unsigned char plugin_end_addr[];
extern enum codec_status codec_main(void);
-CACHE_FUNCTION_WRAPPERS(ci);
-
enum codec_status codec_start(void)
{
#ifndef SIMULATOR
@@ -47,7 +45,7 @@ enum codec_status codec_start(void)
#endif
#if NUM_CORES > 1
/* writeback cleared iedata and bss areas */
- flush_icache();
+ ci->cpucache_flush();
#endif
return codec_main();
}
diff --git a/apps/codecs/mpa.c b/apps/codecs/mpa.c
index 1a0b03c272..1b71bde79e 100644
--- a/apps/codecs/mpa.c
+++ b/apps/codecs/mpa.c
@@ -268,7 +268,7 @@ static void mad_synth_thread_quit(void)
die=1;
ci->semaphore_release(&synth_pending_sem);
ci->thread_wait(mad_synth_thread_id);
- invalidate_icache();
+ ci->cpucache_invalidate();
}
#else
static inline void mad_synth_thread_ready(void)
diff --git a/apps/codecs/spc.c b/apps/codecs/spc.c
index 5ac594431a..6ceb704c7c 100644
--- a/apps/codecs/spc.c
+++ b/apps/codecs/spc.c
@@ -302,7 +302,7 @@ static bool emu_thread_process_msg(struct sample_queue_chunk *chunk)
if (id == SPC_EMU_LOAD)
{
struct spc_load *ld = (struct spc_load *)chunk->data;
- invalidate_icache();
+ ci->cpucache_invalidate();
SPC_Init(&spc_emu);
sample_queue.retval = SPC_load_spc(&spc_emu, ld->buf, ld->size);
@@ -376,7 +376,7 @@ static bool spc_emu_start(void)
static inline int load_spc_buffer(uint8_t *buf, size_t size)
{
struct spc_load ld = { buf, size };
- flush_icache();
+ ci->cpucache_flush();
return emu_thread_send_msg(SPC_EMU_LOAD, (intptr_t)&ld);
}
@@ -386,7 +386,7 @@ static inline void spc_emu_quit(void)
emu_thread_send_msg(SPC_EMU_QUIT, 0);
/* Wait for emu thread to be killed */
ci->thread_wait(emu_thread_id);
- invalidate_icache();
+ ci->cpucache_invalidate();
}
}