Home | History | Annotate | Download | only in arm
      1 /*
      2  * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
      3  *
      4  * SPDX-License-Identifier: BSD-3-Clause
      5  */
      6 
      7 #ifndef __SP804_DELAY_TIMER_H__
      8 #define __SP804_DELAY_TIMER_H__
      9 
     10 #include <delay_timer.h>
     11 #include <stdint.h>
     12 
     13 
     14 uint32_t sp804_get_timer_value(void);
     15 
     16 void sp804_timer_ops_init(uintptr_t base_addr, const timer_ops_t *ops);
     17 
     18 #define sp804_timer_init(base_addr, clk_mult, clk_div)			\
     19 	do {								\
     20 		static const timer_ops_t sp804_timer_ops = {		\
     21 			sp804_get_timer_value,				\
     22 			(clk_mult),					\
     23 			(clk_div)					\
     24 		};							\
     25 		sp804_timer_ops_init((base_addr), &sp804_timer_ops);	\
     26 	} while (0)
     27 
     28 #endif /* __SP804_DELAY_TIMER_H__ */
     29