Files
opensbi/include/sbi_utils/timer/fdt_timer.h
Samuel Holland b15cc7715a lib: utils/timer: Constify FDT pointers in parsing functions
Indicate that none of these functions modify the devicetree by
constifying the parameter type.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
2024-08-24 13:02:48 +05:30

36 lines
657 B
C

/*
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2020 Western Digital Corporation or its affiliates.
*
* Authors:
* Anup Patel <anup.patel@wdc.com>
*/
#ifndef __FDT_TIMER_H__
#define __FDT_TIMER_H__
#include <sbi/sbi_types.h>
#ifdef CONFIG_FDT_TIMER
struct fdt_timer {
const struct fdt_match *match_table;
int (*cold_init)(const void *fdt, int nodeoff, const struct fdt_match *match);
int (*warm_init)(void);
void (*exit)(void);
};
void fdt_timer_exit(void);
int fdt_timer_init(bool cold_boot);
#else
static inline void fdt_timer_exit(void) { }
static inline int fdt_timer_init(bool cold_boot) { return 0; }
#endif
#endif