cancun.c (1453B)
1 /* 2 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 3 * 4 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 5 * 6 * Cancun load functions 7 * 8 * cancun files are required to be loaded TD3 onwards. 9 */ 10 #include<soc/defs.h> 11 12 #if defined(BCM_ESW_SUPPORT) && defined(CANCUN_SUPPORT) 13 14 #include<soc/esw/cancun.h> 15 16 int 17 soc_cancun_pre_misc_init_load(int unit) 18 { 19 #if !defined(NO_SAL_APPL) 20 if (soc_feature(unit, soc_feature_cancun)) { 21 if (soc_cancun_generic_load(unit, CANCUN_SOC_FILE_TYPE_CMH) < 0) { 22 return (-1); 23 } 24 if (soc_cancun_generic_load(unit, CANCUN_SOC_FILE_TYPE_CCH) < 0) { 25 return (-1); 26 } 27 if (soc_cancun_generic_load(unit, CANCUN_SOC_FILE_TYPE_CEH) < 0) { 28 return (-1); 29 } 30 } 31 #endif 32 33 return 0; 34 } 35 36 int 37 soc_cancun_post_misc_init_load(int unit) 38 { 39 #if !defined(NO_SAL_APPL) 40 if (soc_feature(unit, soc_feature_cancun)) { 41 if (soc_cancun_generic_load(unit, CANCUN_SOC_FILE_TYPE_CIH) < 0) { 42 return (-1); 43 } 44 if (soc_feature(unit, soc_feature_flex_flow)) { 45 if (soc_cancun_generic_load(unit, CANCUN_SOC_FILE_TYPE_CFH) < 0) { 46 return (-1); 47 } 48 } 49 } 50 #endif 51 52 return 0; 53 } 54 55 #else /* !BCM_ESW_SUPPORT && !CANCUN_SUPPORT */ 56 int _test_cancun_no_empty; 57 #endif /* BCM_ESW_SUPPORT && CANCUN_SUPPORT */