cmicx_led.h (1879B)
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 */ 7 8 #ifndef __CMICX_LED_H__ 9 #define __CMICX_LED_H__ 10 11 #include <bcm/types.h> 12 13 #if defined(BCM_CMICX_SUPPORT) || defined(CMICX_FW_BUILD) 14 #include <shared/cmicfw/iproc_mbox.h> 15 #include <shared/cmicfw/cmicx_led_public.h> 16 17 /* Maximum number of ports supported by device */ 18 #define LED_MAX_PORT 128 19 20 #define LED_STOP 0 21 #define LED_START 1 22 23 typedef enum soc_led_msg_id_e { 24 LED_MSG_LNK_STS = 0, 25 LED_MSG_STATUS, 26 LED_MSG_ENABLE, 27 LED_MSG_STATUS_SET, 28 LED_MSG_SPEED, 29 LED_MSG_ID_MAX /* Should ALWAYS be last */ 30 } soc_led_msg_id_t; 31 32 typedef enum soc_led_ram_bank_e { 33 LED_ACCU_RAM_BANK = 0, 34 LED_SEND_RAM_BANK 35 } soc_led_ram_bank_t; 36 37 typedef struct soc_led_port_status_s { 38 uint32 port; 39 uint32 status; 40 uint32 bank; 41 }__attribute__ ((packed)) soc_led_port_status_t; 42 43 typedef struct soc_led_link_status_s { 44 uint32 port; 45 uint32 link_sts; 46 }__attribute__ ((packed)) soc_led_link_status_t; 47 48 typedef struct soc_led_port_speed_s { 49 uint32 port; 50 uint32 speed; 51 }__attribute__ ((packed)) soc_led_port_speed_t; 52 53 #ifndef CMICX_FW_BUILD 54 extern int soc_cmicx_led_mbox_init(int unit); 55 extern int soc_cmicx_led_deinit(int unit); 56 extern int soc_cmicx_led_link_status(int unit, soc_led_link_status_t *link_status); 57 extern int soc_cmicx_led_status_get(int unit, soc_led_port_status_t *led_port_status); 58 extern int soc_cmicx_led_status_set(int unit, soc_led_port_status_t *led_port_status); 59 extern int soc_cmicx_led_enable(int unit, uint32 enable); 60 extern int soc_cmicx_led_speed(int unit, soc_led_port_speed_t *led_port_speed); 61 62 #endif /* !(CMICX_FW_BUILD) */ 63 #endif /* defined(BCM_CMICX_SUPPORT) || defined(CMICX_FW_BUILD) */ 64 #endif /* __CMICX_LED_H__ */