mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 02:35:28 +00:00
This helps us keep track of how long vboot is taking on the EC. Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=chrome-os-partner:9651 TEST=reboot system and look at debug log. time shouldn't start over after it jumps to image A. Change-Id: Iad86e90d42dabf1c67b2c2be80dda1151cf9a288
45 lines
1.2 KiB
C
45 lines
1.2 KiB
C
/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
/* Hardware timer driver API */
|
|
|
|
#ifndef __CROS_EC_HWTIMER_H
|
|
#define __CROS_EC_HWTIMER_H
|
|
|
|
/**
|
|
* Programs when the next timer should fire an interrupt.
|
|
* deadline: timestamp of the event.
|
|
*/
|
|
void __hw_clock_event_set(uint32_t deadline);
|
|
|
|
/* Returns the timestamp of the next programed event */
|
|
uint32_t __hw_clock_event_get(void);
|
|
|
|
/* Cancel the next event programed by __hw_clock_event_set */
|
|
void __hw_clock_event_clear(void);
|
|
|
|
/* Returns the value of the free-running counter used as clock. */
|
|
uint32_t __hw_clock_source_read(void);
|
|
|
|
/**
|
|
* Initializes the hardware timer used to provide clock services, using the
|
|
* specified start timer value.
|
|
*
|
|
* It returns the IRQ number of the timer routine.
|
|
*/
|
|
int __hw_clock_source_init(uint32_t start_t);
|
|
|
|
/**
|
|
* Searches the next deadline and program it in the timer hardware.
|
|
*
|
|
* overflow: if true, the 32-bit counter as overflowed since the last call.
|
|
*
|
|
* This function is exported from the common timers code as an helper for the
|
|
* hardware timer interrupt routine.
|
|
*/
|
|
void process_timers(int overflow);
|
|
|
|
#endif /* __CROS_EC_HWTIMER_H */
|