diff options
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/kernel-imx31.c | 12 | ||||
-rw-r--r-- | firmware/target/arm/s3c2440/gigabeat-fx/kernel-meg-fx.c | 14 | ||||
-rw-r--r-- | firmware/target/arm/tcc77x/timer-tcc77x.c | 14 | ||||
-rw-r--r-- | firmware/target/arm/tcc780x/timer-tcc780x.c | 15 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/kernel-dm320.c | 13 | ||||
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/kernel-jz4740.c | 11 |
6 files changed, 6 insertions, 73 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/kernel-imx31.c b/firmware/target/arm/imx31/gigabeat-s/kernel-imx31.c index e7bce8dc2c..3d7c577e3c 100644 --- a/firmware/target/arm/imx31/gigabeat-s/kernel-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/kernel-imx31.c | |||
@@ -27,22 +27,12 @@ | |||
27 | #include "kernel.h" | 27 | #include "kernel.h" |
28 | #include "thread.h" | 28 | #include "thread.h" |
29 | 29 | ||
30 | extern void (*tick_funcs[MAX_NUM_TICK_TASKS])(void); | ||
31 | |||
32 | static __attribute__((interrupt("IRQ"))) void EPIT1_HANDLER(void) | 30 | static __attribute__((interrupt("IRQ"))) void EPIT1_HANDLER(void) |
33 | { | 31 | { |
34 | int i; | ||
35 | |||
36 | EPITSR1 = EPITSR_OCIF; /* Clear the pending status */ | 32 | EPITSR1 = EPITSR_OCIF; /* Clear the pending status */ |
37 | 33 | ||
38 | /* Run through the list of tick tasks */ | 34 | /* Run through the list of tick tasks */ |
39 | for(i = 0;i < MAX_NUM_TICK_TASKS;i++) | 35 | call_tick_tasks(); |
40 | { | ||
41 | if(tick_funcs[i]) | ||
42 | tick_funcs[i](); | ||
43 | } | ||
44 | |||
45 | current_tick++; | ||
46 | } | 36 | } |
47 | 37 | ||
48 | void tick_start(unsigned int interval_in_ms) | 38 | void tick_start(unsigned int interval_in_ms) |
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/kernel-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/kernel-meg-fx.c index 4f878d4ed3..76917c8c82 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/kernel-meg-fx.c +++ b/firmware/target/arm/s3c2440/gigabeat-fx/kernel-meg-fx.c | |||
@@ -24,8 +24,6 @@ | |||
24 | #include "timer.h" | 24 | #include "timer.h" |
25 | #include "thread.h" | 25 | #include "thread.h" |
26 | 26 | ||
27 | extern void (*tick_funcs[MAX_NUM_TICK_TASKS])(void); | ||
28 | |||
29 | void tick_start(unsigned int interval_in_ms) | 27 | void tick_start(unsigned int interval_in_ms) |
30 | { | 28 | { |
31 | /* | 29 | /* |
@@ -62,18 +60,8 @@ void tick_start(unsigned int interval_in_ms) | |||
62 | 60 | ||
63 | void TIMER4(void) | 61 | void TIMER4(void) |
64 | { | 62 | { |
65 | int i; | ||
66 | |||
67 | /* Run through the list of tick tasks */ | 63 | /* Run through the list of tick tasks */ |
68 | for(i = 0; i < MAX_NUM_TICK_TASKS; i++) | 64 | call_tick_tasks(); |
69 | { | ||
70 | if(tick_funcs[i]) | ||
71 | { | ||
72 | tick_funcs[i](); | ||
73 | } | ||
74 | } | ||
75 | |||
76 | current_tick++; | ||
77 | 65 | ||
78 | SRCPND = TIMER4_MASK; | 66 | SRCPND = TIMER4_MASK; |
79 | INTPND = TIMER4_MASK; | 67 | INTPND = TIMER4_MASK; |
diff --git a/firmware/target/arm/tcc77x/timer-tcc77x.c b/firmware/target/arm/tcc77x/timer-tcc77x.c index 4645e388cc..924ddda625 100644 --- a/firmware/target/arm/tcc77x/timer-tcc77x.c +++ b/firmware/target/arm/tcc77x/timer-tcc77x.c | |||
@@ -51,24 +51,12 @@ void __timer_unregister(void) | |||
51 | 51 | ||
52 | 52 | ||
53 | /* Timer interrupt processing - all timers (inc. tick) have a single IRQ */ | 53 | /* Timer interrupt processing - all timers (inc. tick) have a single IRQ */ |
54 | |||
55 | extern void (*tick_funcs[MAX_NUM_TICK_TASKS])(void); | ||
56 | |||
57 | void TIMER(void) | 54 | void TIMER(void) |
58 | { | 55 | { |
59 | if (TIREQ & TF0) /* Timer0 reached ref value */ | 56 | if (TIREQ & TF0) /* Timer0 reached ref value */ |
60 | { | 57 | { |
61 | int i; | ||
62 | |||
63 | /* Run through the list of tick tasks */ | 58 | /* Run through the list of tick tasks */ |
64 | for(i = 0; i < MAX_NUM_TICK_TASKS; i++) | 59 | call_tick_tasks(); |
65 | { | ||
66 | if(tick_funcs[i]) | ||
67 | { | ||
68 | tick_funcs[i](); | ||
69 | } | ||
70 | } | ||
71 | current_tick++; | ||
72 | 60 | ||
73 | /* reset Timer 0 IRQ & ref flags */ | 61 | /* reset Timer 0 IRQ & ref flags */ |
74 | TIREQ |= TI0 | TF0; | 62 | TIREQ |= TI0 | TF0; |
diff --git a/firmware/target/arm/tcc780x/timer-tcc780x.c b/firmware/target/arm/tcc780x/timer-tcc780x.c index c08520116a..17956131c0 100644 --- a/firmware/target/arm/tcc780x/timer-tcc780x.c +++ b/firmware/target/arm/tcc780x/timer-tcc780x.c | |||
@@ -46,25 +46,12 @@ void __timer_unregister(void) | |||
46 | 46 | ||
47 | 47 | ||
48 | /* Timer interrupt processing - all timers (inc. tick) have a single IRQ */ | 48 | /* Timer interrupt processing - all timers (inc. tick) have a single IRQ */ |
49 | |||
50 | extern void (*tick_funcs[MAX_NUM_TICK_TASKS])(void); | ||
51 | |||
52 | void TIMER0(void) | 49 | void TIMER0(void) |
53 | { | 50 | { |
54 | if (TIREQ & TF0) /* Timer0 reached ref value */ | 51 | if (TIREQ & TF0) /* Timer0 reached ref value */ |
55 | { | 52 | { |
56 | int i; | ||
57 | |||
58 | /* Run through the list of tick tasks */ | 53 | /* Run through the list of tick tasks */ |
59 | for(i = 0; i < MAX_NUM_TICK_TASKS; i++) | 54 | call_tick_tasks(); |
60 | { | ||
61 | if(tick_funcs[i]) | ||
62 | { | ||
63 | tick_funcs[i](); | ||
64 | } | ||
65 | } | ||
66 | |||
67 | current_tick++; | ||
68 | 55 | ||
69 | /* reset Timer 0 IRQ & ref flags */ | 56 | /* reset Timer 0 IRQ & ref flags */ |
70 | TIREQ |= TI0 | TF0; | 57 | TIREQ |= TI0 | TF0; |
diff --git a/firmware/target/arm/tms320dm320/kernel-dm320.c b/firmware/target/arm/tms320dm320/kernel-dm320.c index 42f9773d36..b5eb4233e4 100644 --- a/firmware/target/arm/tms320dm320/kernel-dm320.c +++ b/firmware/target/arm/tms320dm320/kernel-dm320.c | |||
@@ -25,8 +25,6 @@ | |||
25 | #include "timer.h" | 25 | #include "timer.h" |
26 | #include "thread.h" | 26 | #include "thread.h" |
27 | 27 | ||
28 | extern void (*tick_funcs[MAX_NUM_TICK_TASKS])(void); | ||
29 | |||
30 | void tick_start(unsigned int interval_in_ms) | 28 | void tick_start(unsigned int interval_in_ms) |
31 | { | 29 | { |
32 | /* TODO: set up TIMER1 clock settings | 30 | /* TODO: set up TIMER1 clock settings |
@@ -53,16 +51,7 @@ void tick_start(unsigned int interval_in_ms) | |||
53 | void TIMER1(void) | 51 | void TIMER1(void) |
54 | { | 52 | { |
55 | IO_INTC_IRQ0 = INTR_IRQ0_TMR1; | 53 | IO_INTC_IRQ0 = INTR_IRQ0_TMR1; |
56 | |||
57 | int i; | ||
58 | 54 | ||
59 | /* Run through the list of tick tasks */ | 55 | /* Run through the list of tick tasks */ |
60 | for(i = 0; i < MAX_NUM_TICK_TASKS; i++) | 56 | call_tick_tasks(); |
61 | { | ||
62 | if(tick_funcs[i]) | ||
63 | { | ||
64 | tick_funcs[i](); | ||
65 | } | ||
66 | } | ||
67 | current_tick++; | ||
68 | } | 57 | } |
diff --git a/firmware/target/mips/ingenic_jz47xx/kernel-jz4740.c b/firmware/target/mips/ingenic_jz47xx/kernel-jz4740.c index 62176cee24..dcfdfd6a38 100644 --- a/firmware/target/mips/ingenic_jz47xx/kernel-jz4740.c +++ b/firmware/target/mips/ingenic_jz47xx/kernel-jz4740.c | |||
@@ -24,8 +24,6 @@ | |||
24 | #include "kernel.h" | 24 | #include "kernel.h" |
25 | #include "jz4740.h" | 25 | #include "jz4740.h" |
26 | 26 | ||
27 | extern void (*tick_funcs[MAX_NUM_TICK_TASKS])(void); | ||
28 | |||
29 | #define USE_RTC_CLOCK 0 | 27 | #define USE_RTC_CLOCK 0 |
30 | void tick_start(unsigned int interval_in_ms) | 28 | void tick_start(unsigned int interval_in_ms) |
31 | { | 29 | { |
@@ -70,13 +68,6 @@ void TCU0(void) | |||
70 | { | 68 | { |
71 | __tcu_clear_full_match_flag(0); | 69 | __tcu_clear_full_match_flag(0); |
72 | 70 | ||
73 | int i; | ||
74 | |||
75 | /* Run through the list of tick tasks */ | 71 | /* Run through the list of tick tasks */ |
76 | for(i = 0; i < MAX_NUM_TICK_TASKS; i++) | 72 | call_tick_tasks(); |
77 | { | ||
78 | if(tick_funcs[i]) | ||
79 | tick_funcs[i](); | ||
80 | } | ||
81 | current_tick++; | ||
82 | } | 73 | } |