diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2005-03-01 14:33:45 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2005-03-01 14:33:45 +0000 |
commit | 76620fbe5bf44063e1e18c2913b3a5a805db3ccd (patch) | |
tree | 8611b00ca26d48897ef65f0dc108f24715886416 /firmware/kernel.c | |
parent | e734017e2f0f4b0d70242c9621359fa79b74318d (diff) | |
download | rockbox-76620fbe5bf44063e1e18c2913b3a5a805db3ccd.tar.gz rockbox-76620fbe5bf44063e1e18c2913b3a5a805db3ccd.zip |
Export tick_start() to allow for tick timer reinit when changing CPU frequency
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6092 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/kernel.c')
-rw-r--r-- | firmware/kernel.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/firmware/kernel.c b/firmware/kernel.c index 6280019e75..5fec25d9b8 100644 --- a/firmware/kernel.c +++ b/firmware/kernel.c | |||
@@ -18,6 +18,7 @@ | |||
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | #include <stdlib.h> | 19 | #include <stdlib.h> |
20 | #include <string.h> | 20 | #include <string.h> |
21 | #include "config.h" | ||
21 | #include "kernel.h" | 22 | #include "kernel.h" |
22 | #include "thread.h" | 23 | #include "thread.h" |
23 | #include "cpu.h" | 24 | #include "cpu.h" |
@@ -28,8 +29,6 @@ long current_tick = 0; | |||
28 | 29 | ||
29 | static void (*tick_funcs[MAX_NUM_TICK_TASKS])(void); | 30 | static void (*tick_funcs[MAX_NUM_TICK_TASKS])(void); |
30 | 31 | ||
31 | static void tick_start(unsigned int interval_in_ms); | ||
32 | |||
33 | /* This array holds all queues that are initiated. It is used for broadcast. */ | 32 | /* This array holds all queues that are initiated. It is used for broadcast. */ |
34 | static struct event_queue *all_queues[32]; | 33 | static struct event_queue *all_queues[32]; |
35 | static int num_queues; | 34 | static int num_queues; |
@@ -155,7 +154,7 @@ int queue_broadcast(long id, void *data) | |||
155 | * Timer tick | 154 | * Timer tick |
156 | ****************************************************************************/ | 155 | ****************************************************************************/ |
157 | #if CONFIG_CPU == SH7034 | 156 | #if CONFIG_CPU == SH7034 |
158 | static void tick_start(unsigned int interval_in_ms) | 157 | void tick_start(unsigned int interval_in_ms) |
159 | { | 158 | { |
160 | unsigned int count; | 159 | unsigned int count; |
161 | 160 | ||
@@ -207,7 +206,7 @@ void IMIA0(void) | |||
207 | TSR0 &= ~0x01; | 206 | TSR0 &= ~0x01; |
208 | } | 207 | } |
209 | #elif CONFIG_CPU == MCF5249 | 208 | #elif CONFIG_CPU == MCF5249 |
210 | static void tick_start(unsigned int interval_in_ms) | 209 | void tick_start(unsigned int interval_in_ms) |
211 | { | 210 | { |
212 | unsigned int count; | 211 | unsigned int count; |
213 | 212 | ||
@@ -282,7 +281,7 @@ void TIMER0(void) | |||
282 | TACON |= 0x80; | 281 | TACON |= 0x80; |
283 | } | 282 | } |
284 | 283 | ||
285 | static void tick_start(unsigned int interval_in_ms) | 284 | void tick_start(unsigned int interval_in_ms) |
286 | { | 285 | { |
287 | long count; | 286 | long count; |
288 | count = (long)FREQ * (long)interval_in_ms / 1000 / 16; | 287 | count = (long)FREQ * (long)interval_in_ms / 1000 / 16; |