Update _sys_clock_driver_init() interface
Prepares the _sys_clock_driver_init() routine to interface with the new driver model. To this end, it must accept a pointer to a device structure and return an integer. Change-Id: I3c600ce1efb49c0864aae7b09663ca40d6289372 Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
This commit is contained in:
parent
2874311ca5
commit
6e95fe0356
8 changed files with 35 additions and 13 deletions
|
@ -160,14 +160,16 @@ void _timer_int_handler(void *unused)
|
|||
* This routine is used to program the ARCv2 timer to deliver interrupts at the
|
||||
* rate specified via the 'sys_clock_us_per_tick' global variable.
|
||||
*
|
||||
* @return N/A
|
||||
* @return 0
|
||||
*/
|
||||
|
||||
void _sys_clock_driver_init(void)
|
||||
int _sys_clock_driver_init(struct device *device)
|
||||
{
|
||||
int irq = CONFIG_ARCV2_TIMER0_INT_LVL;
|
||||
int prio = CONFIG_ARCV2_TIMER0_INT_PRI;
|
||||
|
||||
ARG_UNUSED(device);
|
||||
|
||||
/* ensure that the timer will not generate interrupts */
|
||||
_arc_v2_aux_reg_write(_ARC_V2_TMR0_CONTROL, 0);
|
||||
_arc_v2_aux_reg_write(_ARC_V2_TMR0_COUNT, 0); /* clear the count value */
|
||||
|
@ -183,6 +185,8 @@ void _sys_clock_driver_init(void)
|
|||
|
||||
/* everything has been configured: safe to enable the interrupt */
|
||||
irq_enable(CONFIG_ARCV2_TIMER0_INT_LVL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue