From f253af2d30d457cecc9f5650db9576eae8a6f14d Mon Sep 17 00:00:00 2001 From: Andrew Boie Date: Tue, 27 Jun 2017 14:51:57 -0700 Subject: [PATCH] drivers: timer: init earlier in boot sequence By the time we get to POST_KERNEL, kernel services and kernel objects should be available for use. This should include timers and the random number generator, but we don't init the system clock until sometime during the POST_KERNEL phase. Initialize it earlier. Signed-off-by: Andrew Boie --- drivers/timer/sys_clock_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/timer/sys_clock_init.c b/drivers/timer/sys_clock_init.c index 0f2a50e380e..f6139ddf20a 100644 --- a/drivers/timer/sys_clock_init.c +++ b/drivers/timer/sys_clock_init.c @@ -17,4 +17,4 @@ #include SYS_DEVICE_DEFINE("sys_clock", _sys_clock_driver_init, sys_clock_device_ctrl, - POST_KERNEL, CONFIG_SYSTEM_CLOCK_INIT_PRIORITY); + PRE_KERNEL_2, CONFIG_SYSTEM_CLOCK_INIT_PRIORITY);