aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2010-03-29 03:36:18 -0400
committerDavid S. Miller <davem@davemloft.net>2010-03-30 22:43:47 -0400
commitc1cd0a859a01ed0591cb2d8931bdd283542c0252 (patch)
tree8b1e17da9cd427a9208c3a8d942c4089d5b1475c /drivers
parent9b27105b4a44c54bf91ecd7d0315034ae75684f7 (diff)
sky2: support Yukon EC_U rev B1 and later
Need to change logic to support later versions of Yukon 2 EC_U chip. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/sky2.c7
-rw-r--r--drivers/net/sky2.h12
2 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index d8ec4c11fd49..4b403bd7870d 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -877,6 +877,10 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port)
877 if (hw->dev[port]->mtu > ETH_DATA_LEN) 877 if (hw->dev[port]->mtu > ETH_DATA_LEN)
878 reg |= GM_SMOD_JUMBO_ENA; 878 reg |= GM_SMOD_JUMBO_ENA;
879 879
880 if (hw->chip_id == CHIP_ID_YUKON_EC_U &&
881 hw->chip_rev == CHIP_REV_YU_EC_U_B1)
882 reg |= GM_NEW_FLOW_CTRL;
883
880 gma_write16(hw, port, GM_SERIAL_MODE, reg); 884 gma_write16(hw, port, GM_SERIAL_MODE, reg);
881 885
882 /* virtual address for data */ 886 /* virtual address for data */
@@ -1413,8 +1417,7 @@ static void sky2_rx_start(struct sky2_port *sky2)
1413 /* These chips have no ram buffer? 1417 /* These chips have no ram buffer?
1414 * MAC Rx RAM Read is controlled by hardware */ 1418 * MAC Rx RAM Read is controlled by hardware */
1415 if (hw->chip_id == CHIP_ID_YUKON_EC_U && 1419 if (hw->chip_id == CHIP_ID_YUKON_EC_U &&
1416 (hw->chip_rev == CHIP_REV_YU_EC_U_A1 || 1420 hw->chip_rev > CHIP_REV_YU_EC_U_A0)
1417 hw->chip_rev == CHIP_REV_YU_EC_U_B0))
1418 sky2_write32(hw, Q_ADDR(rxq, Q_TEST), F_M_RX_RAM_DIS); 1421 sky2_write32(hw, Q_ADDR(rxq, Q_TEST), F_M_RX_RAM_DIS);
1419 1422
1420 sky2_prefetch_init(hw, rxq, sky2->rx_le_map, RX_LE_SIZE - 1); 1423 sky2_prefetch_init(hw, rxq, sky2->rx_le_map, RX_LE_SIZE - 1);
diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h
index a5e182dd9819..1c4d6a3d97cc 100644
--- a/drivers/net/sky2.h
+++ b/drivers/net/sky2.h
@@ -557,6 +557,7 @@ enum yukon_ec_u_rev {
557 CHIP_REV_YU_EC_U_A0 = 1, 557 CHIP_REV_YU_EC_U_A0 = 1,
558 CHIP_REV_YU_EC_U_A1 = 2, 558 CHIP_REV_YU_EC_U_A1 = 2,
559 CHIP_REV_YU_EC_U_B0 = 3, 559 CHIP_REV_YU_EC_U_B0 = 3,
560 CHIP_REV_YU_EC_U_B1 = 5,
560}; 561};
561enum yukon_fe_rev { 562enum yukon_fe_rev {
562 CHIP_REV_YU_FE_A1 = 1, 563 CHIP_REV_YU_FE_A1 = 1,
@@ -1775,10 +1776,13 @@ enum {
1775/* GM_SERIAL_MODE 16 bit r/w Serial Mode Register */ 1776/* GM_SERIAL_MODE 16 bit r/w Serial Mode Register */
1776enum { 1777enum {
1777 GM_SMOD_DATABL_MSK = 0x1f<<11, /* Bit 15..11: Data Blinder (r/o) */ 1778 GM_SMOD_DATABL_MSK = 0x1f<<11, /* Bit 15..11: Data Blinder (r/o) */
1778 GM_SMOD_LIMIT_4 = 1<<10, /* Bit 10: 4 consecutive Tx trials */ 1779 GM_SMOD_LIMIT_4 = 1<<10, /* 4 consecutive Tx trials */
1779 GM_SMOD_VLAN_ENA = 1<<9, /* Bit 9: Enable VLAN (Max. Frame Len) */ 1780 GM_SMOD_VLAN_ENA = 1<<9, /* Enable VLAN (Max. Frame Len) */
1780 GM_SMOD_JUMBO_ENA = 1<<8, /* Bit 8: Enable Jumbo (Max. Frame Len) */ 1781 GM_SMOD_JUMBO_ENA = 1<<8, /* Enable Jumbo (Max. Frame Len) */
1781 GM_SMOD_IPG_MSK = 0x1f /* Bit 4..0: Inter-Packet Gap (IPG) */ 1782
1783 GM_NEW_FLOW_CTRL = 1<<6, /* Enable New Flow-Control */
1784
1785 GM_SMOD_IPG_MSK = 0x1f /* Bit 4..0: Inter-Packet Gap (IPG) */
1782}; 1786};
1783 1787
1784#define DATA_BLIND_VAL(x) (((x)<<11) & GM_SMOD_DATABL_MSK) 1788#define DATA_BLIND_VAL(x) (((x)<<11) & GM_SMOD_DATABL_MSK)