diff options
author | Andy Fleming <afleming@freescale.com> | 2005-09-23 22:54:21 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-23 22:54:21 -0400 |
commit | bb40dcbb0fcebe1df08ba261483fcc38b307d063 (patch) | |
tree | aefeb8db397de215cf1ff1c5ff7a581cee2b2b4b /drivers/net/gianfar.h | |
parent | acc4b985a6f8f22a0e826692894a4af234764001 (diff) |
[netdrvr gianfar] use new phy layer
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/gianfar.h')
-rw-r--r-- | drivers/net/gianfar.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h index 28af087d9fbb..c77ca6c0d04a 100644 --- a/drivers/net/gianfar.h +++ b/drivers/net/gianfar.h | |||
@@ -17,7 +17,6 @@ | |||
17 | * | 17 | * |
18 | * Still left to do: | 18 | * Still left to do: |
19 | * -Add support for module parameters | 19 | * -Add support for module parameters |
20 | * -Add support for ethtool -s | ||
21 | * -Add patch for ethtool phys id | 20 | * -Add patch for ethtool phys id |
22 | */ | 21 | */ |
23 | #ifndef __GIANFAR_H | 22 | #ifndef __GIANFAR_H |
@@ -37,7 +36,8 @@ | |||
37 | #include <linux/skbuff.h> | 36 | #include <linux/skbuff.h> |
38 | #include <linux/spinlock.h> | 37 | #include <linux/spinlock.h> |
39 | #include <linux/mm.h> | 38 | #include <linux/mm.h> |
40 | #include <linux/fsl_devices.h> | 39 | #include <linux/mii.h> |
40 | #include <linux/phy.h> | ||
41 | 41 | ||
42 | #include <asm/io.h> | 42 | #include <asm/io.h> |
43 | #include <asm/irq.h> | 43 | #include <asm/irq.h> |
@@ -48,7 +48,8 @@ | |||
48 | #include <linux/workqueue.h> | 48 | #include <linux/workqueue.h> |
49 | #include <linux/ethtool.h> | 49 | #include <linux/ethtool.h> |
50 | #include <linux/netdevice.h> | 50 | #include <linux/netdevice.h> |
51 | #include "gianfar_phy.h" | 51 | #include <linux/fsl_devices.h> |
52 | #include "gianfar_mii.h" | ||
52 | 53 | ||
53 | /* The maximum number of packets to be handled in one call of gfar_poll */ | 54 | /* The maximum number of packets to be handled in one call of gfar_poll */ |
54 | #define GFAR_DEV_WEIGHT 64 | 55 | #define GFAR_DEV_WEIGHT 64 |
@@ -73,7 +74,7 @@ | |||
73 | #define PHY_INIT_TIMEOUT 100000 | 74 | #define PHY_INIT_TIMEOUT 100000 |
74 | #define GFAR_PHY_CHANGE_TIME 2 | 75 | #define GFAR_PHY_CHANGE_TIME 2 |
75 | 76 | ||
76 | #define DEVICE_NAME "%s: Gianfar Ethernet Controller Version 1.1, " | 77 | #define DEVICE_NAME "%s: Gianfar Ethernet Controller Version 1.2, " |
77 | #define DRV_NAME "gfar-enet" | 78 | #define DRV_NAME "gfar-enet" |
78 | extern const char gfar_driver_name[]; | 79 | extern const char gfar_driver_name[]; |
79 | extern const char gfar_driver_version[]; | 80 | extern const char gfar_driver_version[]; |
@@ -578,12 +579,7 @@ struct gfar { | |||
578 | u32 hafdup; /* 0x.50c - Half Duplex Register */ | 579 | u32 hafdup; /* 0x.50c - Half Duplex Register */ |
579 | u32 maxfrm; /* 0x.510 - Maximum Frame Length Register */ | 580 | u32 maxfrm; /* 0x.510 - Maximum Frame Length Register */ |
580 | u8 res18[12]; | 581 | u8 res18[12]; |
581 | u32 miimcfg; /* 0x.520 - MII Management Configuration Register */ | 582 | u8 gfar_mii_regs[24]; /* See gianfar_phy.h */ |
582 | u32 miimcom; /* 0x.524 - MII Management Command Register */ | ||
583 | u32 miimadd; /* 0x.528 - MII Management Address Register */ | ||
584 | u32 miimcon; /* 0x.52c - MII Management Control Register */ | ||
585 | u32 miimstat; /* 0x.530 - MII Management Status Register */ | ||
586 | u32 miimind; /* 0x.534 - MII Management Indicator Register */ | ||
587 | u8 res19[4]; | 583 | u8 res19[4]; |
588 | u32 ifstat; /* 0x.53c - Interface Status Register */ | 584 | u32 ifstat; /* 0x.53c - Interface Status Register */ |
589 | u32 macstnaddr1; /* 0x.540 - Station Address Part 1 Register */ | 585 | u32 macstnaddr1; /* 0x.540 - Station Address Part 1 Register */ |
@@ -688,9 +684,6 @@ struct gfar_private { | |||
688 | struct gfar *regs; /* Pointer to the GFAR memory mapped Registers */ | 684 | struct gfar *regs; /* Pointer to the GFAR memory mapped Registers */ |
689 | u32 *hash_regs[16]; | 685 | u32 *hash_regs[16]; |
690 | int hash_width; | 686 | int hash_width; |
691 | struct gfar *phyregs; | ||
692 | struct work_struct tq; | ||
693 | struct timer_list phy_info_timer; | ||
694 | struct net_device_stats stats; /* linux network statistics */ | 687 | struct net_device_stats stats; /* linux network statistics */ |
695 | struct gfar_extra_stats extra_stats; | 688 | struct gfar_extra_stats extra_stats; |
696 | spinlock_t lock; | 689 | spinlock_t lock; |
@@ -710,7 +703,8 @@ struct gfar_private { | |||
710 | unsigned int interruptError; | 703 | unsigned int interruptError; |
711 | struct gianfar_platform_data *einfo; | 704 | struct gianfar_platform_data *einfo; |
712 | 705 | ||
713 | struct gfar_mii_info *mii_info; | 706 | struct phy_device *phydev; |
707 | struct mii_bus *mii_bus; | ||
714 | int oldspeed; | 708 | int oldspeed; |
715 | int oldduplex; | 709 | int oldduplex; |
716 | int oldlink; | 710 | int oldlink; |
@@ -732,4 +726,12 @@ extern inline void gfar_write(volatile unsigned *addr, u32 val) | |||
732 | 726 | ||
733 | extern struct ethtool_ops *gfar_op_array[]; | 727 | extern struct ethtool_ops *gfar_op_array[]; |
734 | 728 | ||
729 | extern irqreturn_t gfar_receive(int irq, void *dev_id, struct pt_regs *regs); | ||
730 | extern int startup_gfar(struct net_device *dev); | ||
731 | extern void stop_gfar(struct net_device *dev); | ||
732 | extern void gfar_halt(struct net_device *dev); | ||
733 | extern void gfar_phy_test(struct mii_bus *bus, struct phy_device *phydev, | ||
734 | int enable, u32 regnum, u32 read); | ||
735 | void gfar_setup_stashing(struct net_device *dev); | ||
736 | |||
735 | #endif /* __GIANFAR_H */ | 737 | #endif /* __GIANFAR_H */ |