extender.h (1258B)
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-2020 Broadcom Inc. All rights reserved. 6 * 7 * File: extender.h 8 * Purpose: Helper function declarations for the extender module BCM APIs. 9 */ 10 11 #ifndef INCLUDE_EXTENDER_H 12 #define INCLUDE_EXTENDER_H 13 14 #include <bcm/extender.h> 15 #include <soc/dpp/drv.h> 16 17 /************* 18 * INCLUDES * 19 */ 20 /* { */ 21 22 /* } */ 23 /************* 24 * DEFINES * 25 */ 26 /* { */ 27 28 /* } */ 29 /************* 30 * MACROS * 31 */ 32 /* { */ 33 34 35 #define _BCM_DPP_EXTENDER_IS_ENABLED(_unit) (SOC_DPP_CONFIG(_unit)->extender.port_extender_init_status >= soc_dpp_extender_init_status_enabled) 36 37 #define _BCM_DPP_EXTENDER_IS_INIT(_unit) (SOC_DPP_CONFIG(_unit)->extender.port_extender_init_status >= soc_dpp_extender_init_status_init) 38 39 #define _BCM_DPP_EXTENDER_INIT_CHECK(_unit) \ 40 if (!_BCM_DPP_EXTENDER_IS_INIT(_unit)) { \ 41 BCMDNX_ERR_EXIT_MSG(BCM_E_CONFIG, (_BSL_BCM_MSG("Port extender module is not initialized.")));\ 42 } 43 44 /* } */ 45 /************* 46 * TYPE DEFS * 47 */ 48 /* { */ 49 50 51 /* } */ 52 /************* 53 * GLOBALS * 54 */ 55 /* { */ 56 57 /* } */ 58 /************* 59 * FUNCTIONS * 60 */ 61 /* { */ 62 63 64 /* } */ 65 66 #endif /* INCLUDE_EXTENDER_H */ 67