arch: arc: make the boot time more accurate
* start timer0 when cpu runs at __start * add an offset to cycle_count Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
This commit is contained in:
parent
2b1227f155
commit
7051eecaed
2 changed files with 13 additions and 1 deletions
|
@ -167,6 +167,9 @@ int z_clock_driver_init(struct device *device)
|
|||
_timer_int_handler, NULL, 0);
|
||||
|
||||
timer0_limit_register_set(last_load - 1);
|
||||
#ifdef CONFIG_BOOT_TIME_MEASUREMENT
|
||||
cycle_count = timer0_count_register_get();
|
||||
#endif
|
||||
timer0_count_register_set(0);
|
||||
timer0_control_register_set(_ARC_V2_TMR_CTRL_NH | _ARC_V2_TMR_CTRL_IE);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue