diff options
author | Anup Patel <anup.patel@wdc.com> | 2018-12-11 19:24:06 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2018-12-11 19:24:06 +0530 |
commit | 9e8ff05cb61f157fb0bcb6b0071d7b6dc0763faa (patch) | |
tree | b9513a86b3b36e569cb46387846fee9c5544f566 /include/sbi/sbi_timer.h |
Initial commit.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'include/sbi/sbi_timer.h')
-rw-r--r-- | include/sbi/sbi_timer.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/sbi/sbi_timer.h b/include/sbi/sbi_timer.h new file mode 100644 index 0000000..914e9c0 --- /dev/null +++ b/include/sbi/sbi_timer.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2018 Western Digital Corporation or its affiliates. + * + * Authors: + * Anup Patel <anup.patel@wdc.com> + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#ifndef __SBI_TIMER_H__ +#define __SBI_TIMER_H__ + +#include <sbi/sbi_types.h> + +struct sbi_scratch; + +u64 sbi_timer_value(struct sbi_scratch *scratch); + +void sbi_timer_event_stop(struct sbi_scratch *scratch, u32 hartid); + +void sbi_timer_event_start(struct sbi_scratch *scratch, u32 hartid, + u64 next_event); + +void sbi_timer_process(struct sbi_scratch *scratch, u32 hartid); + +int sbi_timer_warm_init(struct sbi_scratch *scratch, u32 hartid); + +int sbi_timer_cold_init(struct sbi_scratch *scratch); + +#endif |