diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2009-06-29 14:29:57 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2009-06-29 14:29:57 +0000 |
commit | c5dedd7d762f48e940ecc0bd17dd2173d59a92e1 (patch) | |
tree | cd4d9dc085b4c40f281f17953a3e126dd1c0c02b /firmware/target/arm/imx31/gigabeat-s | |
parent | 89ccd5c145e45ad541a02f38e2ad07fb916f7135 (diff) | |
download | rockbox-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.c | 6 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/timer-target.h | 13 |
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 | ||
55 | bool _timer_set(long cycles, bool start) | 55 | bool 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 | ||
89 | bool _timer_start(void) | 89 | bool 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 | ||
107 | void _timer_stop(void) | 107 | void 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 | ||
27 | bool _timer_set(long cycles, bool set); | ||
28 | bool _timer_start(void); | ||
29 | void _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 */ |