summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx31/gigabeat-s
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2009-06-29 14:29:57 +0000
committerRafaël Carré <rafael.carre@gmail.com>2009-06-29 14:29:57 +0000
commitc5dedd7d762f48e940ecc0bd17dd2173d59a92e1 (patch)
treecd4d9dc085b4c40f281f17953a3e126dd1c0c02b /firmware/target/arm/imx31/gigabeat-s
parent89ccd5c145e45ad541a02f38e2ad07fb916f7135 (diff)
downloadrockbox-c5dedd7d762f48e940ecc0bd17dd2173d59a92e1.tar.gz
rockbox-c5dedd7d762f48e940ecc0bd17dd2173d59a92e1.zip
Remove the TIMER_* macros and declare target-specific functions in timer.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21559 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/imx31/gigabeat-s')
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/timer-imx31.c6
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/timer-target.h13
2 files changed, 3 insertions, 16 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/timer-imx31.c b/firmware/target/arm/imx31/gigabeat-s/timer-imx31.c
index 5e53e4a55e..f3f78a1ee1 100644
--- a/firmware/target/arm/imx31/gigabeat-s/timer-imx31.c
+++ b/firmware/target/arm/imx31/gigabeat-s/timer-imx31.c
@@ -52,7 +52,7 @@ static void stop_timer(bool clock_off)
52 } 52 }
53} 53}
54 54
55bool _timer_set(long cycles, bool start) 55bool timer_set(long cycles, bool start)
56{ 56{
57 /* Maximum cycle count expressible in the cycles parameter is 2^31-1 57 /* Maximum cycle count expressible in the cycles parameter is 2^31-1
58 * and the modulus counter is capable of 2^32-1 and as a result there is 58 * and the modulus counter is capable of 2^32-1 and as a result there is
@@ -86,7 +86,7 @@ bool _timer_set(long cycles, bool start)
86 return true; 86 return true;
87} 87}
88 88
89bool _timer_start(void) 89bool timer_start(void)
90{ 90{
91 int oldstatus = disable_interrupt_save(IRQ_FIQ_STATUS); 91 int oldstatus = disable_interrupt_save(IRQ_FIQ_STATUS);
92 92
@@ -104,7 +104,7 @@ bool _timer_start(void)
104 return true; 104 return true;
105} 105}
106 106
107void _timer_stop(void) 107void timer_stop(void)
108{ 108{
109 int oldstatus = disable_interrupt_save(IRQ_FIQ_STATUS); 109 int oldstatus = disable_interrupt_save(IRQ_FIQ_STATUS);
110 /* Halt timer if running - stop module clock */ 110 /* 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 f019a45519..9d5520aa6d 100644
--- a/firmware/target/arm/imx31/gigabeat-s/timer-target.h
+++ b/firmware/target/arm/imx31/gigabeat-s/timer-target.h
@@ -24,17 +24,4 @@
24/* timer is based on ipg_clk */ 24/* timer is based on ipg_clk */
25#define TIMER_FREQ (66000000) 25#define TIMER_FREQ (66000000)
26 26
27bool _timer_set(long cycles, bool set);
28bool _timer_start(void);
29void _timer_stop(void);
30
31#define __TIMER_SET(cycles, set) \
32 _timer_set(cycles, set)
33
34#define __TIMER_START() \
35 _timer_start()
36
37#define __TIMER_STOP(...) \
38 _timer_stop()
39
40#endif /* TIMER_TARGET_H */ 27#endif /* TIMER_TARGET_H */