diff options
author | Fugang Duan <B38611@freescale.com> | 2013-08-14 06:06:52 -0400 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 09:01:14 -0400 |
commit | 576ff7a6d2e03f1599133211a69146a60ba06d1b (patch) | |
tree | 5424e71d402f17843d3bc0a653c97041873ca701 /drivers/net/ethernet/freescale/fec_main.c | |
parent | ab78c303f2f772c6ed2e1b133c43dc802be7dcef (diff) |
ENGR00275246-05: net: fec: add mac address init for imx25/imx53 fec
Add mac address init for imx25/imx53 fec in restart function.
Signed-off-by: Fugang Duan <B38611@freescale.com>
Diffstat (limited to 'drivers/net/ethernet/freescale/fec_main.c')
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index aef3b315a3de..86c35a8817cf 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c | |||
@@ -95,6 +95,8 @@ static void fec_free_reset_gpio(struct platform_device *pdev); | |||
95 | #define FEC_QUIRK_HAS_CSUM (1 << 5) | 95 | #define FEC_QUIRK_HAS_CSUM (1 << 5) |
96 | /* Controller has hardware vlan support */ | 96 | /* Controller has hardware vlan support */ |
97 | #define FEC_QUIRK_HAS_VLAN (1 << 6) | 97 | #define FEC_QUIRK_HAS_VLAN (1 << 6) |
98 | /* Controller is FEC-MAC */ | ||
99 | #define FEC_QUIRK_FEC_MAC (1 << 7) | ||
98 | /* ENET IP errata ERR006358 | 100 | /* ENET IP errata ERR006358 |
99 | * | 101 | * |
100 | * If the ready bit in the transmit buffer descriptor (TxBD[R]) is previously | 102 | * If the ready bit in the transmit buffer descriptor (TxBD[R]) is previously |
@@ -117,7 +119,7 @@ static struct platform_device_id fec_devtype[] = { | |||
117 | .driver_data = 0, | 119 | .driver_data = 0, |
118 | }, { | 120 | }, { |
119 | .name = "imx25-fec", | 121 | .name = "imx25-fec", |
120 | .driver_data = FEC_QUIRK_USE_GASKET, | 122 | .driver_data = FEC_QUIRK_USE_GASKET | FEC_QUIRK_FEC_MAC, |
121 | }, { | 123 | }, { |
122 | .name = "imx27-fec", | 124 | .name = "imx27-fec", |
123 | .driver_data = 0, | 125 | .driver_data = 0, |
@@ -487,7 +489,8 @@ fec_restart(struct net_device *ndev, int duplex) | |||
487 | * enet-mac reset will reset mac address registers too, | 489 | * enet-mac reset will reset mac address registers too, |
488 | * so need to reconfigure it. | 490 | * so need to reconfigure it. |
489 | */ | 491 | */ |
490 | if (id_entry->driver_data & FEC_QUIRK_ENET_MAC) { | 492 | if (id_entry->driver_data & FEC_QUIRK_ENET_MAC || |
493 | id_entry->driver_data & FEC_QUIRK_FEC_MAC) { | ||
491 | memcpy(&temp_mac, ndev->dev_addr, ETH_ALEN); | 494 | memcpy(&temp_mac, ndev->dev_addr, ETH_ALEN); |
492 | writel(cpu_to_be32(temp_mac[0]), fep->hwp + FEC_ADDR_LOW); | 495 | writel(cpu_to_be32(temp_mac[0]), fep->hwp + FEC_ADDR_LOW); |
493 | writel(cpu_to_be32(temp_mac[1]), fep->hwp + FEC_ADDR_HIGH); | 496 | writel(cpu_to_be32(temp_mac[1]), fep->hwp + FEC_ADDR_HIGH); |