diff options
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_main.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index caaad7b14621..eb210ca2497b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |||
@@ -763,6 +763,23 @@ static void stmmac_mmc_setup(struct stmmac_priv *priv) | |||
763 | memset(&priv->mmc, 0, sizeof(struct stmmac_counters)); | 763 | memset(&priv->mmc, 0, sizeof(struct stmmac_counters)); |
764 | } | 764 | } |
765 | 765 | ||
766 | static u32 stmmac_get_synopsys_id(struct stmmac_priv *priv) | ||
767 | { | ||
768 | u32 hwid = priv->hw->synopsys_uid; | ||
769 | |||
770 | /* Only check valid Synopsys Id because old MAC chips | ||
771 | * have no HW registers where get the ID */ | ||
772 | if (likely(hwid)) { | ||
773 | u32 uid = ((hwid & 0x0000ff00) >> 8); | ||
774 | u32 synid = (hwid & 0x000000ff); | ||
775 | |||
776 | pr_info("STMMAC - user ID: 0x%x, Synopsys ID: 0x%x\n", | ||
777 | uid, synid); | ||
778 | |||
779 | return synid; | ||
780 | } | ||
781 | return 0; | ||
782 | } | ||
766 | /** | 783 | /** |
767 | * stmmac_open - open entry point of the driver | 784 | * stmmac_open - open entry point of the driver |
768 | * @dev : pointer to the device structure. | 785 | * @dev : pointer to the device structure. |
@@ -835,7 +852,8 @@ static int stmmac_open(struct net_device *dev) | |||
835 | /* Initialize the MAC Core */ | 852 | /* Initialize the MAC Core */ |
836 | priv->hw->mac->core_init(priv->ioaddr); | 853 | priv->hw->mac->core_init(priv->ioaddr); |
837 | 854 | ||
838 | priv->rx_coe = priv->hw->mac->rx_coe(priv->ioaddr); | 855 | stmmac_get_synopsys_id(priv); |
856 | |||
839 | if (priv->rx_coe) | 857 | if (priv->rx_coe) |
840 | pr_info("stmmac: Rx Checksum Offload Engine supported\n"); | 858 | pr_info("stmmac: Rx Checksum Offload Engine supported\n"); |
841 | if (priv->plat->tx_coe) | 859 | if (priv->plat->tx_coe) |