tomahawk3_flexport.h (2594B)
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: tomahawk3_flexport.h 8 */ 9 10 11 #ifndef SOC_TOMAHAWK3_FLEXPORT_H 12 #define SOC_TOMAHAWK3_FLEXPORT_H 13 14 15 /*! @file tomahawk3_flexport.h 16 * @brief FlexPort functions and structures for Tomahawk3. 17 * Details are shown below. 18 */ 19 20 #include <soc/flexport/flexport_common.h> 21 #include <soc/init/tomahawk3_flexport_defines.h> 22 #include <soc/init/tomahawk3_ep_init.h> 23 #include <soc/init/tomahawk3_tdm.h> 24 #include <soc/init/tomahawk3_port_init.h> 25 #include <soc/init/tomahawk3_idb_init.h> 26 #include <soc/flexport/tomahawk3_mmu_flexport.h> 27 #include <soc/flexport/tomahawk3_idb_flexport.h> 28 #include <soc/flexport/tomahawk3_cdmac_flexport.h> 29 30 31 /*! @struct soc_tomahawk3_flex_scratch_t 32 * @brief Scratch pad locals. Caller must not allocate. Callee allocates 33 * at entry and deallocates before return. This area is pointed 34 * to by the cookie in soc_port_schedule_state_t struct type. 35 */ 36 typedef struct soc_tomahawk3_flex_scratch_s { 37 /* Not used for now in TH3; user can add variables */ 38 int dummy; 39 } soc_tomahawk3_flex_scratch_t; 40 41 42 extern void *soc_tomahawk3_port_lane_info_alloc (void); 43 44 45 extern int soc_tomahawk3_set_port_lane_info ( 46 int unit, 47 const void *lane_info_ptr, 48 int port_idx, 49 int pgw, 50 int xlp 51 ); 52 53 54 extern int soc_tomahawk3_get_port_lane_info ( 55 int unit, 56 const void *lane_info_ptr, 57 int * port_idx, 58 int * pgw, 59 int * xlp 60 ); 61 62 63 extern int soc_tomahawk3_reconfigure_ports ( 64 int unit, 65 soc_port_schedule_state_t *port_schedule_state 66 ); 67 68 69 extern int soc_tomahawk3_flex_start ( 70 int unit, 71 soc_port_schedule_state_t *port_schedule_state 72 ); 73 74 75 extern int soc_tomahawk3_flex_end ( 76 int unit, 77 soc_port_schedule_state_t *port_schedule_state 78 ); 79 80 81 extern int soc_tomahawk3_flex_top_port_down ( 82 int unit, 83 soc_port_schedule_state_t *port_schedule_state 84 ); 85 86 87 extern int soc_tomahawk3_flex_top_port_up ( 88 int unit, 89 soc_port_schedule_state_t *port_schedule_state 90 ); 91 92 extern int (*th3_flexport_phases[MAX_FLEX_PHASES]) (int unit, 93 soc_port_schedule_state_t 94 *port_schedule_state); 95 96 #endif /* SOC_TOMAHAWK3_FLEXPORT_H */