summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/timer-imx233.c
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2016-05-02 21:37:38 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2016-05-28 17:18:32 +0200
commit643c0a1e0e80ee6010353201792ba6e2be7e1ced (patch)
tree0b039050be720483935978575f77351db143463f /firmware/target/arm/imx233/timer-imx233.c
parent423c64770c04a62e34775c37a7e09a60f6ccbc4c (diff)
downloadrockbox-643c0a1e0e80ee6010353201792ba6e2be7e1ced.tar.gz
rockbox-643c0a1e0e80ee6010353201792ba6e2be7e1ced.tar.bz2
rockbox-643c0a1e0e80ee6010353201792ba6e2be7e1ced.zip
imx233: simplify timrot API
The old timrot setup API was very low-level and unfriendly. The new one makes in easier to select the frequency source. Use to simplify timer and kernel timer code. Change-Id: Iffcdf11c00e925be9ec8d9a4efc74b197b6bd2aa
Diffstat (limited to 'firmware/target/arm/imx233/timer-imx233.c')
-rw-r--r--firmware/target/arm/imx233/timer-imx233.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/firmware/target/arm/imx233/timer-imx233.c b/firmware/target/arm/imx233/timer-imx233.c
index bcadc82f2c..57d38c01a6 100644
--- a/firmware/target/arm/imx233/timer-imx233.c
+++ b/firmware/target/arm/imx233/timer-imx233.c
@@ -49,14 +49,11 @@ bool timer_set(long cycles, bool start)
bool timer_start(IF_COP_VOID(int core))
{
- imx233_timrot_setup(TIMER_USER, true, timer_cycles,
- BV_TIMROT_TIMCTRLn_SELECT__32KHZ_XTAL, BV_TIMROT_TIMCTRLn_PRESCALE__DIV_BY_1,
- false, &timer_fn);
+ imx233_timrot_setup_simple(TIMER_USER, true, timer_cycles, TIMER_SRC_32KHZ, &timer_fn);
return true;
}
void timer_stop(void)
{
- imx233_timrot_setup(TIMER_USER, false, 0, BV_TIMROT_TIMCTRLn_SELECT__NEVER_TICK,
- BV_TIMROT_TIMCTRLn_PRESCALE__DIV_BY_1, false, NULL);
+ imx233_timrot_setup_simple(TIMER_USER, false, 0, TIMER_SRC_STOP, NULL);
}