drivers: timer: move initialization setup to drivers

The weak symbol sys_clock_driver_init has been removed, therefore moving
the init responsability to the drivers themselves. As a result, the init
function has now been made static on all drivers and moved to the
bottom, following the convention used in other areas.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2021-11-04 12:51:39 +01:00 committed by Anas Nashif
commit b1ced75386
29 changed files with 724 additions and 648 deletions

View file

@ -72,7 +72,7 @@ uint32_t sys_clock_elapsed(void)
return 0;
}
int sys_clock_driver_init(const struct device *dev)
static int sys_clock_driver_init(const struct device *dev)
{
ARG_UNUSED(dev);
IRQ_CONNECT(TIMER_IRQ, DT_INST_IRQ(0, priority),
@ -94,3 +94,6 @@ int sys_clock_driver_init(const struct device *dev)
return 0;
}
SYS_INIT(sys_clock_driver_init, PRE_KERNEL_2,
CONFIG_SYSTEM_CLOCK_INIT_PRIORITY);