diff options
author | Andy Fleming <afleming@freescale.com> | 2008-12-16 18:29:15 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-16 18:29:15 -0500 |
commit | b31a1d8b41513b96e9c7ec2f68c5734cef0b26a4 (patch) | |
tree | f8643c2fd1b137dd6c00bcd385ad36adfca4f540 /drivers/net/gianfar_ethtool.c | |
parent | 257d938a0c17838c740eb68f0005b041444ac2c2 (diff) |
gianfar: Convert gianfar to an of_platform_driver
Does the same for the accompanying MDIO driver, and then modifies the TBI
configuration method. The old way used fields in einfo, which no longer
exists. The new way is to create an MDIO device-tree node for each instance
of gianfar, and create a tbi-handle property to associate ethernet controllers
with the TBI PHYs they are connected to.
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/gianfar_ethtool.c')
-rw-r--r-- | drivers/net/gianfar_ethtool.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/gianfar_ethtool.c b/drivers/net/gianfar_ethtool.c index fb7d3ccc0fdc..53944b120a3d 100644 --- a/drivers/net/gianfar_ethtool.c +++ b/drivers/net/gianfar_ethtool.c | |||
@@ -121,7 +121,7 @@ static void gfar_gstrings(struct net_device *dev, u32 stringset, u8 * buf) | |||
121 | { | 121 | { |
122 | struct gfar_private *priv = netdev_priv(dev); | 122 | struct gfar_private *priv = netdev_priv(dev); |
123 | 123 | ||
124 | if (priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_RMON) | 124 | if (priv->device_flags & FSL_GIANFAR_DEV_HAS_RMON) |
125 | memcpy(buf, stat_gstrings, GFAR_STATS_LEN * ETH_GSTRING_LEN); | 125 | memcpy(buf, stat_gstrings, GFAR_STATS_LEN * ETH_GSTRING_LEN); |
126 | else | 126 | else |
127 | memcpy(buf, stat_gstrings, | 127 | memcpy(buf, stat_gstrings, |
@@ -138,7 +138,7 @@ static void gfar_fill_stats(struct net_device *dev, struct ethtool_stats *dummy, | |||
138 | struct gfar_private *priv = netdev_priv(dev); | 138 | struct gfar_private *priv = netdev_priv(dev); |
139 | u64 *extra = (u64 *) & priv->extra_stats; | 139 | u64 *extra = (u64 *) & priv->extra_stats; |
140 | 140 | ||
141 | if (priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_RMON) { | 141 | if (priv->device_flags & FSL_GIANFAR_DEV_HAS_RMON) { |
142 | u32 __iomem *rmon = (u32 __iomem *) & priv->regs->rmon; | 142 | u32 __iomem *rmon = (u32 __iomem *) & priv->regs->rmon; |
143 | struct gfar_stats *stats = (struct gfar_stats *) buf; | 143 | struct gfar_stats *stats = (struct gfar_stats *) buf; |
144 | 144 | ||
@@ -158,7 +158,7 @@ static int gfar_sset_count(struct net_device *dev, int sset) | |||
158 | 158 | ||
159 | switch (sset) { | 159 | switch (sset) { |
160 | case ETH_SS_STATS: | 160 | case ETH_SS_STATS: |
161 | if (priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_RMON) | 161 | if (priv->device_flags & FSL_GIANFAR_DEV_HAS_RMON) |
162 | return GFAR_STATS_LEN; | 162 | return GFAR_STATS_LEN; |
163 | else | 163 | else |
164 | return GFAR_EXTRA_STATS_LEN; | 164 | return GFAR_EXTRA_STATS_LEN; |
@@ -280,7 +280,7 @@ static int gfar_gcoalesce(struct net_device *dev, struct ethtool_coalesce *cvals | |||
280 | { | 280 | { |
281 | struct gfar_private *priv = netdev_priv(dev); | 281 | struct gfar_private *priv = netdev_priv(dev); |
282 | 282 | ||
283 | if (!(priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_COALESCE)) | 283 | if (!(priv->device_flags & FSL_GIANFAR_DEV_HAS_COALESCE)) |
284 | return -EOPNOTSUPP; | 284 | return -EOPNOTSUPP; |
285 | 285 | ||
286 | if (NULL == priv->phydev) | 286 | if (NULL == priv->phydev) |
@@ -332,7 +332,7 @@ static int gfar_scoalesce(struct net_device *dev, struct ethtool_coalesce *cvals | |||
332 | { | 332 | { |
333 | struct gfar_private *priv = netdev_priv(dev); | 333 | struct gfar_private *priv = netdev_priv(dev); |
334 | 334 | ||
335 | if (!(priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_COALESCE)) | 335 | if (!(priv->device_flags & FSL_GIANFAR_DEV_HAS_COALESCE)) |
336 | return -EOPNOTSUPP; | 336 | return -EOPNOTSUPP; |
337 | 337 | ||
338 | /* Set up rx coalescing */ | 338 | /* Set up rx coalescing */ |
@@ -482,7 +482,7 @@ static int gfar_set_rx_csum(struct net_device *dev, uint32_t data) | |||
482 | unsigned long flags; | 482 | unsigned long flags; |
483 | int err = 0; | 483 | int err = 0; |
484 | 484 | ||
485 | if (!(priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_CSUM)) | 485 | if (!(priv->device_flags & FSL_GIANFAR_DEV_HAS_CSUM)) |
486 | return -EOPNOTSUPP; | 486 | return -EOPNOTSUPP; |
487 | 487 | ||
488 | if (dev->flags & IFF_UP) { | 488 | if (dev->flags & IFF_UP) { |
@@ -515,7 +515,7 @@ static uint32_t gfar_get_rx_csum(struct net_device *dev) | |||
515 | { | 515 | { |
516 | struct gfar_private *priv = netdev_priv(dev); | 516 | struct gfar_private *priv = netdev_priv(dev); |
517 | 517 | ||
518 | if (!(priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_CSUM)) | 518 | if (!(priv->device_flags & FSL_GIANFAR_DEV_HAS_CSUM)) |
519 | return 0; | 519 | return 0; |
520 | 520 | ||
521 | return priv->rx_csum_enable; | 521 | return priv->rx_csum_enable; |
@@ -526,7 +526,7 @@ static int gfar_set_tx_csum(struct net_device *dev, uint32_t data) | |||
526 | unsigned long flags; | 526 | unsigned long flags; |
527 | struct gfar_private *priv = netdev_priv(dev); | 527 | struct gfar_private *priv = netdev_priv(dev); |
528 | 528 | ||
529 | if (!(priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_CSUM)) | 529 | if (!(priv->device_flags & FSL_GIANFAR_DEV_HAS_CSUM)) |
530 | return -EOPNOTSUPP; | 530 | return -EOPNOTSUPP; |
531 | 531 | ||
532 | spin_lock_irqsave(&priv->txlock, flags); | 532 | spin_lock_irqsave(&priv->txlock, flags); |
@@ -547,7 +547,7 @@ static uint32_t gfar_get_tx_csum(struct net_device *dev) | |||
547 | { | 547 | { |
548 | struct gfar_private *priv = netdev_priv(dev); | 548 | struct gfar_private *priv = netdev_priv(dev); |
549 | 549 | ||
550 | if (!(priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_CSUM)) | 550 | if (!(priv->device_flags & FSL_GIANFAR_DEV_HAS_CSUM)) |
551 | return 0; | 551 | return 0; |
552 | 552 | ||
553 | return (dev->features & NETIF_F_IP_CSUM) != 0; | 553 | return (dev->features & NETIF_F_IP_CSUM) != 0; |
@@ -570,7 +570,7 @@ static void gfar_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) | |||
570 | { | 570 | { |
571 | struct gfar_private *priv = netdev_priv(dev); | 571 | struct gfar_private *priv = netdev_priv(dev); |
572 | 572 | ||
573 | if (priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_MAGIC_PACKET) { | 573 | if (priv->device_flags & FSL_GIANFAR_DEV_HAS_MAGIC_PACKET) { |
574 | wol->supported = WAKE_MAGIC; | 574 | wol->supported = WAKE_MAGIC; |
575 | wol->wolopts = priv->wol_en ? WAKE_MAGIC : 0; | 575 | wol->wolopts = priv->wol_en ? WAKE_MAGIC : 0; |
576 | } else { | 576 | } else { |
@@ -583,7 +583,7 @@ static int gfar_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) | |||
583 | struct gfar_private *priv = netdev_priv(dev); | 583 | struct gfar_private *priv = netdev_priv(dev); |
584 | unsigned long flags; | 584 | unsigned long flags; |
585 | 585 | ||
586 | if (!(priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_MAGIC_PACKET) && | 586 | if (!(priv->device_flags & FSL_GIANFAR_DEV_HAS_MAGIC_PACKET) && |
587 | wol->wolopts != 0) | 587 | wol->wolopts != 0) |
588 | return -EINVAL; | 588 | return -EINVAL; |
589 | 589 | ||