Skip to content

Commit

Permalink
drivers: timer: init earlier in boot sequence
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Andrew Boie authored and andrewboie committed Jul 10, 2017
1 parent 02f0210 commit f253af2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/timer/sys_clock_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
#include <drivers/system_timer.h>

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);

0 comments on commit f253af2

Please sign in to comment.