root/drivers/net/ethernet/freescale/dpaa2/dprtc.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   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 /**
  17  * Number of irq's
  18  */
  19 #define DPRTC_MAX_IRQ_NUM       1
  20 #define DPRTC_IRQ_INDEX         0
  21 
  22 #define DPRTC_EVENT_PPS         0x08000000
  23 
  24 int dprtc_open(struct fsl_mc_io *mc_io,
  25                u32 cmd_flags,
  26                int dprtc_id,
  27                u16 *token);
  28 
  29 int dprtc_close(struct fsl_mc_io *mc_io,
  30                 u32 cmd_flags,
  31                 u16 token);
  32 
  33 int dprtc_set_irq_enable(struct fsl_mc_io *mc_io,
  34                          u32 cmd_flags,
  35                          u16 token,
  36                          u8 irq_index,
  37                          u8 en);
  38 
  39 int dprtc_get_irq_enable(struct fsl_mc_io *mc_io,
  40                          u32 cmd_flags,
  41                          u16 token,
  42                          u8 irq_index,
  43                          u8 *en);
  44 
  45 int dprtc_set_irq_mask(struct fsl_mc_io *mc_io,
  46                        u32 cmd_flags,
  47                        u16 token,
  48                        u8 irq_index,
  49                        u32 mask);
  50 
  51 int dprtc_get_irq_mask(struct fsl_mc_io *mc_io,
  52                        u32 cmd_flags,
  53                        u16 token,
  54                        u8 irq_index,
  55                        u32 *mask);
  56 
  57 int dprtc_get_irq_status(struct fsl_mc_io *mc_io,
  58                          u32 cmd_flags,
  59                          u16 token,
  60                          u8 irq_index,
  61                          u32 *status);
  62 
  63 int dprtc_clear_irq_status(struct fsl_mc_io *mc_io,
  64                            u32 cmd_flags,
  65                            u16 token,
  66                            u8 irq_index,
  67                            u32 status);
  68 
  69 #endif /* __FSL_DPRTC_H */

/* [<][>][^][v][top][bottom][index][help] */