soc_schan_fifo_internal.h (1690B)
1 /* 2 * 3 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 4 * 5 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 6 * 7 * Internal SCHAN FIFO data structures and API 8 */ 9 10 #ifndef _SOC_SCHAN_FIFO_INTERNAL_H 11 #define _SOC_SCHAN_FIFO_INTERNAL_H 12 13 #include <soc/types.h> 14 #include <soc/drv.h> 15 #include <soc/soc_schan_fifo.h> 16 17 typedef struct soc_schan_fifo_wparam_s { 18 int ch; 19 void *cookie; 20 soc_async_cb_f cb_f; 21 }soc_schan_fifo_wparam_t; 22 23 /* This structure is used for SCHAN FIFO cmic specific driver operations*/ 24 typedef struct soc_schan_fifo_drv_op_s { 25 int (*soc_schan_fifo_op_prog)(int unit, 26 void *data, void *wparam); 27 int (*soc_schan_fifo_op_complete)(int unit, 28 void *data, void *wparam); 29 void (*soc_schan_fifo_deinit)(int unit); 30 int (*soc_schan_fifo_control)(int unit, 31 schan_fifo_ctl_t ctl, void *data); 32 } soc_schan_fifo_drv_op_t; 33 34 /* This structure is used for SCHAN FIFO Driver*/ 35 36 typedef struct soc_schan_fifo_drv_s { 37 soc_schan_fifo_drv_op_t op; 38 soc_async_handle_t handle; 39 } soc_schan_fifo_drv_t; 40 41 42 /******************************************* 43 * @function soc_cmicx_schan_fifo_init 44 * purpose API to Initialize cmicx SCHAN FIFO 45 * 46 * @param unit [in] unit 47 * @param drv [out] soc_schan_fifo_drv_op_t pointer 48 * @param config [in] pointer to soc_schan_fifo_config_t 49 * 50 * @returns SOC_E_NONE 51 * @returns SOC_E_XXX 52 * 53 * @end 54 */ 55 extern int soc_cmicx_schan_fifo_init(int unit, 56 soc_schan_fifo_drv_op_t *drv, 57 soc_schan_fifo_config_t *config); 58 59 60 #endif /* !_SOC_SCHAN_FIFO_INTERNAL_H */