Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame^] | 1 | /* |
| 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 | |
| 10 | /* |
| 11 | * Program systimer to fire an interrupt after time_out_ms |
| 12 | * |
| 13 | * Always return 0 |
| 14 | */ |
| 15 | int program_systimer(unsigned long time_out_ms); |
| 16 | /* |
| 17 | * Cancel the currently programmed systimer interrupt |
| 18 | * |
| 19 | * Always return 0 |
| 20 | */ |
| 21 | int cancel_systimer(void); |
| 22 | /* |
| 23 | * Initialises the systimer so that it can be used for programming timer |
| 24 | * interrupt. |
| 25 | * Must be called by the primary CPU only. |
| 26 | * |
| 27 | * Always return 0 |
| 28 | */ |
| 29 | int init_systimer(uintptr_t systimer_base); |
| 30 | /* |
| 31 | * Handler to acknowledge and de-activate the systimer interrupt |
| 32 | * |
| 33 | * Always return 0 |
| 34 | */ |
| 35 | int handler_systimer(void); |
| 36 | |
| 37 | #endif /* __SYSTEM_TIMER_H__ */ |