diff options
Diffstat (limited to 'drivers/net/ethernet/ti/cpsw.c')
-rw-r--r-- | drivers/net/ethernet/ti/cpsw.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index b4ca370a4e67..5c427cf1ef87 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c | |||
@@ -76,6 +76,8 @@ do { \ | |||
76 | #define CPSW_MINOR_VERSION(reg) (reg & 0xff) | 76 | #define CPSW_MINOR_VERSION(reg) (reg & 0xff) |
77 | #define CPSW_RTL_VERSION(reg) ((reg >> 11) & 0x1f) | 77 | #define CPSW_RTL_VERSION(reg) ((reg >> 11) & 0x1f) |
78 | 78 | ||
79 | #define CPSW_VERSION_1 0x19010a | ||
80 | #define CPSW_VERSION_2 0x19010c | ||
79 | #define CPDMA_RXTHRESH 0x0c0 | 81 | #define CPDMA_RXTHRESH 0x0c0 |
80 | #define CPDMA_RXFREE 0x0e0 | 82 | #define CPDMA_RXFREE 0x0e0 |
81 | #define CPDMA_TXHDP 0x00 | 83 | #define CPDMA_TXHDP 0x00 |
@@ -216,6 +218,7 @@ struct cpsw_priv { | |||
216 | struct cpsw_wr_regs __iomem *wr_regs; | 218 | struct cpsw_wr_regs __iomem *wr_regs; |
217 | struct cpsw_host_regs __iomem *host_port_regs; | 219 | struct cpsw_host_regs __iomem *host_port_regs; |
218 | u32 msg_enable; | 220 | u32 msg_enable; |
221 | u32 version; | ||
219 | struct net_device_stats stats; | 222 | struct net_device_stats stats; |
220 | int rx_packet_max; | 223 | int rx_packet_max; |
221 | int host_port; | 224 | int host_port; |
@@ -540,6 +543,7 @@ static int cpsw_ndo_open(struct net_device *ndev) | |||
540 | pm_runtime_get_sync(&priv->pdev->dev); | 543 | pm_runtime_get_sync(&priv->pdev->dev); |
541 | 544 | ||
542 | reg = __raw_readl(&priv->regs->id_ver); | 545 | reg = __raw_readl(&priv->regs->id_ver); |
546 | priv->version = reg; | ||
543 | 547 | ||
544 | dev_info(priv->dev, "initializing cpsw version %d.%d (%d)\n", | 548 | dev_info(priv->dev, "initializing cpsw version %d.%d (%d)\n", |
545 | CPSW_MAJOR_VERSION(reg), CPSW_MINOR_VERSION(reg), | 549 | CPSW_MAJOR_VERSION(reg), CPSW_MINOR_VERSION(reg), |