diff options
author | Yaniv Rosner <yanivr@broadcom.com> | 2011-01-30 23:22:53 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-31 16:22:44 -0500 |
commit | 02a23165f807901818c33acd0facc4ab8f3ebdf7 (patch) | |
tree | c5d270e02bd08b94ee93cd1796676114533bfc7e /drivers/net/bnx2x | |
parent | 1bef68e3f5d25e17adc5232dc0ad7c0ea0188374 (diff) |
bnx2x: Remove support for emulation/FPGA
Remove unneeded support for emulation/FPGA from the code
Signed-off-by: Yaniv Rosner <yanivr@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')
-rw-r--r-- | drivers/net/bnx2x/bnx2x_link.c | 88 |
1 files changed, 1 insertions, 87 deletions
diff --git a/drivers/net/bnx2x/bnx2x_link.c b/drivers/net/bnx2x/bnx2x_link.c index 4a1b5ee976b3..f2f367d4e74d 100644 --- a/drivers/net/bnx2x/bnx2x_link.c +++ b/drivers/net/bnx2x/bnx2x_link.c | |||
@@ -521,22 +521,6 @@ static u8 bnx2x_emac_enable(struct link_params *params, | |||
521 | /* enable emac and not bmac */ | 521 | /* enable emac and not bmac */ |
522 | REG_WR(bp, NIG_REG_EGRESS_EMAC0_PORT + port*4, 1); | 522 | REG_WR(bp, NIG_REG_EGRESS_EMAC0_PORT + port*4, 1); |
523 | 523 | ||
524 | /* for paladium */ | ||
525 | if (CHIP_REV_IS_EMUL(bp)) { | ||
526 | /* Use lane 1 (of lanes 0-3) */ | ||
527 | REG_WR(bp, NIG_REG_XGXS_LANE_SEL_P0 + port*4, 1); | ||
528 | REG_WR(bp, NIG_REG_XGXS_SERDES0_MODE_SEL + port*4, 1); | ||
529 | } | ||
530 | /* for fpga */ | ||
531 | else | ||
532 | |||
533 | if (CHIP_REV_IS_FPGA(bp)) { | ||
534 | /* Use lane 1 (of lanes 0-3) */ | ||
535 | DP(NETIF_MSG_LINK, "bnx2x_emac_enable: Setting FPGA\n"); | ||
536 | |||
537 | REG_WR(bp, NIG_REG_XGXS_LANE_SEL_P0 + port*4, 1); | ||
538 | REG_WR(bp, NIG_REG_XGXS_SERDES0_MODE_SEL + port*4, 0); | ||
539 | } else | ||
540 | /* ASIC */ | 524 | /* ASIC */ |
541 | if (vars->phy_flags & PHY_XGXS_FLAG) { | 525 | if (vars->phy_flags & PHY_XGXS_FLAG) { |
542 | u32 ser_lane = ((params->lane_config & | 526 | u32 ser_lane = ((params->lane_config & |
@@ -654,15 +638,7 @@ static u8 bnx2x_emac_enable(struct link_params *params, | |||
654 | REG_WR(bp, NIG_REG_EMAC0_PAUSE_OUT_EN + port*4, val); | 638 | REG_WR(bp, NIG_REG_EMAC0_PAUSE_OUT_EN + port*4, val); |
655 | REG_WR(bp, NIG_REG_EGRESS_EMAC0_OUT_EN + port*4, 0x1); | 639 | REG_WR(bp, NIG_REG_EGRESS_EMAC0_OUT_EN + port*4, 0x1); |
656 | 640 | ||
657 | if (CHIP_REV_IS_EMUL(bp)) { | 641 | REG_WR(bp, NIG_REG_BMAC0_REGS_OUT_EN + port*4, 0x0); |
658 | /* take the BigMac out of reset */ | ||
659 | REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET, | ||
660 | (MISC_REGISTERS_RESET_REG_2_RST_BMAC0 << port)); | ||
661 | |||
662 | /* enable access for bmac registers */ | ||
663 | REG_WR(bp, NIG_REG_BMAC0_REGS_OUT_EN + port*4, 0x1); | ||
664 | } else | ||
665 | REG_WR(bp, NIG_REG_BMAC0_REGS_OUT_EN + port*4, 0x0); | ||
666 | 642 | ||
667 | vars->mac_type = MAC_TYPE_EMAC; | 643 | vars->mac_type = MAC_TYPE_EMAC; |
668 | return 0; | 644 | return 0; |
@@ -1086,14 +1062,6 @@ static u8 bnx2x_bmac1_enable(struct link_params *params, | |||
1086 | wb_data[1] = 0; | 1062 | wb_data[1] = 0; |
1087 | REG_WR_DMAE(bp, bmac_addr + BIGMAC_REGISTER_RX_LLFC_MSG_FLDS, | 1063 | REG_WR_DMAE(bp, bmac_addr + BIGMAC_REGISTER_RX_LLFC_MSG_FLDS, |
1088 | wb_data, 2); | 1064 | wb_data, 2); |
1089 | /* fix for emulation */ | ||
1090 | if (CHIP_REV_IS_EMUL(bp)) { | ||
1091 | wb_data[0] = 0xf000; | ||
1092 | wb_data[1] = 0; | ||
1093 | REG_WR_DMAE(bp, bmac_addr + BIGMAC_REGISTER_TX_PAUSE_THRESHOLD, | ||
1094 | wb_data, 2); | ||
1095 | } | ||
1096 | |||
1097 | 1065 | ||
1098 | return 0; | 1066 | return 0; |
1099 | } | 1067 | } |
@@ -7678,57 +7646,6 @@ u8 bnx2x_phy_init(struct link_params *params, struct link_vars *vars) | |||
7678 | set_phy_vars(params); | 7646 | set_phy_vars(params); |
7679 | 7647 | ||
7680 | DP(NETIF_MSG_LINK, "Num of phys on board: %d\n", params->num_phys); | 7648 | DP(NETIF_MSG_LINK, "Num of phys on board: %d\n", params->num_phys); |
7681 | if (CHIP_REV_IS_FPGA(bp)) { | ||
7682 | |||
7683 | vars->link_up = 1; | ||
7684 | vars->line_speed = SPEED_10000; | ||
7685 | vars->duplex = DUPLEX_FULL; | ||
7686 | vars->flow_ctrl = BNX2X_FLOW_CTRL_NONE; | ||
7687 | vars->link_status = (LINK_STATUS_LINK_UP | LINK_10GTFD); | ||
7688 | /* enable on E1.5 FPGA */ | ||
7689 | if (CHIP_IS_E1H(bp)) { | ||
7690 | vars->flow_ctrl |= | ||
7691 | (BNX2X_FLOW_CTRL_TX | | ||
7692 | BNX2X_FLOW_CTRL_RX); | ||
7693 | vars->link_status |= | ||
7694 | (LINK_STATUS_TX_FLOW_CONTROL_ENABLED | | ||
7695 | LINK_STATUS_RX_FLOW_CONTROL_ENABLED); | ||
7696 | } | ||
7697 | |||
7698 | bnx2x_emac_enable(params, vars, 0); | ||
7699 | if (!(CHIP_IS_E2(bp))) | ||
7700 | bnx2x_pbf_update(params, vars->flow_ctrl, | ||
7701 | vars->line_speed); | ||
7702 | /* disable drain */ | ||
7703 | REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0); | ||
7704 | |||
7705 | /* update shared memory */ | ||
7706 | bnx2x_update_mng(params, vars->link_status); | ||
7707 | |||
7708 | return 0; | ||
7709 | |||
7710 | } else | ||
7711 | if (CHIP_REV_IS_EMUL(bp)) { | ||
7712 | |||
7713 | vars->link_up = 1; | ||
7714 | vars->line_speed = SPEED_10000; | ||
7715 | vars->duplex = DUPLEX_FULL; | ||
7716 | vars->flow_ctrl = BNX2X_FLOW_CTRL_NONE; | ||
7717 | vars->link_status = (LINK_STATUS_LINK_UP | LINK_10GTFD); | ||
7718 | |||
7719 | bnx2x_bmac_enable(params, vars, 0); | ||
7720 | |||
7721 | bnx2x_pbf_update(params, vars->flow_ctrl, vars->line_speed); | ||
7722 | /* Disable drain */ | ||
7723 | REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE | ||
7724 | + params->port*4, 0); | ||
7725 | |||
7726 | /* update shared memory */ | ||
7727 | bnx2x_update_mng(params, vars->link_status); | ||
7728 | |||
7729 | return 0; | ||
7730 | |||
7731 | } else | ||
7732 | if (params->loopback_mode == LOOPBACK_BMAC) { | 7649 | if (params->loopback_mode == LOOPBACK_BMAC) { |
7733 | 7650 | ||
7734 | vars->link_up = 1; | 7651 | vars->link_up = 1; |
@@ -8263,9 +8180,6 @@ u8 bnx2x_common_init_phy(struct bnx2x *bp, u32 shmem_base_path[], | |||
8263 | u32 ext_phy_type, ext_phy_config; | 8180 | u32 ext_phy_type, ext_phy_config; |
8264 | DP(NETIF_MSG_LINK, "Begin common phy init\n"); | 8181 | DP(NETIF_MSG_LINK, "Begin common phy init\n"); |
8265 | 8182 | ||
8266 | if (CHIP_REV_IS_EMUL(bp)) | ||
8267 | return 0; | ||
8268 | |||
8269 | /* Check if common init was already done */ | 8183 | /* Check if common init was already done */ |
8270 | phy_ver = REG_RD(bp, shmem_base_path[0] + | 8184 | phy_ver = REG_RD(bp, shmem_base_path[0] + |
8271 | offsetof(struct shmem_region, | 8185 | offsetof(struct shmem_region, |