diff options
Diffstat (limited to 'drivers/net/fs_enet/fs_enet.h')
-rw-r--r-- | drivers/net/fs_enet/fs_enet.h | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/drivers/net/fs_enet/fs_enet.h b/drivers/net/fs_enet/fs_enet.h index e7ec96c964a..92590d8fc24 100644 --- a/drivers/net/fs_enet/fs_enet.h +++ b/drivers/net/fs_enet/fs_enet.h | |||
@@ -5,19 +5,37 @@ | |||
5 | #include <linux/netdevice.h> | 5 | #include <linux/netdevice.h> |
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | #include <linux/list.h> | 7 | #include <linux/list.h> |
8 | #include <linux/phy.h> | ||
9 | #include <linux/dma-mapping.h> | ||
8 | 10 | ||
9 | #include <linux/fs_enet_pd.h> | 11 | #include <linux/fs_enet_pd.h> |
10 | 12 | ||
11 | #include <asm/dma-mapping.h> | ||
12 | |||
13 | #ifdef CONFIG_CPM1 | 13 | #ifdef CONFIG_CPM1 |
14 | #include <asm/commproc.h> | 14 | #include <asm/commproc.h> |
15 | |||
16 | struct fec_info { | ||
17 | fec_t* fecp; | ||
18 | u32 mii_speed; | ||
19 | }; | ||
15 | #endif | 20 | #endif |
16 | 21 | ||
17 | #ifdef CONFIG_CPM2 | 22 | #ifdef CONFIG_CPM2 |
18 | #include <asm/cpm2.h> | 23 | #include <asm/cpm2.h> |
19 | #endif | 24 | #endif |
20 | 25 | ||
26 | /* This is used to operate with pins. | ||
27 | Note that the actual port size may | ||
28 | be different; cpm(s) handle it OK */ | ||
29 | struct bb_info { | ||
30 | u8 mdio_dat_msk; | ||
31 | u8 mdio_dir_msk; | ||
32 | u8 *mdio_dir; | ||
33 | u8 *mdio_dat; | ||
34 | u8 mdc_msk; | ||
35 | u8 *mdc_dat; | ||
36 | int delay; | ||
37 | }; | ||
38 | |||
21 | /* hw driver ops */ | 39 | /* hw driver ops */ |
22 | struct fs_ops { | 40 | struct fs_ops { |
23 | int (*setup_data)(struct net_device *dev); | 41 | int (*setup_data)(struct net_device *dev); |
@@ -25,6 +43,7 @@ struct fs_ops { | |||
25 | void (*free_bd)(struct net_device *dev); | 43 | void (*free_bd)(struct net_device *dev); |
26 | void (*cleanup_data)(struct net_device *dev); | 44 | void (*cleanup_data)(struct net_device *dev); |
27 | void (*set_multicast_list)(struct net_device *dev); | 45 | void (*set_multicast_list)(struct net_device *dev); |
46 | void (*adjust_link)(struct net_device *dev); | ||
28 | void (*restart)(struct net_device *dev); | 47 | void (*restart)(struct net_device *dev); |
29 | void (*stop)(struct net_device *dev); | 48 | void (*stop)(struct net_device *dev); |
30 | void (*pre_request_irq)(struct net_device *dev, int irq); | 49 | void (*pre_request_irq)(struct net_device *dev, int irq); |
@@ -100,10 +119,6 @@ struct fs_enet_mii_bus { | |||
100 | }; | 119 | }; |
101 | }; | 120 | }; |
102 | 121 | ||
103 | int fs_mii_bitbang_init(struct fs_enet_mii_bus *bus); | ||
104 | int fs_mii_fixed_init(struct fs_enet_mii_bus *bus); | ||
105 | int fs_mii_fec_init(struct fs_enet_mii_bus *bus); | ||
106 | |||
107 | struct fs_enet_private { | 122 | struct fs_enet_private { |
108 | struct device *dev; /* pointer back to the device (must be initialized first) */ | 123 | struct device *dev; /* pointer back to the device (must be initialized first) */ |
109 | spinlock_t lock; /* during all ops except TX pckt processing */ | 124 | spinlock_t lock; /* during all ops except TX pckt processing */ |
@@ -130,7 +145,8 @@ struct fs_enet_private { | |||
130 | struct fs_enet_mii_bus *mii_bus; | 145 | struct fs_enet_mii_bus *mii_bus; |
131 | int interrupt; | 146 | int interrupt; |
132 | 147 | ||
133 | int duplex, speed; /* current settings */ | 148 | struct phy_device *phydev; |
149 | int oldduplex, oldspeed, oldlink; /* current settings */ | ||
134 | 150 | ||
135 | /* event masks */ | 151 | /* event masks */ |
136 | u32 ev_napi_rx; /* mask of NAPI rx events */ | 152 | u32 ev_napi_rx; /* mask of NAPI rx events */ |
@@ -168,15 +184,9 @@ struct fs_enet_private { | |||
168 | }; | 184 | }; |
169 | 185 | ||
170 | /***************************************************************************/ | 186 | /***************************************************************************/ |
171 | 187 | int fs_enet_mdio_bb_init(void); | |
172 | int fs_mii_read(struct net_device *dev, int phy_id, int location); | 188 | int fs_mii_fixed_init(struct fs_enet_mii_bus *bus); |
173 | void fs_mii_write(struct net_device *dev, int phy_id, int location, int value); | 189 | int fs_enet_mdio_fec_init(void); |
174 | |||
175 | void fs_mii_startup(struct net_device *dev); | ||
176 | void fs_mii_shutdown(struct net_device *dev); | ||
177 | void fs_mii_ack_int(struct net_device *dev); | ||
178 | |||
179 | void fs_mii_link_status_change_check(struct net_device *dev, int init_media); | ||
180 | 190 | ||
181 | void fs_init_bds(struct net_device *dev); | 191 | void fs_init_bds(struct net_device *dev); |
182 | void fs_cleanup_bds(struct net_device *dev); | 192 | void fs_cleanup_bds(struct net_device *dev); |
@@ -194,7 +204,6 @@ int fs_enet_platform_init(void); | |||
194 | void fs_enet_platform_cleanup(void); | 204 | void fs_enet_platform_cleanup(void); |
195 | 205 | ||
196 | /***************************************************************************/ | 206 | /***************************************************************************/ |
197 | |||
198 | /* buffer descriptor access macros */ | 207 | /* buffer descriptor access macros */ |
199 | 208 | ||
200 | /* access macros */ | 209 | /* access macros */ |