1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Copyright 2013-2016 Freescale Semiconductor Inc.
4  * Copyright 2016-2018 NXP
5  */
6 
7 #ifndef __FSL_DPRTC_H
8 #define __FSL_DPRTC_H
9 
10 /* Data Path Real Time Counter API
11  * Contains initialization APIs and runtime control APIs for RTC
12  */
13 
14 struct fsl_mc_io;
15 
16 int dprtc_open(struct fsl_mc_io *mc_io,
17 	       u32 cmd_flags,
18 	       int dprtc_id,
19 	       u16 *token);
20 
21 int dprtc_close(struct fsl_mc_io *mc_io,
22 		u32 cmd_flags,
23 		u16 token);
24 
25 int dprtc_set_freq_compensation(struct fsl_mc_io *mc_io,
26 				u32 cmd_flags,
27 				u16 token,
28 				u32 freq_compensation);
29 
30 int dprtc_get_freq_compensation(struct fsl_mc_io *mc_io,
31 				u32 cmd_flags,
32 				u16 token,
33 				u32 *freq_compensation);
34 
35 int dprtc_get_time(struct fsl_mc_io *mc_io,
36 		   u32 cmd_flags,
37 		   u16 token,
38 		   uint64_t *time);
39 
40 int dprtc_set_time(struct fsl_mc_io *mc_io,
41 		   u32 cmd_flags,
42 		   u16 token,
43 		   uint64_t time);
44 
45 #endif /* __FSL_DPRTC_H */
46