knet.h (1420B)
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 * File: knet.h 8 * Purpose: Definitions for the knet type. 9 */ 10 11 #ifndef _SOC_KNET_H_ 12 #define _SOC_KNET_H_ 13 14 #include <kcom.h> 15 16 typedef struct soc_knet_vectors_s { 17 kcom_chan_t kcom; 18 int (*irq_mask_set)(int unit, uint32 addr, uint32 mask); 19 int (*hw_unit_get)(int unit, int inverse); 20 } soc_knet_vectors_t; 21 22 typedef int (*soc_knet_rx_cb_t)(kcom_msg_t *, unsigned int, void *); 23 24 extern int 25 soc_knet_config(soc_knet_vectors_t *vect); 26 27 extern int 28 soc_knet_cleanup(void); 29 30 extern int 31 soc_knet_init(int unit); 32 33 extern int 34 soc_knet_cmd_req(kcom_msg_t *kmsg, unsigned int len, unsigned int buf_size); 35 36 extern int 37 soc_knet_irq_mask_set(int unit, uint32 addr, uint32 mask); 38 39 extern int 40 soc_knet_hw_reset(int unit, int channel); 41 42 extern int 43 soc_knet_hw_init(int unit); 44 45 extern int 46 soc_knet_rx_register(soc_knet_rx_cb_t callback, void *cookie, uint32 flags); 47 48 extern int 49 soc_knet_rx_unregister(soc_knet_rx_cb_t callback); 50 51 extern int 52 soc_eth_knet_hw_config(int unit, int type, int chan, uint32 flags, uint32 value); 53 54 extern int 55 soc_knet_debug_pkt_set(int unit, int enable); 56 57 extern int 58 soc_knet_debug_pkt_get(int unit, int *value); 59 60 extern int 61 soc_knet_wb_cleanup(int unit); 62 63 #endif /* _SOC_KNET_H_ */