aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/skge.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/skge.h')
-rw-r--r--drivers/net/skge.h41
1 files changed, 15 insertions, 26 deletions
diff --git a/drivers/net/skge.h b/drivers/net/skge.h
index fced3d2bc072..b432f1bb8168 100644
--- a/drivers/net/skge.h
+++ b/drivers/net/skge.h
@@ -1449,10 +1449,12 @@ enum {
1449 PHY_M_IS_DTE_CHANGE = 1<<2, /* DTE Power Det. Status Changed */ 1449 PHY_M_IS_DTE_CHANGE = 1<<2, /* DTE Power Det. Status Changed */
1450 PHY_M_IS_POL_CHANGE = 1<<1, /* Polarity Changed */ 1450 PHY_M_IS_POL_CHANGE = 1<<1, /* Polarity Changed */
1451 PHY_M_IS_JABBER = 1<<0, /* Jabber */ 1451 PHY_M_IS_JABBER = 1<<0, /* Jabber */
1452};
1453 1452
1454#define PHY_M_DEF_MSK ( PHY_M_IS_AN_ERROR | PHY_M_IS_LSP_CHANGE | \ 1453 PHY_M_IS_DEF_MSK = PHY_M_IS_AN_ERROR | PHY_M_IS_LSP_CHANGE |
1455 PHY_M_IS_LST_CHANGE | PHY_M_IS_FIFO_ERROR) 1454 PHY_M_IS_LST_CHANGE | PHY_M_IS_FIFO_ERROR,
1455
1456 PHY_M_IS_AN_MSK = PHY_M_IS_AN_ERROR | PHY_M_IS_AN_COMPL,
1457};
1456 1458
1457/***** PHY_MARV_EXT_CTRL 16 bit r/w Ext. PHY Specific Ctrl *****/ 1459/***** PHY_MARV_EXT_CTRL 16 bit r/w Ext. PHY Specific Ctrl *****/
1458enum { 1460enum {
@@ -1509,7 +1511,7 @@ enum {
1509 PHY_M_LEDC_TX_C_MSB = 1<<0, /* Tx Control (MSB, 88E1111 only) */ 1511 PHY_M_LEDC_TX_C_MSB = 1<<0, /* Tx Control (MSB, 88E1111 only) */
1510}; 1512};
1511 1513
1512#define PHY_M_LED_PULS_DUR(x) ( ((x)<<12) & PHY_M_LEDC_PULS_MSK) 1514#define PHY_M_LED_PULS_DUR(x) (((x)<<12) & PHY_M_LEDC_PULS_MSK)
1513 1515
1514enum { 1516enum {
1515 PULS_NO_STR = 0,/* no pulse stretching */ 1517 PULS_NO_STR = 0,/* no pulse stretching */
@@ -1522,7 +1524,7 @@ enum {
1522 PULS_1300MS = 7,/* 1.3 s to 2.7 s */ 1524 PULS_1300MS = 7,/* 1.3 s to 2.7 s */
1523}; 1525};
1524 1526
1525#define PHY_M_LED_BLINK_RT(x) ( ((x)<<8) & PHY_M_LEDC_BL_R_MSK) 1527#define PHY_M_LED_BLINK_RT(x) (((x)<<8) & PHY_M_LEDC_BL_R_MSK)
1526 1528
1527enum { 1529enum {
1528 BLINK_42MS = 0,/* 42 ms */ 1530 BLINK_42MS = 0,/* 42 ms */
@@ -1602,9 +1604,9 @@ enum {
1602 PHY_M_FELP_LED0_MSK = 0xf, /* Bit 3.. 0: LED0 Mask (SPEED) */ 1604 PHY_M_FELP_LED0_MSK = 0xf, /* Bit 3.. 0: LED0 Mask (SPEED) */
1603}; 1605};
1604 1606
1605#define PHY_M_FELP_LED2_CTRL(x) ( ((x)<<8) & PHY_M_FELP_LED2_MSK) 1607#define PHY_M_FELP_LED2_CTRL(x) (((x)<<8) & PHY_M_FELP_LED2_MSK)
1606#define PHY_M_FELP_LED1_CTRL(x) ( ((x)<<4) & PHY_M_FELP_LED1_MSK) 1608#define PHY_M_FELP_LED1_CTRL(x) (((x)<<4) & PHY_M_FELP_LED1_MSK)
1607#define PHY_M_FELP_LED0_CTRL(x) ( ((x)<<0) & PHY_M_FELP_LED0_MSK) 1609#define PHY_M_FELP_LED0_CTRL(x) (((x)<<0) & PHY_M_FELP_LED0_MSK)
1608 1610
1609enum { 1611enum {
1610 LED_PAR_CTRL_COLX = 0x00, 1612 LED_PAR_CTRL_COLX = 0x00,
@@ -1640,7 +1642,7 @@ enum {
1640 PHY_M_MAC_MD_COPPER = 5,/* Copper only */ 1642 PHY_M_MAC_MD_COPPER = 5,/* Copper only */
1641 PHY_M_MAC_MD_1000BX = 7,/* 1000Base-X only */ 1643 PHY_M_MAC_MD_1000BX = 7,/* 1000Base-X only */
1642}; 1644};
1643#define PHY_M_MAC_MODE_SEL(x) ( ((x)<<7) & PHY_M_MAC_MD_MSK) 1645#define PHY_M_MAC_MODE_SEL(x) (((x)<<7) & PHY_M_MAC_MD_MSK)
1644 1646
1645/***** PHY_MARV_PHY_CTRL (page 3) 16 bit r/w LED Control Reg. *****/ 1647/***** PHY_MARV_PHY_CTRL (page 3) 16 bit r/w LED Control Reg. *****/
1646enum { 1648enum {
@@ -1650,10 +1652,10 @@ enum {
1650 PHY_M_LEDC_STA0_MSK = 0xf, /* Bit 3.. 0: STAT0 LED Ctrl. Mask */ 1652 PHY_M_LEDC_STA0_MSK = 0xf, /* Bit 3.. 0: STAT0 LED Ctrl. Mask */
1651}; 1653};
1652 1654
1653#define PHY_M_LEDC_LOS_CTRL(x) ( ((x)<<12) & PHY_M_LEDC_LOS_MSK) 1655#define PHY_M_LEDC_LOS_CTRL(x) (((x)<<12) & PHY_M_LEDC_LOS_MSK)
1654#define PHY_M_LEDC_INIT_CTRL(x) ( ((x)<<8) & PHY_M_LEDC_INIT_MSK) 1656#define PHY_M_LEDC_INIT_CTRL(x) (((x)<<8) & PHY_M_LEDC_INIT_MSK)
1655#define PHY_M_LEDC_STA1_CTRL(x) ( ((x)<<4) & PHY_M_LEDC_STA1_MSK) 1657#define PHY_M_LEDC_STA1_CTRL(x) (((x)<<4) & PHY_M_LEDC_STA1_MSK)
1656#define PHY_M_LEDC_STA0_CTRL(x) ( ((x)<<0) & PHY_M_LEDC_STA0_MSK) 1658#define PHY_M_LEDC_STA0_CTRL(x) (((x)<<0) & PHY_M_LEDC_STA0_MSK)
1657 1659
1658/* GMAC registers */ 1660/* GMAC registers */
1659/* Port Registers */ 1661/* Port Registers */
@@ -2505,8 +2507,6 @@ struct skge_port {
2505 dma_addr_t dma; 2507 dma_addr_t dma;
2506 unsigned long mem_size; 2508 unsigned long mem_size;
2507 unsigned int rx_buf_size; 2509 unsigned int rx_buf_size;
2508
2509 struct timer_list led_blink;
2510}; 2510};
2511 2511
2512 2512
@@ -2606,17 +2606,6 @@ static inline void gma_write16(const struct skge_hw *hw, int port, int r, u16 v)
2606 skge_write16(hw, SK_GMAC_REG(port,r), v); 2606 skge_write16(hw, SK_GMAC_REG(port,r), v);
2607} 2607}
2608 2608
2609static inline void gma_write32(const struct skge_hw *hw, int port, int r, u32 v)
2610{
2611 skge_write16(hw, SK_GMAC_REG(port, r), (u16) v);
2612 skge_write32(hw, SK_GMAC_REG(port, r+4), (u16)(v >> 16));
2613}
2614
2615static inline void gma_write8(const struct skge_hw *hw, int port, int r, u8 v)
2616{
2617 skge_write8(hw, SK_GMAC_REG(port,r), v);
2618}
2619
2620static inline void gma_set_addr(struct skge_hw *hw, int port, int reg, 2609static inline void gma_set_addr(struct skge_hw *hw, int port, int reg,
2621 const u8 *addr) 2610 const u8 *addr)
2622{ 2611{