aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/gianfar.h
diff options
context:
space:
mode:
authorAndy Fleming <afleming@freescale.com>2008-12-16 18:29:15 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-16 18:29:15 -0500
commitb31a1d8b41513b96e9c7ec2f68c5734cef0b26a4 (patch)
treef8643c2fd1b137dd6c00bcd385ad36adfca4f540 /drivers/net/gianfar.h
parent257d938a0c17838c740eb68f0005b041444ac2c2 (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.h')
-rw-r--r--drivers/net/gianfar.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h
index f46e9b63af13..ca7f0a6a68c5 100644
--- a/drivers/net/gianfar.h
+++ b/drivers/net/gianfar.h
@@ -657,6 +657,19 @@ struct gfar {
657 657
658}; 658};
659 659
660/* Flags related to gianfar device features */
661#define FSL_GIANFAR_DEV_HAS_GIGABIT 0x00000001
662#define FSL_GIANFAR_DEV_HAS_COALESCE 0x00000002
663#define FSL_GIANFAR_DEV_HAS_RMON 0x00000004
664#define FSL_GIANFAR_DEV_HAS_MULTI_INTR 0x00000008
665#define FSL_GIANFAR_DEV_HAS_CSUM 0x00000010
666#define FSL_GIANFAR_DEV_HAS_VLAN 0x00000020
667#define FSL_GIANFAR_DEV_HAS_EXTENDED_HASH 0x00000040
668#define FSL_GIANFAR_DEV_HAS_PADDING 0x00000080
669#define FSL_GIANFAR_DEV_HAS_MAGIC_PACKET 0x00000100
670#define FSL_GIANFAR_DEV_HAS_BD_STASHING 0x00000200
671#define FSL_GIANFAR_DEV_HAS_BUF_STASHING 0x00000400
672
660/* Struct stolen almost completely (and shamelessly) from the FCC enet source 673/* Struct stolen almost completely (and shamelessly) from the FCC enet source
661 * (Ok, that's not so true anymore, but there is a family resemblence) 674 * (Ok, that's not so true anymore, but there is a family resemblence)
662 * The GFAR buffer descriptors track the ring buffers. The rx_bd_base 675 * The GFAR buffer descriptors track the ring buffers. The rx_bd_base
@@ -694,6 +707,7 @@ struct gfar_private {
694 /* RX Locked fields */ 707 /* RX Locked fields */
695 spinlock_t rxlock; 708 spinlock_t rxlock;
696 709
710 struct device_node *node;
697 struct net_device *dev; 711 struct net_device *dev;
698 struct napi_struct napi; 712 struct napi_struct napi;
699 713
@@ -733,6 +747,9 @@ struct gfar_private {
733 /* Bitfield update lock */ 747 /* Bitfield update lock */
734 spinlock_t bflock; 748 spinlock_t bflock;
735 749
750 phy_interface_t interface;
751 char phy_bus_id[BUS_ID_SIZE];
752 u32 device_flags;
736 unsigned char vlan_enable:1, 753 unsigned char vlan_enable:1,
737 rx_csum_enable:1, 754 rx_csum_enable:1,
738 extended_hash:1, 755 extended_hash:1,
@@ -744,11 +761,9 @@ struct gfar_private {
744 unsigned int interruptReceive; 761 unsigned int interruptReceive;
745 unsigned int interruptError; 762 unsigned int interruptError;
746 763
747 /* info structure initialized by platform code */
748 struct gianfar_platform_data *einfo;
749
750 /* PHY stuff */ 764 /* PHY stuff */
751 struct phy_device *phydev; 765 struct phy_device *phydev;
766 struct phy_device *tbiphy;
752 struct mii_bus *mii_bus; 767 struct mii_bus *mii_bus;
753 int oldspeed; 768 int oldspeed;
754 int oldduplex; 769 int oldduplex;