summaryrefslogtreecommitdiff
path: root/firmware/kernel.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/kernel.c')
-rw-r--r--firmware/kernel.c9
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
29static void (*tick_funcs[MAX_NUM_TICK_TASKS])(void); 30static void (*tick_funcs[MAX_NUM_TICK_TASKS])(void);
30 31
31static 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. */
34static struct event_queue *all_queues[32]; 33static struct event_queue *all_queues[32];
35static int num_queues; 34static 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
158static void tick_start(unsigned int interval_in_ms) 157void 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
210static void tick_start(unsigned int interval_in_ms) 209void 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
285static void tick_start(unsigned int interval_in_ms) 284void 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;