subport.c (1955B)
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: subport.c 8 * Purpose: SUBPORT common APIs 9 */ 10 11 #include <soc/drv.h> 12 #include <bcm/subport.h> 13 14 /* 15 * Function: 16 * bcm_subport_group_config_t_init 17 * Description: 18 * Initialize an SUBPORT group config structure 19 * Parameters: 20 * config - pointer to SUBPORT group config structure 21 * Return: none 22 */ 23 void 24 bcm_subport_group_config_t_init(bcm_subport_group_config_t *config) 25 { 26 sal_memset(config, 0, sizeof(bcm_subport_group_config_t)); 27 } 28 29 /* 30 * Function: 31 * bcm_subport_config_t_init 32 * Description: 33 * Initialize an SUBPORT config structure 34 * Parameters: 35 * config - pointer to SUBPORT config structure 36 * Return: none 37 */ 38 void 39 bcm_subport_config_t_init(bcm_subport_config_t *config) 40 { 41 sal_memset(config, 0, sizeof(bcm_subport_config_t)); 42 } 43 44 /** 45 * Function: 46 * bcm_subport_group_linkphy_config_t_init() 47 * Purpose: 48 * Initialize port linkPHY config control struct 49 * 50 * Parameters: 51 * unit - Unit 52 * linkphy_config - port linkPHY configuration 53 */ 54 void bcm_subport_group_linkphy_config_t_init( 55 bcm_subport_group_linkphy_config_t *linkphy_config) 56 { 57 if (linkphy_config != NULL) { 58 sal_memset(linkphy_config, 0, 59 sizeof(bcm_subport_group_linkphy_config_t)); 60 } 61 return; 62 } 63 64 /** 65 * Function: 66 * bcm_subport_linkphy_rx_error_reg_info_t_init() 67 * Purpose: 68 * Initialize linkPHY RX error registration struct 69 * 70 * Parameters: 71 * reg_info - Linkphy error reg info 72 */ 73 void bcm_subport_linkphy_rx_error_reg_info_t_init( 74 bcm_subport_linkphy_rx_error_reg_info_t *reg_info) 75 { 76 if (reg_info != NULL) { 77 sal_memset(reg_info, 0, 78 sizeof(bcm_subport_linkphy_rx_error_reg_info_t)); 79 } 80 return; 81 } 82