tomahawk2_flexport_defines.h (2377B)
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: tomahawk2_flexport_defines.h 8 */ 9 10 11 #ifndef TOMAHAWK2_FLEXPORT_DEFINES_H 12 #define TOMAHAWK2_FLEXPORT_DEFINES_H 13 14 15 #define _TH2_PHY_PORT_CPU 0 16 #define _TH2_PHY_PORT_MNG0 257 17 #define _TH2_PHY_PORT_MNG1 259 18 #define _TH2_LOG_PORT_MNG0 66 19 #define _TH2_LOG_PORT_MNG1 100 20 #define _TH2_PHY_PORT_LPBK0 260 21 #define _TH2_PHY_PORT_LPBK1 261 22 #define _TH2_PHY_PORT_LPBK2 262 23 #define _TH2_PHY_PORT_LPBK3 263 24 #define _TH2_FORCE_SAF_TIMER_ENTRY_CNT 5 25 #define _TH2_OBM_PRIORITY_LOSSY_LO 0 26 #define _TH2_OBM_PRIORITY_LOSSY_HI 1 27 #define _TH2_OBM_PRIORITY_LOSSLESS0 2 28 #define _TH2_OBM_PRIORITY_LOSSLESS1 3 29 #define COUNTOF(ary) ((int) (sizeof (ary) / sizeof ((ary)[0]))) 30 #define _TH2_PHY_IS_FRONT_PANEL_PORT(p) ((p>=1)&& (p<=256)) 31 32 /* General Physical port */ 33 #define _TH2_PORTS_PER_PBLK 4 34 #define _TH2_PBLKS_PER_PIPE 16 35 #define _TH2_PBLKS_PER_HPIPE 8 36 #define _TH2_PIPES_PER_DEV 4 37 #define _TH2_XPES_PER_DEV 4 38 #define _TH2_GPHY_PORTS_PER_PIPE \ 39 (_TH2_PORTS_PER_PBLK * _TH2_PBLKS_PER_PIPE) 40 #define _TH2_PHY_PORTS_PER_PIPE (_TH2_GPHY_PORTS_PER_PIPE + 2) 41 #define _TH2_PBLKS_PER_DEV \ 42 (_TH2_PBLKS_PER_PIPE * _TH2_PIPES_PER_DEV) 43 #define _TH2_PHY_PORTS_PER_DEV \ 44 (_TH2_PHY_PORTS_PER_PIPE * _TH2_PIPES_PER_DEV) 45 46 47 /* Device port 48 * 32 General device port + 1 CPU/Mng + 1 Loopback*/ 49 #define _TH2_GDEV_PORTS_PER_PIPE 32 50 #define _TH2_DEV_PORTS_PER_PIPE (_TH2_GDEV_PORTS_PER_PIPE + 2) 51 #define _TH2_DEV_PORTS_PER_DEV \ 52 (_TH2_DEV_PORTS_PER_PIPE * _TH2_PIPES_PER_DEV) 53 54 /* MMU port */ 55 #define _TH2_MMU_PORTS_OFFSET_PER_PIPE 64 56 #define _TH2_MMU_PORTS_PER_DEV (64 * 4) 57 58 /* TDM */ 59 #define _TH2_TDM_LENGTH 512 60 #define _TH2_OVS_GROUP_COUNT_PER_HPIPE 6 61 #define _TH2_OVS_GROUP_COUNT_PER_PIPE 12 62 #define _TH2_OVS_GROUP_TDM_LENGTH 12 63 #define _TH2_OVS_HPIPE_COUNT_PER_PIPE 2 64 65 #ifndef TRUE 66 #define TRUE 1 67 #endif 68 #ifndef FALSE 69 #define FALSE 0 70 #endif 71 72 #endif /* TOMAHAWK2_FLEXPORT_DEFINES_H */