mirror of
https://github.com/CTCaer/switch-l4t-atf.git
synced 2025-02-19 10:00:30 +00:00
![dp-arm](/assets/img/avatar_default.png)
To make software license auditing simpler, use SPDX[0] license identifiers instead of duplicating the license text in every file. NOTE: Files that have been imported by FreeBSD have not been modified. [0]: https://spdx.org/ Change-Id: I80a00e1f641b8cc075ca5a95b10607ed9ed8761a Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
32 lines
890 B
C
32 lines
890 B
C
/*
|
|
* Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef __DELAY_TIMER_H__
|
|
#define __DELAY_TIMER_H__
|
|
|
|
#include <stdint.h>
|
|
|
|
/********************************************************************
|
|
* A simple timer driver providing synchronous delay functionality.
|
|
* The driver must be initialized with a structure that provides a
|
|
* function pointer to return the timer value and a clock
|
|
* multiplier/divider. The ratio of the multiplier and the divider is
|
|
* the clock period in microseconds.
|
|
********************************************************************/
|
|
|
|
typedef struct timer_ops {
|
|
uint32_t (*get_timer_value)(void);
|
|
uint32_t clk_mult;
|
|
uint32_t clk_div;
|
|
} timer_ops_t;
|
|
|
|
void mdelay(uint32_t msec);
|
|
void udelay(uint32_t usec);
|
|
void timer_init(const timer_ops_t *ops);
|
|
|
|
|
|
#endif /* __DELAY_TIMER_H__ */
|