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
This commit is contained in:
Amaury Pouly 2016-05-02 21:37:38 +01:00
parent 423c64770c
commit 643c0a1e0e
5 changed files with 74 additions and 11 deletions

View file

@ -34,9 +34,7 @@ static void tick_timer(void)
void tick_start(unsigned int interval_in_ms)
{
/* use the 1-kHz XTAL clock source */
imx233_timrot_setup(TIMER_TICK, true, interval_in_ms,
BV_TIMROT_TIMCTRLn_SELECT__1KHZ_XTAL, BV_TIMROT_TIMCTRLn_PRESCALE__DIV_BY_1,
false, &tick_timer);
imx233_timrot_setup_simple(TIMER_TICK, true, interval_in_ms, TIMER_SRC_1KHZ, &tick_timer);
}
void arbiter_init(struct channel_arbiter_t *a, unsigned count)