summaryrefslogtreecommitdiff
path: root/firmware/target/arm
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/kernel-imx31.c12
-rw-r--r--firmware/target/arm/s3c2440/gigabeat-fx/kernel-meg-fx.c14
-rw-r--r--firmware/target/arm/tcc77x/timer-tcc77x.c14
-rw-r--r--firmware/target/arm/tcc780x/timer-tcc780x.c15
-rw-r--r--firmware/target/arm/tms320dm320/kernel-dm320.c13
5 files changed, 5 insertions, 63 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 @@
#include "kernel.h"
#include "thread.h"
-extern void (*tick_funcs[MAX_NUM_TICK_TASKS])(void);
-
static __attribute__((interrupt("IRQ"))) void EPIT1_HANDLER(void)
{
- int i;
-
EPITSR1 = EPITSR_OCIF; /* Clear the pending status */
/* Run through the list of tick tasks */
- for(i = 0;i < MAX_NUM_TICK_TASKS;i++)
- {
- if(tick_funcs[i])
- tick_funcs[i]();
- }
-
- current_tick++;
+ call_tick_tasks();
}
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 @@
#include "timer.h"
#include "thread.h"
-extern void (*tick_funcs[MAX_NUM_TICK_TASKS])(void);
-
void tick_start(unsigned int interval_in_ms)
{
/*
@@ -62,18 +60,8 @@ void tick_start(unsigned int interval_in_ms)
void TIMER4(void)
{
- int i;
-
/* Run through the list of tick tasks */
- for(i = 0; i < MAX_NUM_TICK_TASKS; i++)
- {
- if(tick_funcs[i])
- {
- tick_funcs[i]();
- }
- }
-
- current_tick++;
+ call_tick_tasks();
SRCPND = TIMER4_MASK;
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)
/* Timer interrupt processing - all timers (inc. tick) have a single IRQ */
-
-extern void (*tick_funcs[MAX_NUM_TICK_TASKS])(void);
-
void TIMER(void)
{
if (TIREQ & TF0) /* Timer0 reached ref value */
{
- int i;
-
/* Run through the list of tick tasks */
- for(i = 0; i < MAX_NUM_TICK_TASKS; i++)
- {
- if(tick_funcs[i])
- {
- tick_funcs[i]();
- }
- }
- current_tick++;
+ call_tick_tasks();
/* reset Timer 0 IRQ & ref flags */
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)
/* Timer interrupt processing - all timers (inc. tick) have a single IRQ */
-
-extern void (*tick_funcs[MAX_NUM_TICK_TASKS])(void);
-
void TIMER0(void)
{
if (TIREQ & TF0) /* Timer0 reached ref value */
{
- int i;
-
/* Run through the list of tick tasks */
- for(i = 0; i < MAX_NUM_TICK_TASKS; i++)
- {
- if(tick_funcs[i])
- {
- tick_funcs[i]();
- }
- }
-
- current_tick++;
+ call_tick_tasks();
/* reset Timer 0 IRQ & ref flags */
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 @@
#include "timer.h"
#include "thread.h"
-extern void (*tick_funcs[MAX_NUM_TICK_TASKS])(void);
-
void tick_start(unsigned int interval_in_ms)
{
/* TODO: set up TIMER1 clock settings
@@ -53,16 +51,7 @@ void tick_start(unsigned int interval_in_ms)
void TIMER1(void)
{
IO_INTC_IRQ0 = INTR_IRQ0_TMR1;
-
- int i;
/* Run through the list of tick tasks */
- for(i = 0; i < MAX_NUM_TICK_TASKS; i++)
- {
- if(tick_funcs[i])
- {
- tick_funcs[i]();
- }
- }
- current_tick++;
+ call_tick_tasks();
}