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:
parent
7b1349cfe6
commit
b1ced75386
29 changed files with 724 additions and 648 deletions
|
@ -2,6 +2,7 @@
|
|||
* Copyright (c) 2021 Intel Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#include <device.h>
|
||||
#include <drivers/timer/system_timer.h>
|
||||
#include <sys_clock.h>
|
||||
#include <spinlock.h>
|
||||
|
@ -154,7 +155,7 @@ static inline void cpuid(uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *
|
|||
: "a"(*eax), "c"(*ecx));
|
||||
}
|
||||
|
||||
int sys_clock_driver_init(const struct device *dev)
|
||||
static int sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
#ifdef CONFIG_ASSERT
|
||||
uint32_t eax, ebx, ecx, edx;
|
||||
|
@ -200,3 +201,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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue