cmicx_led_public.h (2098B)
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_PUBLIC_H__ 9 #define __CMICX_LED_PUBLIC_H__ 10 11 #include <bcm/types.h> 12 13 #define CUSTOM_HANDLER_ADDR (0x3800) 14 15 /* LED Output pattern defines */ 16 #define LED_OUTPUT_RX (1 << 0) 17 #define LED_OUTPUT_TX (1 << 1) 18 #define LED_OUTPUT_COLLISION (1 << 2) 19 #define LED_OUTPUT_SPEED (1 << 3) 20 #define LED_OUTPUT_DUPLEX (1 << 5) 21 #define LED_OUTPUT_FLOW_CTRL (1 << 6) 22 #define LED_OUTPUT_LINK_UP (1 << 7) 23 #define LED_OUTPUT_LINK_ENABLE (1 << 8) 24 25 26 /* Macros and structure for LED interface */ 27 #define LED_MAX_NUM_INTF (5) /* Max number of LED interfaces */ 28 #define LED_INVALID_PORT 0xFFFF 29 #define LED_MAX_NUM_BITS_PER_PORT_OUTPUT 16 30 31 32 33 typedef enum soc_led_speed_e { 34 LED_SPD_10M = 1, /* 10 Mbps */ 35 LED_SPD_100M, /* 100 Mbps */ 36 LED_SPD_1000M, /* 1 Gbps */ 37 LED_SPD_2500M, /* 2.5 Gbps */ 38 LED_SPD_10G, /* 10 Gbps */ 39 LED_SPD_25G, /* 25 Gbps */ 40 LED_SPD_40G, /* 40 Gbps */ 41 LED_SPD_50G, /* 50 Gbps */ 42 LED_SPD_100G, /* 100 Gbps */ 43 LED_SPD_200G, /* 200 Gbps */ 44 LED_SPD_400G, /* 400 Gbps */ 45 LED_SPD_INVALID /* Should ALWAYS be last */ 46 } soc_led_speed_t; 47 48 typedef struct soc_led_intf_ctrl_s { 49 uint32 valid; /* interface valid, default to 0 */ 50 uint32 start_row; 51 uint32 end_row; 52 uint32 pat_width; 53 } soc_led_intf_ctrl_t; 54 55 typedef struct soc_led_custom_handler_ctrl_s{ 56 uint32 accu_ram_base; 57 uint32 pat_ram_base; 58 uint8 *port_speed; /* Pointer to port_speed[] */ 59 /* as defined in */ 60 /* $sdk/include/shared/cmicfw/cmicx_led.h */ 61 soc_led_intf_ctrl_t intf_ctrl[LED_MAX_NUM_INTF]; 62 63 } soc_led_custom_handler_ctrl_t; 64 65 typedef void (custom_handler_t)(soc_led_custom_handler_ctrl_t *ctrl, uint32 activity_count); 66 67 #endif /* __CMICX_LED_PUBLIC_H__ */