linux/drivers/staging/media/atomisp/pci/ia_css_timer.h

/* SPDX-License-Identifier: GPL-2.0 */
/**
Support for Intel Camera Imaging ISP subsystem.
Copyright (c) 2010 - 2015, Intel Corporation.

This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.

This program is distributed in the hope it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
more details.
*/

#ifndef __IA_CSS_TIMER_H
#define __IA_CSS_TIMER_H

/* @file
 * Timer interface definitions
 */
#include <type_support.h>		/* for uint32_t */
#include "ia_css_err.h"

/* @brief timer reading definition */
clock_value_t;

/* @brief 32 bit clock tick,(timestamp based on timer-value of CSS-internal timer)*/
struct ia_css_clock_tick {};

/* @brief TIMER event codes */
enum ia_css_tm_event {};

/* @brief code measurement common struct */
struct ia_css_time_meas {};

/**@brief SIZE_OF_IA_CSS_CLOCK_TICK_STRUCT checks to ensure correct alignment for struct ia_css_clock_tick. */
#define SIZE_OF_IA_CSS_CLOCK_TICK_STRUCT
/* @brief checks to ensure correct alignment for ia_css_time_meas. */
#define SIZE_OF_IA_CSS_TIME_MEAS_STRUCT

/* @brief API to fetch timer count directly
*
* @param curr_ts [out] measured count value
* @return 0 if success
*
*/
int
ia_css_timer_get_current_tick(
    struct ia_css_clock_tick *curr_ts);

#endif  /* __IA_CSS_TIMER_H */