aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x/bnx2x_hsi.h
diff options
context:
space:
mode:
authorDmitry Kravkov <dmitry@broadcom.com>2010-10-05 23:28:26 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-06 17:10:37 -0400
commitf2e0899f0f275cc3f5e9c9726178d7d0ac19b2db (patch)
tree436144046a751427bdd2e3fd284688582d2efe61 /drivers/net/bnx2x/bnx2x_hsi.h
parent8fe23fbd94af5a4c117fd0eb2f1c3f492f79efe8 (diff)
bnx2x: Add 57712 support
57712 HW supported with same set of features as for 57710/57711 Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x/bnx2x_hsi.h')
-rw-r--r--drivers/net/bnx2x/bnx2x_hsi.h187
1 files changed, 185 insertions, 2 deletions
diff --git a/drivers/net/bnx2x/bnx2x_hsi.h b/drivers/net/bnx2x/bnx2x_hsi.h
index 596041cbd977..18c8e23a0e82 100644
--- a/drivers/net/bnx2x/bnx2x_hsi.h
+++ b/drivers/net/bnx2x/bnx2x_hsi.h
@@ -663,6 +663,7 @@ struct shm_dev_info { /* size */
663#define FUNC_7 7 663#define FUNC_7 7
664#define E1_FUNC_MAX 2 664#define E1_FUNC_MAX 2
665#define E1H_FUNC_MAX 8 665#define E1H_FUNC_MAX 8
666#define E2_FUNC_MAX 4 /* per path */
666 667
667#define VN_0 0 668#define VN_0 0
668#define VN_1 1 669#define VN_1 1
@@ -821,6 +822,9 @@ struct drv_func_mb {
821#define FW_MSG_CODE_DRV_LOAD_COMMON 0x10100000 822#define FW_MSG_CODE_DRV_LOAD_COMMON 0x10100000
822#define FW_MSG_CODE_DRV_LOAD_PORT 0x10110000 823#define FW_MSG_CODE_DRV_LOAD_PORT 0x10110000
823#define FW_MSG_CODE_DRV_LOAD_FUNCTION 0x10120000 824#define FW_MSG_CODE_DRV_LOAD_FUNCTION 0x10120000
825 /* Load common chip is supported from bc 6.0.0 */
826#define REQ_BC_VER_4_DRV_LOAD_COMMON_CHIP 0x00060000
827#define FW_MSG_CODE_DRV_LOAD_COMMON_CHIP 0x10130000
824#define FW_MSG_CODE_DRV_LOAD_REFUSED 0x10200000 828#define FW_MSG_CODE_DRV_LOAD_REFUSED 0x10200000
825#define FW_MSG_CODE_DRV_LOAD_DONE 0x11100000 829#define FW_MSG_CODE_DRV_LOAD_DONE 0x11100000
826#define FW_MSG_CODE_DRV_UNLOAD_COMMON 0x20100000 830#define FW_MSG_CODE_DRV_UNLOAD_COMMON 0x20100000
@@ -1026,7 +1030,17 @@ struct shmem_region { /* SharedMem Offset (size) */
1026 1030
1027}; /* 57710 = 0x6dc | 57711 = 0x7E4 | 57712 = 0x734 */ 1031}; /* 57710 = 0x6dc | 57711 = 0x7E4 | 57712 = 0x734 */
1028 1032
1033struct fw_flr_ack {
1034 u32 pf_ack;
1035 u32 vf_ack[1];
1036 u32 iov_dis_ack;
1037};
1029 1038
1039struct fw_flr_mb {
1040 u32 aggint;
1041 u32 opgen_addr;
1042 struct fw_flr_ack ack;
1043};
1030 1044
1031 1045
1032struct shmem2_region { 1046struct shmem2_region {
@@ -1046,7 +1060,20 @@ struct shmem2_region {
1046 * For backwards compatibility, if the mf_cfg_addr does not exist 1060 * For backwards compatibility, if the mf_cfg_addr does not exist
1047 * (the size filed is smaller than 0xc) the mf_cfg resides at the 1061 * (the size filed is smaller than 0xc) the mf_cfg resides at the
1048 * end of struct shmem_region 1062 * end of struct shmem_region
1063 */
1064 u32 mf_cfg_addr;
1065#define SHMEM_MF_CFG_ADDR_NONE 0x00000000
1066
1067 struct fw_flr_mb flr_mb;
1068 u32 reserved[3];
1069 /*
1070 * The other shmemX_base_addr holds the other path's shmem address
1071 * required for example in case of common phy init, or for path1 to know
1072 * the address of mcp debug trace which is located in offset from shmem
1073 * of path0
1049 */ 1074 */
1075 u32 other_shmem_base_addr;
1076 u32 other_shmem2_base_addr;
1050}; 1077};
1051 1078
1052 1079
@@ -1206,10 +1233,126 @@ struct bmac1_stats {
1206 u32 rx_stat_gripj_hi; 1233 u32 rx_stat_gripj_hi;
1207}; 1234};
1208 1235
1236struct bmac2_stats {
1237 u32 tx_stat_gtpk_lo; /* gtpok */
1238 u32 tx_stat_gtpk_hi; /* gtpok */
1239 u32 tx_stat_gtxpf_lo; /* gtpf */
1240 u32 tx_stat_gtxpf_hi; /* gtpf */
1241 u32 tx_stat_gtpp_lo; /* NEW BMAC2 */
1242 u32 tx_stat_gtpp_hi; /* NEW BMAC2 */
1243 u32 tx_stat_gtfcs_lo;
1244 u32 tx_stat_gtfcs_hi;
1245 u32 tx_stat_gtuca_lo; /* NEW BMAC2 */
1246 u32 tx_stat_gtuca_hi; /* NEW BMAC2 */
1247 u32 tx_stat_gtmca_lo;
1248 u32 tx_stat_gtmca_hi;
1249 u32 tx_stat_gtbca_lo;
1250 u32 tx_stat_gtbca_hi;
1251 u32 tx_stat_gtovr_lo;
1252 u32 tx_stat_gtovr_hi;
1253 u32 tx_stat_gtfrg_lo;
1254 u32 tx_stat_gtfrg_hi;
1255 u32 tx_stat_gtpkt1_lo; /* gtpkt */
1256 u32 tx_stat_gtpkt1_hi; /* gtpkt */
1257 u32 tx_stat_gt64_lo;
1258 u32 tx_stat_gt64_hi;
1259 u32 tx_stat_gt127_lo;
1260 u32 tx_stat_gt127_hi;
1261 u32 tx_stat_gt255_lo;
1262 u32 tx_stat_gt255_hi;
1263 u32 tx_stat_gt511_lo;
1264 u32 tx_stat_gt511_hi;
1265 u32 tx_stat_gt1023_lo;
1266 u32 tx_stat_gt1023_hi;
1267 u32 tx_stat_gt1518_lo;
1268 u32 tx_stat_gt1518_hi;
1269 u32 tx_stat_gt2047_lo;
1270 u32 tx_stat_gt2047_hi;
1271 u32 tx_stat_gt4095_lo;
1272 u32 tx_stat_gt4095_hi;
1273 u32 tx_stat_gt9216_lo;
1274 u32 tx_stat_gt9216_hi;
1275 u32 tx_stat_gt16383_lo;
1276 u32 tx_stat_gt16383_hi;
1277 u32 tx_stat_gtmax_lo;
1278 u32 tx_stat_gtmax_hi;
1279 u32 tx_stat_gtufl_lo;
1280 u32 tx_stat_gtufl_hi;
1281 u32 tx_stat_gterr_lo;
1282 u32 tx_stat_gterr_hi;
1283 u32 tx_stat_gtbyt_lo;
1284 u32 tx_stat_gtbyt_hi;
1285
1286 u32 rx_stat_gr64_lo;
1287 u32 rx_stat_gr64_hi;
1288 u32 rx_stat_gr127_lo;
1289 u32 rx_stat_gr127_hi;
1290 u32 rx_stat_gr255_lo;
1291 u32 rx_stat_gr255_hi;
1292 u32 rx_stat_gr511_lo;
1293 u32 rx_stat_gr511_hi;
1294 u32 rx_stat_gr1023_lo;
1295 u32 rx_stat_gr1023_hi;
1296 u32 rx_stat_gr1518_lo;
1297 u32 rx_stat_gr1518_hi;
1298 u32 rx_stat_gr2047_lo;
1299 u32 rx_stat_gr2047_hi;
1300 u32 rx_stat_gr4095_lo;
1301 u32 rx_stat_gr4095_hi;
1302 u32 rx_stat_gr9216_lo;
1303 u32 rx_stat_gr9216_hi;
1304 u32 rx_stat_gr16383_lo;
1305 u32 rx_stat_gr16383_hi;
1306 u32 rx_stat_grmax_lo;
1307 u32 rx_stat_grmax_hi;
1308 u32 rx_stat_grpkt_lo;
1309 u32 rx_stat_grpkt_hi;
1310 u32 rx_stat_grfcs_lo;
1311 u32 rx_stat_grfcs_hi;
1312 u32 rx_stat_gruca_lo;
1313 u32 rx_stat_gruca_hi;
1314 u32 rx_stat_grmca_lo;
1315 u32 rx_stat_grmca_hi;
1316 u32 rx_stat_grbca_lo;
1317 u32 rx_stat_grbca_hi;
1318 u32 rx_stat_grxpf_lo; /* grpf */
1319 u32 rx_stat_grxpf_hi; /* grpf */
1320 u32 rx_stat_grpp_lo;
1321 u32 rx_stat_grpp_hi;
1322 u32 rx_stat_grxuo_lo; /* gruo */
1323 u32 rx_stat_grxuo_hi; /* gruo */
1324 u32 rx_stat_grjbr_lo;
1325 u32 rx_stat_grjbr_hi;
1326 u32 rx_stat_grovr_lo;
1327 u32 rx_stat_grovr_hi;
1328 u32 rx_stat_grxcf_lo; /* grcf */
1329 u32 rx_stat_grxcf_hi; /* grcf */
1330 u32 rx_stat_grflr_lo;
1331 u32 rx_stat_grflr_hi;
1332 u32 rx_stat_grpok_lo;
1333 u32 rx_stat_grpok_hi;
1334 u32 rx_stat_grmeg_lo;
1335 u32 rx_stat_grmeg_hi;
1336 u32 rx_stat_grmeb_lo;
1337 u32 rx_stat_grmeb_hi;
1338 u32 rx_stat_grbyt_lo;
1339 u32 rx_stat_grbyt_hi;
1340 u32 rx_stat_grund_lo;
1341 u32 rx_stat_grund_hi;
1342 u32 rx_stat_grfrg_lo;
1343 u32 rx_stat_grfrg_hi;
1344 u32 rx_stat_grerb_lo; /* grerrbyt */
1345 u32 rx_stat_grerb_hi; /* grerrbyt */
1346 u32 rx_stat_grfre_lo; /* grfrerr */
1347 u32 rx_stat_grfre_hi; /* grfrerr */
1348 u32 rx_stat_gripj_lo;
1349 u32 rx_stat_gripj_hi;
1350};
1209 1351
1210union mac_stats { 1352union mac_stats {
1211 struct emac_stats emac_stats; 1353 struct emac_stats emac_stats;
1212 struct bmac1_stats bmac1_stats; 1354 struct bmac1_stats bmac1_stats;
1355 struct bmac2_stats bmac2_stats;
1213}; 1356};
1214 1357
1215 1358
@@ -1594,6 +1737,24 @@ union igu_consprod_reg {
1594 1737
1595 1738
1596/* 1739/*
1740 * Control register for the IGU command register
1741 */
1742struct igu_ctrl_reg {
1743 u32 ctrl_data;
1744#define IGU_CTRL_REG_ADDRESS (0xFFF<<0)
1745#define IGU_CTRL_REG_ADDRESS_SHIFT 0
1746#define IGU_CTRL_REG_FID (0x7F<<12)
1747#define IGU_CTRL_REG_FID_SHIFT 12
1748#define IGU_CTRL_REG_RESERVED (0x1<<19)
1749#define IGU_CTRL_REG_RESERVED_SHIFT 19
1750#define IGU_CTRL_REG_TYPE (0x1<<20)
1751#define IGU_CTRL_REG_TYPE_SHIFT 20
1752#define IGU_CTRL_REG_UNUSED (0x7FF<<21)
1753#define IGU_CTRL_REG_UNUSED_SHIFT 21
1754};
1755
1756
1757/*
1597 * Parser parsing flags field 1758 * Parser parsing flags field
1598 */ 1759 */
1599struct parsing_flags { 1760struct parsing_flags {
@@ -1924,6 +2085,27 @@ struct eth_tx_parse_bd_e1x {
1924}; 2085};
1925 2086
1926/* 2087/*
2088 * Tx parsing BD structure for ETH E2
2089 */
2090struct eth_tx_parse_bd_e2 {
2091 __le16 dst_mac_addr_lo;
2092 __le16 dst_mac_addr_mid;
2093 __le16 dst_mac_addr_hi;
2094 __le16 src_mac_addr_lo;
2095 __le16 src_mac_addr_mid;
2096 __le16 src_mac_addr_hi;
2097 __le32 parsing_data;
2098#define ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W (0x1FFF<<0)
2099#define ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W_SHIFT 0
2100#define ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW (0xF<<13)
2101#define ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW_SHIFT 13
2102#define ETH_TX_PARSE_BD_E2_LSO_MSS (0x3FFF<<17)
2103#define ETH_TX_PARSE_BD_E2_LSO_MSS_SHIFT 17
2104#define ETH_TX_PARSE_BD_E2_IPV6_WITH_EXT_HDR (0x1<<31)
2105#define ETH_TX_PARSE_BD_E2_IPV6_WITH_EXT_HDR_SHIFT 31
2106};
2107
2108/*
1927 * The last BD in the BD memory will hold a pointer to the next BD memory 2109 * The last BD in the BD memory will hold a pointer to the next BD memory
1928 */ 2110 */
1929struct eth_tx_next_bd { 2111struct eth_tx_next_bd {
@@ -1939,6 +2121,7 @@ union eth_tx_bd_types {
1939 struct eth_tx_start_bd start_bd; 2121 struct eth_tx_start_bd start_bd;
1940 struct eth_tx_bd reg_bd; 2122 struct eth_tx_bd reg_bd;
1941 struct eth_tx_parse_bd_e1x parse_bd_e1x; 2123 struct eth_tx_parse_bd_e1x parse_bd_e1x;
2124 struct eth_tx_parse_bd_e2 parse_bd_e2;
1942 struct eth_tx_next_bd next_bd; 2125 struct eth_tx_next_bd next_bd;
1943}; 2126};
1944 2127