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 <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2017-06-27 14:51:57 -07:00 committed by Andrew Boie
commit f253af2d30

View file

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