blob: 3bb5dfaced2df8e738e50b67a738f74a7768c22a [file] [log] [blame]
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02001/*
2 * Copyright (c) 2018, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef __SYSTEM_TIMER_H__
8#define __SYSTEM_TIMER_H__
9
Antonio Nino Diaz09a00ef2019-01-11 13:12:58 +000010#include <stdint.h>
11
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020012/*
13 * Program systimer to fire an interrupt after time_out_ms
14 *
15 * Always return 0
16 */
17int program_systimer(unsigned long time_out_ms);
18/*
19 * Cancel the currently programmed systimer interrupt
20 *
21 * Always return 0
22 */
23int cancel_systimer(void);
24/*
25 * Initialises the systimer so that it can be used for programming timer
26 * interrupt.
27 * Must be called by the primary CPU only.
28 *
29 * Always return 0
30 */
31int init_systimer(uintptr_t systimer_base);
32/*
33 * Handler to acknowledge and de-activate the systimer interrupt
34 *
35 * Always return 0
36 */
37int handler_systimer(void);
38
39#endif /* __SYSTEM_TIMER_H__ */