cpri_speed_scan.h (1576B)
1 /* 2 * 3 * 4 * 5 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 6 * 7 * Copyright 2007-2020 Broadcom Inc. All rights reserved. 8 */ 9 10 #ifndef _CPRI_SPEED_SCAN_H_ 11 #define _CPRI_SPEED_SCAN_H_ 12 13 #define BCM_SPEED_SCAN_INTERVAL_MIN 70 /* 70 usec. */ 14 #define SPD_SCAN_THREAD_PRI 100 15 #define SPD_SCAN_NUM_UNITS SOC_MAX_NUM_DEVICES 16 #define SPD_SCAN_NUM_PORTS SOC_MAX_NUM_PORTS 17 #define SPD_SCAN_MAX_SPEED_LIST 4 18 19 20 #define SPD_SCAN_F_INIT 0x1 /**< Module is initialized. */ 21 #define SPD_SCAN_F_ENABLE 0x2 /**< Scanning is enabled. */ 22 23 #define SPD_SCAN_F_INIT_SET(flags) ((flags) |= SPD_SCAN_F_INIT) 24 #define SPD_SCAN_F_ENABLE_SET(flags) ((flags) |= SPD_SCAN_F_ENABLE) 25 26 #define SPD_SCAN_F_INIT_CLR(flags) ((flags) &= ~SPD_SCAN_F_INIT) 27 #define SPD_SCAN_F_ENABLE_CLR(flags) ((flags) &= ~SPD_SCAN_F_ENABLE) 28 29 #define SPD_SCAN_F_INIT_GET(flags) ((flags) & SPD_SCAN_F_INIT ? 1 : 0) 30 #define SPD_SCAN_F_ENABLE_GET(flags) ((flags) & SPD_SCAN_F_ENABLE? 1 : 0) 31 32 typedef enum _cpri_spd_scan_state_e { 33 _CPRI_SPD_SCAN_STATE_SCANNING = 0x00, /**< Finding Speed */ 34 _CPRI_SPD_SCAN_STATE_FOUND = 0x01, /**< Speed Found */ 35 _CPRI_SPD_SCAN_STATE_RESOLVED = 0x02, /**< Speed Set */ 36 } _cpri_spd_scan_state_t; 37 38 #ifdef BCM_WARM_BOOT_SUPPORT 39 int bcm_esw_cpri_speed_scan_sync (int unit); 40 int bcm_esw_cpri_speed_scan_reload (int unit); 41 #endif 42 43 #endif /* _CPRI_SPEED_SCAN_H_ */ 44