summaryrefslogtreecommitdiff
path: root/firmware/export/timer.h
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-04-04 01:16:11 +0000
committerJens Arnold <amiconn@rockbox.org>2006-04-04 01:16:11 +0000
commit295ec69717a758c527a58ca154dba25c7c22fae5 (patch)
tree325de376644f330f095274fd2f3aa844a2db6318 /firmware/export/timer.h
parentfcab617331ad6aed89aaacb24b5901175151dd53 (diff)
downloadrockbox-295ec69717a758c527a58ca154dba25c7c22fae5.zip
rockbox-295ec69717a758c527a58ca154dba25c7c22fae5.tar.gz
rockbox-295ec69717a758c527a58ca154dba25c7c22fae5.tar.bz2
rockbox-295ec69717a758c527a58ca154dba25c7c22fae5.tar.xz
Simplification for user timer on coldfire. We define TIMER_FREQ separately anyway.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9479 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/timer.h')
-rw-r--r--firmware/export/timer.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/firmware/export/timer.h b/firmware/export/timer.h
index 15b5f10..2fb7c64 100644
--- a/firmware/export/timer.h
+++ b/firmware/export/timer.h
@@ -25,12 +25,15 @@
#ifndef SIMULATOR
-/* Assume timer base freq. is CPU clock base freq. Portalplayer chips use a
- microsecond timer instead. */
+
#if CONFIG_CPU == PP5020 || CONFIG_CPU == PP5002
-#define TIMER_FREQ 1000000
+ /* Portalplayer chips use a microsecond timer. */
+ #define TIMER_FREQ 1000000
+#elif defined(CPU_COLDFIRE)
+ /* timer is based on busclk == cpuclk/2 */
+ #define TIMER_FREQ (CPU_FREQ/2)
#else
-#define TIMER_FREQ CPU_FREQ
+ #define TIMER_FREQ CPU_FREQ
#endif
bool timer_register(int reg_prio, void (*unregister_callback)(void),