summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2009-06-29 14:28:56 +0000
committerRafaël Carré <rafael.carre@gmail.com>2009-06-29 14:28:56 +0000
commite0640c3c4b6d238e38155c863e542335ce57a425 (patch)
treeec0d956f861090a91021aee1d360e4a2c6449670 /firmware/target/arm
parent15e40dd3a6ac8e9df88b77c0dbd9a90870ad91e6 (diff)
downloadrockbox-e0640c3c4b6d238e38155c863e542335ce57a425.tar.gz
rockbox-e0640c3c4b6d238e38155c863e542335ce57a425.zip
Rename TIMER_REGISTER macro to TIMER_START and TIMER_UNREGISTER to TIMER_STOP to reflect what they does exactly.
registering and unregistering are handled by the non target-specific functions of timer.c Remove arguments from the new TIMER_START since they are unused by targets git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21553 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/as3525/timer-as3525.c4
-rw-r--r--firmware/target/arm/as3525/timer-target.h13
-rw-r--r--firmware/target/arm/at91sam/lyre_proto1/timer-lyre_proto1.c4
-rw-r--r--firmware/target/arm/at91sam/lyre_proto1/timer-target.h13
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/timer-imx31.c4
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/timer-target.h13
-rw-r--r--firmware/target/arm/s3c2440/gigabeat-fx/timer-meg-fx.c4
-rw-r--r--firmware/target/arm/s3c2440/gigabeat-fx/timer-target.h13
-rw-r--r--firmware/target/arm/tcc77x/timer-target.h13
-rw-r--r--firmware/target/arm/tcc77x/timer-tcc77x.c4
-rw-r--r--firmware/target/arm/tcc780x/timer-target.h13
-rw-r--r--firmware/target/arm/tcc780x/timer-tcc780x.c4
-rw-r--r--firmware/target/arm/tms320dm320/timer-dm320.c4
-rw-r--r--firmware/target/arm/tms320dm320/timer-target.h13
14 files changed, 56 insertions, 63 deletions
diff --git a/firmware/target/arm/as3525/timer-as3525.c b/firmware/target/arm/as3525/timer-as3525.c
index 755438a1f8..50f0e73158 100644
--- a/firmware/target/arm/as3525/timer-as3525.c
+++ b/firmware/target/arm/as3525/timer-as3525.c
@@ -53,14 +53,14 @@ bool __timer_set(long cycles, bool start)
return true;
}
-bool __timer_register(void)
+bool __timer_start(void)
{
CGU_PERI |= CGU_TIMER1_CLOCK_ENABLE; /* enable peripheral */
VIC_INT_ENABLE |= INTERRUPT_TIMER1;
return true;
}
-void __timer_unregister(void)
+void __timer_stop(void)
{
TIMER1_CONTROL &= 0x10; /* disable timer 1 (don't modify bit 4) */
VIC_INT_EN_CLEAR = INTERRUPT_TIMER1; /* disable interrupt */
diff --git a/firmware/target/arm/as3525/timer-target.h b/firmware/target/arm/as3525/timer-target.h
index 21ee6e7804..b1bdfed78f 100644
--- a/firmware/target/arm/as3525/timer-target.h
+++ b/firmware/target/arm/as3525/timer-target.h
@@ -22,19 +22,18 @@
#define TIMER_TARGET_H
bool __timer_set(long cycles, bool set);
-bool __timer_register(void);
-void __timer_unregister(void);
+bool __timer_start(void);
+void __timer_stop(void);
#define TIMER_FREQ (24000000 / 16)
#define __TIMER_SET(cycles, set) \
__timer_set(cycles, set)
-#define __TIMER_REGISTER(reg_prio, unregister_callback, cycles, \
- int_prio, timer_callback) \
- __timer_register()
+#define __TIMER_START() \
+ __timer_start()
-#define __TIMER_UNREGISTER(...) \
- __timer_unregister()
+#define __TIMER_STOP(...) \
+ __timer_stop()
#endif /* TIMER_TARGET_H */
diff --git a/firmware/target/arm/at91sam/lyre_proto1/timer-lyre_proto1.c b/firmware/target/arm/at91sam/lyre_proto1/timer-lyre_proto1.c
index 5924438d10..ef5c91169d 100644
--- a/firmware/target/arm/at91sam/lyre_proto1/timer-lyre_proto1.c
+++ b/firmware/target/arm/at91sam/lyre_proto1/timer-lyre_proto1.c
@@ -67,7 +67,7 @@ bool __timer_set(long cycles, bool start)
return false;
}
-bool __timer_register(void)
+bool __timer_start(void)
{
bool retval = true;
volatile unsigned long pimr = 0;
@@ -101,7 +101,7 @@ bool __timer_register(void)
return retval;
}
-void __timer_unregister(void)
+void __timer_stop(void)
{
volatile unsigned long pimr = 0;
diff --git a/firmware/target/arm/at91sam/lyre_proto1/timer-target.h b/firmware/target/arm/at91sam/lyre_proto1/timer-target.h
index d16577b0de..b8298d3d77 100644
--- a/firmware/target/arm/at91sam/lyre_proto1/timer-target.h
+++ b/firmware/target/arm/at91sam/lyre_proto1/timer-target.h
@@ -26,17 +26,16 @@
#define TIMER_FREQ (49156800/2)
bool __timer_set(long cycles, bool set);
-bool __timer_register(void);
-void __timer_unregister(void);
+bool __timer_start(void);
+void __timer_stop(void);
#define __TIMER_SET(cycles, set) \
__timer_set(cycles, set)
-#define __TIMER_REGISTER(reg_prio, unregister_callback, cycles, \
- int_prio, timer_callback) \
- __timer_register()
+#define __TIMER_START() \
+ __timer_start()
-#define __TIMER_UNREGISTER(...) \
- __timer_unregister()
+#define __TIMER_STOP(...) \
+ __timer_stop()
#endif /* TIMER_TARGET_H */
diff --git a/firmware/target/arm/imx31/gigabeat-s/timer-imx31.c b/firmware/target/arm/imx31/gigabeat-s/timer-imx31.c
index d97743b0b8..5e53e4a55e 100644
--- a/firmware/target/arm/imx31/gigabeat-s/timer-imx31.c
+++ b/firmware/target/arm/imx31/gigabeat-s/timer-imx31.c
@@ -86,7 +86,7 @@ bool _timer_set(long cycles, bool start)
return true;
}
-bool _timer_register(void)
+bool _timer_start(void)
{
int oldstatus = disable_interrupt_save(IRQ_FIQ_STATUS);
@@ -104,7 +104,7 @@ bool _timer_register(void)
return true;
}
-void _timer_unregister(void)
+void _timer_stop(void)
{
int oldstatus = disable_interrupt_save(IRQ_FIQ_STATUS);
/* Halt timer if running - stop module clock */
diff --git a/firmware/target/arm/imx31/gigabeat-s/timer-target.h b/firmware/target/arm/imx31/gigabeat-s/timer-target.h
index 2443b8ce95..f019a45519 100644
--- a/firmware/target/arm/imx31/gigabeat-s/timer-target.h
+++ b/firmware/target/arm/imx31/gigabeat-s/timer-target.h
@@ -25,17 +25,16 @@
#define TIMER_FREQ (66000000)
bool _timer_set(long cycles, bool set);
-bool _timer_register(void);
-void _timer_unregister(void);
+bool _timer_start(void);
+void _timer_stop(void);
#define __TIMER_SET(cycles, set) \
_timer_set(cycles, set)
-#define __TIMER_REGISTER(reg_prio, unregister_callback, cycles, \
- int_prio, timer_callback) \
- _timer_register()
+#define __TIMER_START() \
+ _timer_start()
-#define __TIMER_UNREGISTER(...) \
- _timer_unregister()
+#define __TIMER_STOP(...) \
+ _timer_stop()
#endif /* TIMER_TARGET_H */
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/timer-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/timer-meg-fx.c
index 7f5023585c..884b0803a2 100644
--- a/firmware/target/arm/s3c2440/gigabeat-fx/timer-meg-fx.c
+++ b/firmware/target/arm/s3c2440/gigabeat-fx/timer-meg-fx.c
@@ -87,7 +87,7 @@ bool __timer_set(long cycles, bool start)
return retval;
}
-bool __timer_register(void)
+bool __timer_start(void)
{
bool retval = true;
@@ -122,7 +122,7 @@ bool __timer_register(void)
return retval;
}
-void __timer_unregister(void)
+void __timer_stop(void)
{
int oldstatus = disable_interrupt_save(IRQ_FIQ_STATUS);
stop_timer();
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/timer-target.h b/firmware/target/arm/s3c2440/gigabeat-fx/timer-target.h
index b5652a3365..700833486d 100644
--- a/firmware/target/arm/s3c2440/gigabeat-fx/timer-target.h
+++ b/firmware/target/arm/s3c2440/gigabeat-fx/timer-target.h
@@ -26,17 +26,16 @@
#define TIMER234_PRESCALE 21
bool __timer_set(long cycles, bool set);
-bool __timer_register(void);
-void __timer_unregister(void);
+bool __timer_start(void);
+void __timer_stop(void);
#define __TIMER_SET(cycles, set) \
__timer_set(cycles, set)
-#define __TIMER_REGISTER(reg_prio, unregister_callback, cycles, \
- int_prio, timer_callback) \
- __timer_register()
+#define __TIMER_START() \
+ __timer_start()
-#define __TIMER_UNREGISTER(...) \
- __timer_unregister()
+#define __TIMER_STOP(...) \
+ __timer_stop()
#endif /* TIMER_TARGET_H */
diff --git a/firmware/target/arm/tcc77x/timer-target.h b/firmware/target/arm/tcc77x/timer-target.h
index 991d949447..ace31ac886 100644
--- a/firmware/target/arm/tcc77x/timer-target.h
+++ b/firmware/target/arm/tcc77x/timer-target.h
@@ -25,17 +25,16 @@
#define TIMER_FREQ (12000000)
bool __timer_set(long cycles, bool set);
-bool __timer_register(void);
-void __timer_unregister(void);
+bool __timer_start(void);
+void __timer_stop(void);
#define __TIMER_SET(cycles, set) \
__timer_set(cycles, set)
-#define __TIMER_REGISTER(reg_prio, unregister_callback, cycles, \
- int_prio, timer_callback) \
- __timer_register()
+#define __TIMER_START() \
+ __timer_start()
-#define __TIMER_UNREGISTER(...) \
- __timer_unregister()
+#define __TIMER_STOP(...) \
+ __timer_stop()
#endif /* TIMER_TARGET_H */
diff --git a/firmware/target/arm/tcc77x/timer-tcc77x.c b/firmware/target/arm/tcc77x/timer-tcc77x.c
index 924ddda625..ddf44454c2 100644
--- a/firmware/target/arm/tcc77x/timer-tcc77x.c
+++ b/firmware/target/arm/tcc77x/timer-tcc77x.c
@@ -37,14 +37,14 @@ bool __timer_set(long cycles, bool start)
return false;
}
-bool __timer_register(void)
+bool __timer_start(void)
{
#warning function not implemented
return false;
}
-void __timer_unregister(void)
+void __timer_stop(void)
{
#warning function not implemented
}
diff --git a/firmware/target/arm/tcc780x/timer-target.h b/firmware/target/arm/tcc780x/timer-target.h
index 10090ceddc..d6a8c4b0aa 100644
--- a/firmware/target/arm/tcc780x/timer-target.h
+++ b/firmware/target/arm/tcc780x/timer-target.h
@@ -25,17 +25,16 @@
#define TIMER_FREQ (2000000)
bool __timer_set(long cycles, bool set);
-bool __timer_register(void);
-void __timer_unregister(void);
+bool __timer_start(void);
+void __timer_stop(void);
#define __TIMER_SET(cycles, set) \
__timer_set(cycles, set)
-#define __TIMER_REGISTER(reg_prio, unregister_callback, cycles, \
- int_prio, timer_callback) \
- __timer_register()
+#define __TIMER_START() \
+ __timer_start()
-#define __TIMER_UNREGISTER(...) \
- __timer_unregister()
+#define __TIMER_STOP(...) \
+ __timer_stop()
#endif /* TIMER_TARGET_H */
diff --git a/firmware/target/arm/tcc780x/timer-tcc780x.c b/firmware/target/arm/tcc780x/timer-tcc780x.c
index a6c8c1c060..ddd3b1d694 100644
--- a/firmware/target/arm/tcc780x/timer-tcc780x.c
+++ b/firmware/target/arm/tcc780x/timer-tcc780x.c
@@ -62,7 +62,7 @@ bool __timer_set(long cycles, bool start)
return true;
}
-bool __timer_register(void)
+bool __timer_start(void)
{
int oldstatus = disable_interrupt_save(IRQ_STATUS);
@@ -73,7 +73,7 @@ bool __timer_register(void)
return true;
}
-void __timer_unregister(void)
+void __timer_stop(void)
{
int oldstatus = disable_interrupt_save(IRQ_STATUS);
diff --git a/firmware/target/arm/tms320dm320/timer-dm320.c b/firmware/target/arm/tms320dm320/timer-dm320.c
index ff9beab96c..9357ffa9de 100644
--- a/firmware/target/arm/tms320dm320/timer-dm320.c
+++ b/firmware/target/arm/tms320dm320/timer-dm320.c
@@ -82,7 +82,7 @@ static void stop_timer(void)
IO_CLK_MOD2 &= ~CLK_MOD2_TMR0; //disable TIMER0 clock
}
-bool __timer_register(void)
+bool __timer_start(void)
{
int oldstatus = disable_interrupt_save(IRQ_FIQ_STATUS);
@@ -100,7 +100,7 @@ bool __timer_register(void)
return true;
}
-void __timer_unregister(void)
+void __timer_stop(void)
{
int oldstatus = disable_interrupt_save(IRQ_FIQ_STATUS);
stop_timer();
diff --git a/firmware/target/arm/tms320dm320/timer-target.h b/firmware/target/arm/tms320dm320/timer-target.h
index e8f96ef793..9f3ffdf712 100644
--- a/firmware/target/arm/tms320dm320/timer-target.h
+++ b/firmware/target/arm/tms320dm320/timer-target.h
@@ -25,17 +25,16 @@
#define TIMER_FREQ (27000000)
bool __timer_set(long cycles, bool set);
-bool __timer_register(void);
-void __timer_unregister(void);
+bool __timer_start(void);
+void __timer_stop(void);
#define __TIMER_SET(cycles, set) \
__timer_set(cycles, set)
-#define __TIMER_REGISTER(reg_prio, unregister_callback, cycles, \
- int_prio, timer_callback) \
- __timer_register()
+#define __TIMER_START() \
+ __timer_start()
-#define __TIMER_UNREGISTER(...) \
- __timer_unregister()
+#define __TIMER_STOP(...) \
+ __timer_stop()
#endif /* TIMER_TARGET_H */