mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-06 09:01:57 +00:00
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>
21 lines
449 B
C
21 lines
449 B
C
/*
|
|
* Copyright (c) 2015 Wind River Systems, Inc.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/**
|
|
* @file
|
|
* @brief Initialize system clock driver
|
|
*
|
|
* Initializing the timer driver is done in this module to reduce code
|
|
* duplication.
|
|
*/
|
|
|
|
#include <kernel.h>
|
|
#include <init.h>
|
|
#include <drivers/system_timer.h>
|
|
|
|
SYS_DEVICE_DEFINE("sys_clock", _sys_clock_driver_init, sys_clock_device_ctrl,
|
|
PRE_KERNEL_2, CONFIG_SYSTEM_CLOCK_INIT_PRIORITY);
|