mirror of
				https://github.com/riscv-software-src/opensbi
				synced 2025-11-04 05:50:22 +00:00 
			
		
		
		
	The timer driver subsystem does not need any extra data, so it can use `struct fdt_driver` directly. The generic fdt_timer_init() performs a best-effort initialization of all matching DT nodes. Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org>
		
			
				
	
	
		
			27 lines
		
	
	
		
			416 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			416 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>
 | 
						|
#include <sbi_utils/fdt/fdt_driver.h>
 | 
						|
 | 
						|
#ifdef CONFIG_FDT_TIMER
 | 
						|
 | 
						|
int fdt_timer_init(void);
 | 
						|
 | 
						|
#else
 | 
						|
 | 
						|
static inline int fdt_timer_init(void) { return 0; }
 | 
						|
 | 
						|
#endif
 | 
						|
 | 
						|
#endif
 |