aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-12-28 15:49:40 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-12-28 15:49:40 -0500
commit0191b625ca5a46206d2fb862bb08f36f2fcb3b31 (patch)
tree454d1842b1833d976da62abcbd5c47521ebe9bd7 /arch
parent54a696bd07c14d3b1192d03ce7269bc59b45209a (diff)
parenteb56092fc168bf5af199d47af50c0d84a96db898 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1429 commits) net: Allow dependancies of FDDI & Tokenring to be modular. igb: Fix build warning when DCA is disabled. net: Fix warning fallout from recent NAPI interface changes. gro: Fix potential use after free sfc: If AN is enabled, always read speed/duplex from the AN advertising bits sfc: When disabling the NIC, close the device rather than unregistering it sfc: SFT9001: Add cable diagnostics sfc: Add support for multiple PHY self-tests sfc: Merge top-level functions for self-tests sfc: Clean up PHY mode management in loopback self-test sfc: Fix unreliable link detection in some loopback modes sfc: Generate unique names for per-NIC workqueues 802.3ad: use standard ethhdr instead of ad_header 802.3ad: generalize out mac address initializer 802.3ad: initialize ports LACPDU from const initializer 802.3ad: remove typedef around ad_system 802.3ad: turn ports is_individual into a bool 802.3ad: turn ports is_enabled into a bool 802.3ad: make ntt bool ixgbe: Fix set_ringparam in ixgbe to use the same memory pools. ... Fixed trivial IPv4/6 address printing conflicts in fs/cifs/connect.c due to the conversion to %pI (in this networking merge) and the addition of doing IPv6 addresses (from the earlier merge of CIFS).
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-ixp4xx/fsg-setup.c9
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/qmgr.h35
-rw-r--r--arch/arm/mach-ixp4xx/ixp4xx_qmgr.c44
-rw-r--r--arch/arm/mach-ixp4xx/nas100d-setup.c5
-rw-r--r--arch/arm/mach-ixp4xx/nslu2-setup.c5
-rw-r--r--arch/ia64/hp/sim/simeth.c25
-rw-r--r--arch/powerpc/boot/dts/asp834x-redboot.dts20
-rw-r--r--arch/powerpc/boot/dts/ksi8560.dts20
-rw-r--r--arch/powerpc/boot/dts/mpc8313erdb.dts20
-rw-r--r--arch/powerpc/boot/dts/mpc8315erdb.dts19
-rw-r--r--arch/powerpc/boot/dts/mpc8349emitx.dts18
-rw-r--r--arch/powerpc/boot/dts/mpc8349emitxgp.dts5
-rw-r--r--arch/powerpc/boot/dts/mpc834x_mds.dts19
-rw-r--r--arch/powerpc/boot/dts/mpc8377_mds.dts19
-rw-r--r--arch/powerpc/boot/dts/mpc8377_rdb.dts19
-rw-r--r--arch/powerpc/boot/dts/mpc8378_mds.dts19
-rw-r--r--arch/powerpc/boot/dts/mpc8378_rdb.dts17
-rw-r--r--arch/powerpc/boot/dts/mpc8379_mds.dts18
-rw-r--r--arch/powerpc/boot/dts/mpc8379_rdb.dts18
-rw-r--r--arch/powerpc/boot/dts/mpc8536ds.dts18
-rw-r--r--arch/powerpc/boot/dts/mpc8540ads.dts31
-rw-r--r--arch/powerpc/boot/dts/mpc8541cds.dts18
-rw-r--r--arch/powerpc/boot/dts/mpc8544ds.dts20
-rw-r--r--arch/powerpc/boot/dts/mpc8548cds.dts44
-rw-r--r--arch/powerpc/boot/dts/mpc8555cds.dts18
-rw-r--r--arch/powerpc/boot/dts/mpc8560ads.dts18
-rw-r--r--arch/powerpc/boot/dts/mpc8568mds.dts18
-rw-r--r--arch/powerpc/boot/dts/mpc8572ds.dts45
-rw-r--r--arch/powerpc/boot/dts/mpc8641_hpcn.dts45
-rw-r--r--arch/powerpc/boot/dts/sbc8349.dts18
-rw-r--r--arch/powerpc/boot/dts/sbc8548.dts18
-rw-r--r--arch/powerpc/boot/dts/sbc8560.dts18
-rw-r--r--arch/powerpc/boot/dts/sbc8641d.dts44
-rw-r--r--arch/powerpc/boot/dts/stx_gp3_8560.dts18
-rw-r--r--arch/powerpc/boot/dts/tqm8540.dts28
-rw-r--r--arch/powerpc/boot/dts/tqm8541.dts18
-rw-r--r--arch/powerpc/boot/dts/tqm8548-bigflash.dts44
-rw-r--r--arch/powerpc/boot/dts/tqm8548.dts44
-rw-r--r--arch/powerpc/boot/dts/tqm8555.dts18
-rw-r--r--arch/powerpc/boot/dts/tqm8560.dts18
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c241
-rw-r--r--arch/s390/appldata/appldata_net_sum.c4
-rw-r--r--arch/sparc64/kernel/idprom.c5
-rw-r--r--arch/um/drivers/daemon_kern.c2
-rw-r--r--arch/um/drivers/mcast_kern.c2
-rw-r--r--arch/um/drivers/net_kern.c29
-rw-r--r--arch/um/drivers/pcap_kern.c2
-rw-r--r--arch/um/drivers/slip_kern.c2
-rw-r--r--arch/um/drivers/slirp_kern.c2
-rw-r--r--arch/um/drivers/vde_kern.c2
-rw-r--r--arch/um/os-Linux/drivers/ethertap_kern.c2
-rw-r--r--arch/um/os-Linux/drivers/tuntap_kern.c2
-rw-r--r--arch/xtensa/platforms/iss/network.c21
53 files changed, 941 insertions, 290 deletions
diff --git a/arch/arm/mach-ixp4xx/fsg-setup.c b/arch/arm/mach-ixp4xx/fsg-setup.c
index e7c6386782ed..5add22fc9899 100644
--- a/arch/arm/mach-ixp4xx/fsg-setup.c
+++ b/arch/arm/mach-ixp4xx/fsg-setup.c
@@ -177,7 +177,6 @@ static irqreturn_t fsg_reset_handler(int irq, void *dev_id)
177 177
178static void __init fsg_init(void) 178static void __init fsg_init(void)
179{ 179{
180 DECLARE_MAC_BUF(mac_buf);
181 uint8_t __iomem *f; 180 uint8_t __iomem *f;
182 181
183 ixp4xx_sys_init(); 182 ixp4xx_sys_init();
@@ -256,10 +255,10 @@ static void __init fsg_init(void)
256#endif 255#endif
257 iounmap(f); 256 iounmap(f);
258 } 257 }
259 printk(KERN_INFO "FSG: Using MAC address %s for port 0\n", 258 printk(KERN_INFO "FSG: Using MAC address %pM for port 0\n",
260 print_mac(mac_buf, fsg_plat_eth[0].hwaddr)); 259 fsg_plat_eth[0].hwaddr);
261 printk(KERN_INFO "FSG: Using MAC address %s for port 1\n", 260 printk(KERN_INFO "FSG: Using MAC address %pM for port 1\n",
262 print_mac(mac_buf, fsg_plat_eth[1].hwaddr)); 261 fsg_plat_eth[1].hwaddr);
263 262
264} 263}
265 264
diff --git a/arch/arm/mach-ixp4xx/include/mach/qmgr.h b/arch/arm/mach-ixp4xx/include/mach/qmgr.h
index 1e52b95cede5..0cbe6ceb67c5 100644
--- a/arch/arm/mach-ixp4xx/include/mach/qmgr.h
+++ b/arch/arm/mach-ixp4xx/include/mach/qmgr.h
@@ -12,6 +12,8 @@
12#include <linux/io.h> 12#include <linux/io.h>
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14 14
15#define DEBUG_QMGR 0
16
15#define HALF_QUEUES 32 17#define HALF_QUEUES 32
16#define QUEUES 64 /* only 32 lower queues currently supported */ 18#define QUEUES 64 /* only 32 lower queues currently supported */
17#define MAX_QUEUE_LENGTH 4 /* in dwords */ 19#define MAX_QUEUE_LENGTH 4 /* in dwords */
@@ -61,22 +63,51 @@ void qmgr_enable_irq(unsigned int queue);
61void qmgr_disable_irq(unsigned int queue); 63void qmgr_disable_irq(unsigned int queue);
62 64
63/* request_ and release_queue() must be called from non-IRQ context */ 65/* request_ and release_queue() must be called from non-IRQ context */
66
67#if DEBUG_QMGR
68extern char qmgr_queue_descs[QUEUES][32];
69
64int qmgr_request_queue(unsigned int queue, unsigned int len /* dwords */, 70int qmgr_request_queue(unsigned int queue, unsigned int len /* dwords */,
65 unsigned int nearly_empty_watermark, 71 unsigned int nearly_empty_watermark,
66 unsigned int nearly_full_watermark); 72 unsigned int nearly_full_watermark,
73 const char *desc_format, const char* name);
74#else
75int __qmgr_request_queue(unsigned int queue, unsigned int len /* dwords */,
76 unsigned int nearly_empty_watermark,
77 unsigned int nearly_full_watermark);
78#define qmgr_request_queue(queue, len, nearly_empty_watermark, \
79 nearly_full_watermark, desc_format, name) \
80 __qmgr_request_queue(queue, len, nearly_empty_watermark, \
81 nearly_full_watermark)
82#endif
83
67void qmgr_release_queue(unsigned int queue); 84void qmgr_release_queue(unsigned int queue);
68 85
69 86
70static inline void qmgr_put_entry(unsigned int queue, u32 val) 87static inline void qmgr_put_entry(unsigned int queue, u32 val)
71{ 88{
72 extern struct qmgr_regs __iomem *qmgr_regs; 89 extern struct qmgr_regs __iomem *qmgr_regs;
90#if DEBUG_QMGR
91 BUG_ON(!qmgr_queue_descs[queue]); /* not yet requested */
92
93 printk(KERN_DEBUG "Queue %s(%i) put %X\n",
94 qmgr_queue_descs[queue], queue, val);
95#endif
73 __raw_writel(val, &qmgr_regs->acc[queue][0]); 96 __raw_writel(val, &qmgr_regs->acc[queue][0]);
74} 97}
75 98
76static inline u32 qmgr_get_entry(unsigned int queue) 99static inline u32 qmgr_get_entry(unsigned int queue)
77{ 100{
101 u32 val;
78 extern struct qmgr_regs __iomem *qmgr_regs; 102 extern struct qmgr_regs __iomem *qmgr_regs;
79 return __raw_readl(&qmgr_regs->acc[queue][0]); 103 val = __raw_readl(&qmgr_regs->acc[queue][0]);
104#if DEBUG_QMGR
105 BUG_ON(!qmgr_queue_descs[queue]); /* not yet requested */
106
107 printk(KERN_DEBUG "Queue %s(%i) get %X\n",
108 qmgr_queue_descs[queue], queue, val);
109#endif
110 return val;
80} 111}
81 112
82static inline int qmgr_get_stat1(unsigned int queue) 113static inline int qmgr_get_stat1(unsigned int queue)
diff --git a/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c b/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c
index c6cb069a5a83..bfddc73d0a20 100644
--- a/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c
+++ b/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c
@@ -14,8 +14,6 @@
14#include <linux/module.h> 14#include <linux/module.h>
15#include <mach/qmgr.h> 15#include <mach/qmgr.h>
16 16
17#define DEBUG 0
18
19struct qmgr_regs __iomem *qmgr_regs; 17struct qmgr_regs __iomem *qmgr_regs;
20static struct resource *mem_res; 18static struct resource *mem_res;
21static spinlock_t qmgr_lock; 19static spinlock_t qmgr_lock;
@@ -23,6 +21,10 @@ static u32 used_sram_bitmap[4]; /* 128 16-dword pages */
23static void (*irq_handlers[HALF_QUEUES])(void *pdev); 21static void (*irq_handlers[HALF_QUEUES])(void *pdev);
24static void *irq_pdevs[HALF_QUEUES]; 22static void *irq_pdevs[HALF_QUEUES];
25 23
24#if DEBUG_QMGR
25char qmgr_queue_descs[QUEUES][32];
26#endif
27
26void qmgr_set_irq(unsigned int queue, int src, 28void qmgr_set_irq(unsigned int queue, int src,
27 void (*handler)(void *pdev), void *pdev) 29 void (*handler)(void *pdev), void *pdev)
28{ 30{
@@ -70,6 +72,7 @@ void qmgr_disable_irq(unsigned int queue)
70 spin_lock_irqsave(&qmgr_lock, flags); 72 spin_lock_irqsave(&qmgr_lock, flags);
71 __raw_writel(__raw_readl(&qmgr_regs->irqen[0]) & ~(1 << queue), 73 __raw_writel(__raw_readl(&qmgr_regs->irqen[0]) & ~(1 << queue),
72 &qmgr_regs->irqen[0]); 74 &qmgr_regs->irqen[0]);
75 __raw_writel(1 << queue, &qmgr_regs->irqstat[0]); /* clear */
73 spin_unlock_irqrestore(&qmgr_lock, flags); 76 spin_unlock_irqrestore(&qmgr_lock, flags);
74} 77}
75 78
@@ -81,9 +84,16 @@ static inline void shift_mask(u32 *mask)
81 mask[0] <<= 1; 84 mask[0] <<= 1;
82} 85}
83 86
87#if DEBUG_QMGR
84int qmgr_request_queue(unsigned int queue, unsigned int len /* dwords */, 88int qmgr_request_queue(unsigned int queue, unsigned int len /* dwords */,
85 unsigned int nearly_empty_watermark, 89 unsigned int nearly_empty_watermark,
86 unsigned int nearly_full_watermark) 90 unsigned int nearly_full_watermark,
91 const char *desc_format, const char* name)
92#else
93int __qmgr_request_queue(unsigned int queue, unsigned int len /* dwords */,
94 unsigned int nearly_empty_watermark,
95 unsigned int nearly_full_watermark)
96#endif
87{ 97{
88 u32 cfg, addr = 0, mask[4]; /* in 16-dwords */ 98 u32 cfg, addr = 0, mask[4]; /* in 16-dwords */
89 int err; 99 int err;
@@ -151,12 +161,13 @@ int qmgr_request_queue(unsigned int queue, unsigned int len /* dwords */,
151 used_sram_bitmap[2] |= mask[2]; 161 used_sram_bitmap[2] |= mask[2];
152 used_sram_bitmap[3] |= mask[3]; 162 used_sram_bitmap[3] |= mask[3];
153 __raw_writel(cfg | (addr << 14), &qmgr_regs->sram[queue]); 163 __raw_writel(cfg | (addr << 14), &qmgr_regs->sram[queue]);
154 spin_unlock_irq(&qmgr_lock); 164#if DEBUG_QMGR
155 165 snprintf(qmgr_queue_descs[queue], sizeof(qmgr_queue_descs[0]),
156#if DEBUG 166 desc_format, name);
157 printk(KERN_DEBUG "qmgr: requested queue %i, addr = 0x%02X\n", 167 printk(KERN_DEBUG "qmgr: requested queue %s(%i) addr = 0x%02X\n",
158 queue, addr); 168 qmgr_queue_descs[queue], queue, addr);
159#endif 169#endif
170 spin_unlock_irq(&qmgr_lock);
160 return 0; 171 return 0;
161 172
162err: 173err:
@@ -189,6 +200,11 @@ void qmgr_release_queue(unsigned int queue)
189 while (addr--) 200 while (addr--)
190 shift_mask(mask); 201 shift_mask(mask);
191 202
203#if DEBUG_QMGR
204 printk(KERN_DEBUG "qmgr: releasing queue %s(%i)\n",
205 qmgr_queue_descs[queue], queue);
206 qmgr_queue_descs[queue][0] = '\x0';
207#endif
192 __raw_writel(0, &qmgr_regs->sram[queue]); 208 __raw_writel(0, &qmgr_regs->sram[queue]);
193 209
194 used_sram_bitmap[0] &= ~mask[0]; 210 used_sram_bitmap[0] &= ~mask[0];
@@ -199,9 +215,10 @@ void qmgr_release_queue(unsigned int queue)
199 spin_unlock_irq(&qmgr_lock); 215 spin_unlock_irq(&qmgr_lock);
200 216
201 module_put(THIS_MODULE); 217 module_put(THIS_MODULE);
202#if DEBUG 218
203 printk(KERN_DEBUG "qmgr: released queue %i\n", queue); 219 while ((addr = qmgr_get_entry(queue)))
204#endif 220 printk(KERN_ERR "qmgr: released queue %i not empty: 0x%08X\n",
221 queue, addr);
205} 222}
206 223
207static int qmgr_init(void) 224static int qmgr_init(void)
@@ -272,5 +289,10 @@ EXPORT_SYMBOL(qmgr_regs);
272EXPORT_SYMBOL(qmgr_set_irq); 289EXPORT_SYMBOL(qmgr_set_irq);
273EXPORT_SYMBOL(qmgr_enable_irq); 290EXPORT_SYMBOL(qmgr_enable_irq);
274EXPORT_SYMBOL(qmgr_disable_irq); 291EXPORT_SYMBOL(qmgr_disable_irq);
292#if DEBUG_QMGR
293EXPORT_SYMBOL(qmgr_queue_descs);
275EXPORT_SYMBOL(qmgr_request_queue); 294EXPORT_SYMBOL(qmgr_request_queue);
295#else
296EXPORT_SYMBOL(__qmgr_request_queue);
297#endif
276EXPORT_SYMBOL(qmgr_release_queue); 298EXPORT_SYMBOL(qmgr_release_queue);
diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c
index 0acd95ecf27e..921c947b5b6b 100644
--- a/arch/arm/mach-ixp4xx/nas100d-setup.c
+++ b/arch/arm/mach-ixp4xx/nas100d-setup.c
@@ -231,7 +231,6 @@ static irqreturn_t nas100d_reset_handler(int irq, void *dev_id)
231 231
232static void __init nas100d_init(void) 232static void __init nas100d_init(void)
233{ 233{
234 DECLARE_MAC_BUF(mac_buf);
235 uint8_t __iomem *f; 234 uint8_t __iomem *f;
236 int i; 235 int i;
237 236
@@ -294,8 +293,8 @@ static void __init nas100d_init(void)
294#endif 293#endif
295 iounmap(f); 294 iounmap(f);
296 } 295 }
297 printk(KERN_INFO "NAS100D: Using MAC address %s for port 0\n", 296 printk(KERN_INFO "NAS100D: Using MAC address %pM for port 0\n",
298 print_mac(mac_buf, nas100d_plat_eth[0].hwaddr)); 297 nas100d_plat_eth[0].hwaddr);
299 298
300} 299}
301 300
diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c
index bc9d920ae54f..ff6a08d02cc4 100644
--- a/arch/arm/mach-ixp4xx/nslu2-setup.c
+++ b/arch/arm/mach-ixp4xx/nslu2-setup.c
@@ -220,7 +220,6 @@ static struct sys_timer nslu2_timer = {
220 220
221static void __init nslu2_init(void) 221static void __init nslu2_init(void)
222{ 222{
223 DECLARE_MAC_BUF(mac_buf);
224 uint8_t __iomem *f; 223 uint8_t __iomem *f;
225 int i; 224 int i;
226 225
@@ -275,8 +274,8 @@ static void __init nslu2_init(void)
275#endif 274#endif
276 iounmap(f); 275 iounmap(f);
277 } 276 }
278 printk(KERN_INFO "NSLU2: Using MAC address %s for port 0\n", 277 printk(KERN_INFO "NSLU2: Using MAC address %pM for port 0\n",
279 print_mac(mac_buf, nslu2_plat_eth[0].hwaddr)); 278 nslu2_plat_eth[0].hwaddr);
280 279
281} 280}
282 281
diff --git a/arch/ia64/hp/sim/simeth.c b/arch/ia64/hp/sim/simeth.c
index 3d47839a0c48..e4d8fde68103 100644
--- a/arch/ia64/hp/sim/simeth.c
+++ b/arch/ia64/hp/sim/simeth.c
@@ -167,6 +167,15 @@ netdev_read(int fd, unsigned char *buf, unsigned int len)
167 return ia64_ssc(fd, __pa(buf), len, 0, SSC_NETDEV_RECV); 167 return ia64_ssc(fd, __pa(buf), len, 0, SSC_NETDEV_RECV);
168} 168}
169 169
170static const struct net_device_ops simeth_netdev_ops = {
171 .ndo_open = simeth_open,
172 .ndo_stop = simeth_close,
173 .ndo_start_xmit = simeth_tx,
174 .ndo_get_stats = simeth_get_stats,
175 .ndo_set_multicast_list = set_multicast_list, /* not yet used */
176
177};
178
170/* 179/*
171 * Function shared with module code, so cannot be in init section 180 * Function shared with module code, so cannot be in init section
172 * 181 *
@@ -206,14 +215,10 @@ simeth_probe1(void)
206 215
207 memcpy(dev->dev_addr, mac_addr, sizeof(mac_addr)); 216 memcpy(dev->dev_addr, mac_addr, sizeof(mac_addr));
208 217
209 local = dev->priv; 218 local = netdev_priv(dev);
210 local->simfd = fd; /* keep track of underlying file descriptor */ 219 local->simfd = fd; /* keep track of underlying file descriptor */
211 220
212 dev->open = simeth_open; 221 dev->netdev_ops = &simeth_netdev_ops;
213 dev->stop = simeth_close;
214 dev->hard_start_xmit = simeth_tx;
215 dev->get_stats = simeth_get_stats;
216 dev->set_multicast_list = set_multicast_list; /* no yet used */
217 222
218 err = register_netdev(dev); 223 err = register_netdev(dev);
219 if (err) { 224 if (err) {
@@ -325,7 +330,7 @@ simeth_device_event(struct notifier_block *this,unsigned long event, void *ptr)
325 * we get DOWN then UP. 330 * we get DOWN then UP.
326 */ 331 */
327 332
328 local = dev->priv; 333 local = netdev_priv(dev);
329 /* now do it for real */ 334 /* now do it for real */
330 r = event == NETDEV_UP ? 335 r = event == NETDEV_UP ?
331 netdev_attach(local->simfd, dev->irq, ntohl(ifa->ifa_local)): 336 netdev_attach(local->simfd, dev->irq, ntohl(ifa->ifa_local)):
@@ -380,7 +385,7 @@ frame_print(unsigned char *from, unsigned char *frame, int len)
380static int 385static int
381simeth_tx(struct sk_buff *skb, struct net_device *dev) 386simeth_tx(struct sk_buff *skb, struct net_device *dev)
382{ 387{
383 struct simeth_local *local = dev->priv; 388 struct simeth_local *local = netdev_priv(dev);
384 389
385#if 0 390#if 0
386 /* ensure we have at least ETH_ZLEN bytes (min frame size) */ 391 /* ensure we have at least ETH_ZLEN bytes (min frame size) */
@@ -443,7 +448,7 @@ simeth_rx(struct net_device *dev)
443 int len; 448 int len;
444 int rcv_count = SIMETH_RECV_MAX; 449 int rcv_count = SIMETH_RECV_MAX;
445 450
446 local = dev->priv; 451 local = netdev_priv(dev);
447 /* 452 /*
448 * the loop concept has been borrowed from other drivers 453 * the loop concept has been borrowed from other drivers
449 * looks to me like it's a throttling thing to avoid pushing to many 454 * looks to me like it's a throttling thing to avoid pushing to many
@@ -507,7 +512,7 @@ simeth_interrupt(int irq, void *dev_id)
507static struct net_device_stats * 512static struct net_device_stats *
508simeth_get_stats(struct net_device *dev) 513simeth_get_stats(struct net_device *dev)
509{ 514{
510 struct simeth_local *local = dev->priv; 515 struct simeth_local *local = netdev_priv(dev);
511 516
512 return &local->stats; 517 return &local->stats;
513} 518}
diff --git a/arch/powerpc/boot/dts/asp834x-redboot.dts b/arch/powerpc/boot/dts/asp834x-redboot.dts
index 6235fca445de..524af7ef9f26 100644
--- a/arch/powerpc/boot/dts/asp834x-redboot.dts
+++ b/arch/powerpc/boot/dts/asp834x-redboot.dts
@@ -199,8 +199,26 @@
199 reg = <0x2>; 199 reg = <0x2>;
200 device_type = "ethernet-phy"; 200 device_type = "ethernet-phy";
201 }; 201 };
202
203 tbi0: tbi-phy@11 {
204 reg = <0x11>;
205 device_type = "tbi-phy";
206 };
202 }; 207 };
203 208
209 mdio@25520 {
210 #address-cells = <1>;
211 #size-cells = <0>;
212 compatible = "fsl,gianfar-tbi";
213 reg = <0x25520 0x20>;
214
215 tbi1: tbi-phy@11 {
216 reg = <0x11>;
217 device_type = "tbi-phy";
218 };
219 };
220
221
204 enet0: ethernet@24000 { 222 enet0: ethernet@24000 {
205 cell-index = <0>; 223 cell-index = <0>;
206 device_type = "network"; 224 device_type = "network";
@@ -210,6 +228,7 @@
210 local-mac-address = [ 00 08 e5 11 32 33 ]; 228 local-mac-address = [ 00 08 e5 11 32 33 ];
211 interrupts = <32 0x8 33 0x8 34 0x8>; 229 interrupts = <32 0x8 33 0x8 34 0x8>;
212 interrupt-parent = <&ipic>; 230 interrupt-parent = <&ipic>;
231 tbi-handle = <&tbi0>;
213 phy-handle = <&phy0>; 232 phy-handle = <&phy0>;
214 linux,network-index = <0>; 233 linux,network-index = <0>;
215 }; 234 };
@@ -223,6 +242,7 @@
223 local-mac-address = [ 00 08 e5 11 32 34 ]; 242 local-mac-address = [ 00 08 e5 11 32 34 ];
224 interrupts = <35 0x8 36 0x8 37 0x8>; 243 interrupts = <35 0x8 36 0x8 37 0x8>;
225 interrupt-parent = <&ipic>; 244 interrupt-parent = <&ipic>;
245 tbi-handle = <&tbi1>;
226 phy-handle = <&phy1>; 246 phy-handle = <&phy1>;
227 linux,network-index = <1>; 247 linux,network-index = <1>;
228 }; 248 };
diff --git a/arch/powerpc/boot/dts/ksi8560.dts b/arch/powerpc/boot/dts/ksi8560.dts
index 49737589ffc8..3bfff47418db 100644
--- a/arch/powerpc/boot/dts/ksi8560.dts
+++ b/arch/powerpc/boot/dts/ksi8560.dts
@@ -141,8 +141,26 @@
141 reg = <0x2>; 141 reg = <0x2>;
142 device_type = "ethernet-phy"; 142 device_type = "ethernet-phy";
143 }; 143 };
144
145 tbi0: tbi-phy@11 {
146 reg = <0x11>;
147 device_type = "tbi-phy";
148 };
144 }; 149 };
145 150
151 mdio@25520 {
152 #address-cells = <1>;
153 #size-cells = <0>;
154 compatible = "fsl,gianfar-tbi";
155 reg = <0x25520 0x20>;
156
157 tbi1: tbi-phy@11 {
158 reg = <0x11>;
159 device_type = "tbi-phy";
160 };
161 };
162
163
146 enet0: ethernet@24000 { 164 enet0: ethernet@24000 {
147 device_type = "network"; 165 device_type = "network";
148 model = "TSEC"; 166 model = "TSEC";
@@ -152,6 +170,7 @@
152 local-mac-address = [ 00 00 00 00 00 00 ]; 170 local-mac-address = [ 00 00 00 00 00 00 ];
153 interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>; 171 interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>;
154 interrupt-parent = <&mpic>; 172 interrupt-parent = <&mpic>;
173 tbi-handle = <&tbi0>;
155 phy-handle = <&PHY1>; 174 phy-handle = <&PHY1>;
156 }; 175 };
157 176
@@ -164,6 +183,7 @@
164 local-mac-address = [ 00 00 00 00 00 00 ]; 183 local-mac-address = [ 00 00 00 00 00 00 ];
165 interrupts = <0x23 0x2 0x24 0x2 0x28 0x2>; 184 interrupts = <0x23 0x2 0x24 0x2 0x28 0x2>;
166 interrupt-parent = <&mpic>; 185 interrupt-parent = <&mpic>;
186 tbi-handle = <&tbi1>;
167 phy-handle = <&PHY2>; 187 phy-handle = <&PHY2>;
168 }; 188 };
169 189
diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts
index 503031766825..d4df8b6857a4 100644
--- a/arch/powerpc/boot/dts/mpc8313erdb.dts
+++ b/arch/powerpc/boot/dts/mpc8313erdb.dts
@@ -190,6 +190,7 @@
190 local-mac-address = [ 00 00 00 00 00 00 ]; 190 local-mac-address = [ 00 00 00 00 00 00 ];
191 interrupts = <37 0x8 36 0x8 35 0x8>; 191 interrupts = <37 0x8 36 0x8 35 0x8>;
192 interrupt-parent = <&ipic>; 192 interrupt-parent = <&ipic>;
193 tbi-handle = < &tbi0 >;
193 phy-handle = < &phy1 >; 194 phy-handle = < &phy1 >;
194 fsl,magic-packet; 195 fsl,magic-packet;
195 196
@@ -210,6 +211,10 @@
210 reg = <0x4>; 211 reg = <0x4>;
211 device_type = "ethernet-phy"; 212 device_type = "ethernet-phy";
212 }; 213 };
214 tbi0: tbi-phy@11 {
215 reg = <0x11>;
216 device_type = "tbi-phy";
217 };
213 }; 218 };
214 }; 219 };
215 220
@@ -222,9 +227,24 @@
222 local-mac-address = [ 00 00 00 00 00 00 ]; 227 local-mac-address = [ 00 00 00 00 00 00 ];
223 interrupts = <34 0x8 33 0x8 32 0x8>; 228 interrupts = <34 0x8 33 0x8 32 0x8>;
224 interrupt-parent = <&ipic>; 229 interrupt-parent = <&ipic>;
230 tbi-handle = < &tbi1 >;
225 phy-handle = < &phy4 >; 231 phy-handle = < &phy4 >;
226 sleep = <&pmc 0x10000000>; 232 sleep = <&pmc 0x10000000>;
227 fsl,magic-packet; 233 fsl,magic-packet;
234
235 mdio@25520 {
236 #address-cells = <1>;
237 #size-cells = <0>;
238 compatible = "fsl,gianfar-tbi";
239 reg = <0x25520 0x20>;
240
241 tbi1: tbi-phy@11 {
242 reg = <0x11>;
243 device_type = "tbi-phy";
244 };
245 };
246
247
228 }; 248 };
229 249
230 serial0: serial@4500 { 250 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/mpc8315erdb.dts b/arch/powerpc/boot/dts/mpc8315erdb.dts
index 6b850670de1d..d2cdd47a246d 100644
--- a/arch/powerpc/boot/dts/mpc8315erdb.dts
+++ b/arch/powerpc/boot/dts/mpc8315erdb.dts
@@ -206,8 +206,25 @@
206 reg = <0x1>; 206 reg = <0x1>;
207 device_type = "ethernet-phy"; 207 device_type = "ethernet-phy";
208 }; 208 };
209 tbi0: tbi-phy@11 {
210 reg = <0x11>;
211 device_type = "tbi-phy";
212 };
213 };
214
215 mdio@25520 {
216 #address-cells = <1>;
217 #size-cells = <0>;
218 compatible = "fsl,gianfar-tbi";
219 reg = <0x25520 0x20>;
220
221 tbi1: tbi-phy@11 {
222 reg = <0x11>;
223 device_type = "tbi-phy";
224 };
209 }; 225 };
210 226
227
211 enet0: ethernet@24000 { 228 enet0: ethernet@24000 {
212 cell-index = <0>; 229 cell-index = <0>;
213 device_type = "network"; 230 device_type = "network";
@@ -217,6 +234,7 @@
217 local-mac-address = [ 00 00 00 00 00 00 ]; 234 local-mac-address = [ 00 00 00 00 00 00 ];
218 interrupts = <32 0x8 33 0x8 34 0x8>; 235 interrupts = <32 0x8 33 0x8 34 0x8>;
219 interrupt-parent = <&ipic>; 236 interrupt-parent = <&ipic>;
237 tbi-handle = <&tbi0>;
220 phy-handle = < &phy0 >; 238 phy-handle = < &phy0 >;
221 }; 239 };
222 240
@@ -229,6 +247,7 @@
229 local-mac-address = [ 00 00 00 00 00 00 ]; 247 local-mac-address = [ 00 00 00 00 00 00 ];
230 interrupts = <35 0x8 36 0x8 37 0x8>; 248 interrupts = <35 0x8 36 0x8 37 0x8>;
231 interrupt-parent = <&ipic>; 249 interrupt-parent = <&ipic>;
250 tbi-handle = <&tbi1>;
232 phy-handle = < &phy1 >; 251 phy-handle = < &phy1 >;
233 }; 252 };
234 253
diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
index 4bdbaf4993a1..712783d0707e 100644
--- a/arch/powerpc/boot/dts/mpc8349emitx.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
@@ -184,6 +184,22 @@
184 reg = <0x1c>; 184 reg = <0x1c>;
185 device_type = "ethernet-phy"; 185 device_type = "ethernet-phy";
186 }; 186 };
187 tbi0: tbi-phy@11 {
188 reg = <0x11>;
189 device_type = "tbi-phy";
190 };
191 };
192
193 mdio@25520 {
194 #address-cells = <1>;
195 #size-cells = <0>;
196 compatible = "fsl,gianfar-tbi";
197 reg = <0x25520 0x20>;
198
199 tbi1: tbi-phy@11 {
200 reg = <0x11>;
201 device_type = "tbi-phy";
202 };
187 }; 203 };
188 204
189 enet0: ethernet@24000 { 205 enet0: ethernet@24000 {
@@ -195,6 +211,7 @@
195 local-mac-address = [ 00 00 00 00 00 00 ]; 211 local-mac-address = [ 00 00 00 00 00 00 ];
196 interrupts = <32 0x8 33 0x8 34 0x8>; 212 interrupts = <32 0x8 33 0x8 34 0x8>;
197 interrupt-parent = <&ipic>; 213 interrupt-parent = <&ipic>;
214 tbi-handle = <&tbi0>;
198 phy-handle = <&phy1c>; 215 phy-handle = <&phy1c>;
199 linux,network-index = <0>; 216 linux,network-index = <0>;
200 }; 217 };
@@ -211,6 +228,7 @@
211 /* Vitesse 7385 isn't on the MDIO bus */ 228 /* Vitesse 7385 isn't on the MDIO bus */
212 fixed-link = <1 1 1000 0 0>; 229 fixed-link = <1 1 1000 0 0>;
213 linux,network-index = <1>; 230 linux,network-index = <1>;
231 tbi-handle = <&tbi1>;
214 }; 232 };
215 233
216 serial0: serial@4500 { 234 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/mpc8349emitxgp.dts b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
index fa40647ee62e..3e918af41fb1 100644
--- a/arch/powerpc/boot/dts/mpc8349emitxgp.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
@@ -163,6 +163,10 @@
163 reg = <0x1c>; 163 reg = <0x1c>;
164 device_type = "ethernet-phy"; 164 device_type = "ethernet-phy";
165 }; 165 };
166 tbi0: tbi-phy@11 {
167 reg = <0x11>;
168 device_type = "tbi-phy";
169 };
166 }; 170 };
167 171
168 enet0: ethernet@24000 { 172 enet0: ethernet@24000 {
@@ -174,6 +178,7 @@
174 local-mac-address = [ 00 00 00 00 00 00 ]; 178 local-mac-address = [ 00 00 00 00 00 00 ];
175 interrupts = <32 0x8 33 0x8 34 0x8>; 179 interrupts = <32 0x8 33 0x8 34 0x8>;
176 interrupt-parent = <&ipic>; 180 interrupt-parent = <&ipic>;
181 tbi-handle = <&tbi0>;
177 phy-handle = <&phy1c>; 182 phy-handle = <&phy1c>;
178 linux,network-index = <0>; 183 linux,network-index = <0>;
179 }; 184 };
diff --git a/arch/powerpc/boot/dts/mpc834x_mds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts
index c986c541e9bb..d9adba01c09c 100644
--- a/arch/powerpc/boot/dts/mpc834x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc834x_mds.dts
@@ -185,8 +185,25 @@
185 reg = <0x1>; 185 reg = <0x1>;
186 device_type = "ethernet-phy"; 186 device_type = "ethernet-phy";
187 }; 187 };
188 tbi0: tbi-phy@11 {
189 reg = <0x11>;
190 device_type = "tbi-phy";
191 };
192 };
193
194 mdio@25520 {
195 #address-cells = <1>;
196 #size-cells = <0>;
197 compatible = "fsl,gianfar-tbi";
198 reg = <0x25520 0x20>;
199
200 tbi1: tbi-phy@11 {
201 reg = <0x11>;
202 device_type = "tbi-phy";
203 };
188 }; 204 };
189 205
206
190 enet0: ethernet@24000 { 207 enet0: ethernet@24000 {
191 cell-index = <0>; 208 cell-index = <0>;
192 device_type = "network"; 209 device_type = "network";
@@ -196,6 +213,7 @@
196 local-mac-address = [ 00 00 00 00 00 00 ]; 213 local-mac-address = [ 00 00 00 00 00 00 ];
197 interrupts = <32 0x8 33 0x8 34 0x8>; 214 interrupts = <32 0x8 33 0x8 34 0x8>;
198 interrupt-parent = <&ipic>; 215 interrupt-parent = <&ipic>;
216 tbi-handle = <&tbi0>;
199 phy-handle = <&phy0>; 217 phy-handle = <&phy0>;
200 linux,network-index = <0>; 218 linux,network-index = <0>;
201 }; 219 };
@@ -209,6 +227,7 @@
209 local-mac-address = [ 00 00 00 00 00 00 ]; 227 local-mac-address = [ 00 00 00 00 00 00 ];
210 interrupts = <35 0x8 36 0x8 37 0x8>; 228 interrupts = <35 0x8 36 0x8 37 0x8>;
211 interrupt-parent = <&ipic>; 229 interrupt-parent = <&ipic>;
230 tbi-handle = <&tbi1>;
212 phy-handle = <&phy1>; 231 phy-handle = <&phy1>;
213 linux,network-index = <1>; 232 linux,network-index = <1>;
214 }; 233 };
diff --git a/arch/powerpc/boot/dts/mpc8377_mds.dts b/arch/powerpc/boot/dts/mpc8377_mds.dts
index 0484561bd2c0..1d14d7052e6d 100644
--- a/arch/powerpc/boot/dts/mpc8377_mds.dts
+++ b/arch/powerpc/boot/dts/mpc8377_mds.dts
@@ -193,8 +193,25 @@
193 reg = <0x3>; 193 reg = <0x3>;
194 device_type = "ethernet-phy"; 194 device_type = "ethernet-phy";
195 }; 195 };
196 tbi0: tbi-phy@11 {
197 reg = <0x11>;
198 device_type = "tbi-phy";
199 };
200 };
201
202 mdio@25520 {
203 #address-cells = <1>;
204 #size-cells = <0>;
205 compatible = "fsl,gianfar-tbi";
206 reg = <0x25520 0x20>;
207
208 tbi1: tbi-phy@11 {
209 reg = <0x11>;
210 device_type = "tbi-phy";
211 };
196 }; 212 };
197 213
214
198 enet0: ethernet@24000 { 215 enet0: ethernet@24000 {
199 cell-index = <0>; 216 cell-index = <0>;
200 device_type = "network"; 217 device_type = "network";
@@ -205,6 +222,7 @@
205 interrupts = <32 0x8 33 0x8 34 0x8>; 222 interrupts = <32 0x8 33 0x8 34 0x8>;
206 phy-connection-type = "mii"; 223 phy-connection-type = "mii";
207 interrupt-parent = <&ipic>; 224 interrupt-parent = <&ipic>;
225 tbi-handle = <&tbi0>;
208 phy-handle = <&phy2>; 226 phy-handle = <&phy2>;
209 }; 227 };
210 228
@@ -218,6 +236,7 @@
218 interrupts = <35 0x8 36 0x8 37 0x8>; 236 interrupts = <35 0x8 36 0x8 37 0x8>;
219 phy-connection-type = "mii"; 237 phy-connection-type = "mii";
220 interrupt-parent = <&ipic>; 238 interrupt-parent = <&ipic>;
239 tbi-handle = <&tbi1>;
221 phy-handle = <&phy3>; 240 phy-handle = <&phy3>;
222 }; 241 };
223 242
diff --git a/arch/powerpc/boot/dts/mpc8377_rdb.dts b/arch/powerpc/boot/dts/mpc8377_rdb.dts
index 435ef3dd022d..31f348fdfe14 100644
--- a/arch/powerpc/boot/dts/mpc8377_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8377_rdb.dts
@@ -211,8 +211,25 @@
211 reg = <0x2>; 211 reg = <0x2>;
212 device_type = "ethernet-phy"; 212 device_type = "ethernet-phy";
213 }; 213 };
214 tbi0: tbi-phy@11 {
215 reg = <0x11>;
216 device_type = "tbi-phy";
217 };
218 };
219
220 mdio@25520 {
221 #address-cells = <1>;
222 #size-cells = <0>;
223 compatible = "fsl,gianfar-tbi";
224 reg = <0x25520 0x20>;
225
226 tbi1: tbi-phy@11 {
227 reg = <0x11>;
228 device_type = "tbi-phy";
229 };
214 }; 230 };
215 231
232
216 enet0: ethernet@24000 { 233 enet0: ethernet@24000 {
217 cell-index = <0>; 234 cell-index = <0>;
218 device_type = "network"; 235 device_type = "network";
@@ -223,6 +240,7 @@
223 interrupts = <32 0x8 33 0x8 34 0x8>; 240 interrupts = <32 0x8 33 0x8 34 0x8>;
224 phy-connection-type = "mii"; 241 phy-connection-type = "mii";
225 interrupt-parent = <&ipic>; 242 interrupt-parent = <&ipic>;
243 tbi-handle = <&tbi0>;
226 phy-handle = <&phy2>; 244 phy-handle = <&phy2>;
227 }; 245 };
228 246
@@ -237,6 +255,7 @@
237 phy-connection-type = "mii"; 255 phy-connection-type = "mii";
238 interrupt-parent = <&ipic>; 256 interrupt-parent = <&ipic>;
239 fixed-link = <1 1 1000 0 0>; 257 fixed-link = <1 1 1000 0 0>;
258 tbi-handle = <&tbi1>;
240 }; 259 };
241 260
242 serial0: serial@4500 { 261 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/mpc8378_mds.dts b/arch/powerpc/boot/dts/mpc8378_mds.dts
index 67a08d2e2ff2..b85fc02682d2 100644
--- a/arch/powerpc/boot/dts/mpc8378_mds.dts
+++ b/arch/powerpc/boot/dts/mpc8378_mds.dts
@@ -232,8 +232,25 @@
232 reg = <0x3>; 232 reg = <0x3>;
233 device_type = "ethernet-phy"; 233 device_type = "ethernet-phy";
234 }; 234 };
235 tbi0: tbi-phy@11 {
236 reg = <0x11>;
237 device_type = "tbi-phy";
238 };
239 };
240
241 mdio@25520 {
242 #address-cells = <1>;
243 #size-cells = <0>;
244 compatible = "fsl,gianfar-tbi";
245 reg = <0x25520 0x20>;
246
247 tbi1: tbi-phy@11 {
248 reg = <0x11>;
249 device_type = "tbi-phy";
250 };
235 }; 251 };
236 252
253
237 enet0: ethernet@24000 { 254 enet0: ethernet@24000 {
238 cell-index = <0>; 255 cell-index = <0>;
239 device_type = "network"; 256 device_type = "network";
@@ -244,6 +261,7 @@
244 interrupts = <32 0x8 33 0x8 34 0x8>; 261 interrupts = <32 0x8 33 0x8 34 0x8>;
245 phy-connection-type = "mii"; 262 phy-connection-type = "mii";
246 interrupt-parent = <&ipic>; 263 interrupt-parent = <&ipic>;
264 tbi-handle = <&tbi0>;
247 phy-handle = <&phy2>; 265 phy-handle = <&phy2>;
248 }; 266 };
249 267
@@ -257,6 +275,7 @@
257 interrupts = <35 0x8 36 0x8 37 0x8>; 275 interrupts = <35 0x8 36 0x8 37 0x8>;
258 phy-connection-type = "mii"; 276 phy-connection-type = "mii";
259 interrupt-parent = <&ipic>; 277 interrupt-parent = <&ipic>;
278 tbi-handle = <&tbi1>;
260 phy-handle = <&phy3>; 279 phy-handle = <&phy3>;
261 }; 280 };
262 281
diff --git a/arch/powerpc/boot/dts/mpc8378_rdb.dts b/arch/powerpc/boot/dts/mpc8378_rdb.dts
index b11e68f56a06..7a2bad038bd6 100644
--- a/arch/powerpc/boot/dts/mpc8378_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8378_rdb.dts
@@ -211,8 +211,25 @@
211 reg = <0x2>; 211 reg = <0x2>;
212 device_type = "ethernet-phy"; 212 device_type = "ethernet-phy";
213 }; 213 };
214 tbi0: tbi-phy@11 {
215 reg = <0x11>;
216 device_type = "tbi-phy";
217 };
218 };
219
220 mdio@25520 {
221 #address-cells = <1>;
222 #size-cells = <0>;
223 compatible = "fsl,gianfar-tbi";
224 reg = <0x25520 0x20>;
225
226 tbi1: tbi-phy@11 {
227 reg = <0x11>;
228 device_type = "tbi-phy";
229 };
214 }; 230 };
215 231
232
216 enet0: ethernet@24000 { 233 enet0: ethernet@24000 {
217 cell-index = <0>; 234 cell-index = <0>;
218 device_type = "network"; 235 device_type = "network";
diff --git a/arch/powerpc/boot/dts/mpc8379_mds.dts b/arch/powerpc/boot/dts/mpc8379_mds.dts
index 323370a2b5ff..acf06c438dbf 100644
--- a/arch/powerpc/boot/dts/mpc8379_mds.dts
+++ b/arch/powerpc/boot/dts/mpc8379_mds.dts
@@ -232,6 +232,22 @@
232 reg = <0x3>; 232 reg = <0x3>;
233 device_type = "ethernet-phy"; 233 device_type = "ethernet-phy";
234 }; 234 };
235 tbi0: tbi-phy@11 {
236 reg = <0x11>;
237 device_type = "tbi-phy";
238 };
239 };
240
241 mdio@25520 {
242 #address-cells = <1>;
243 #size-cells = <0>;
244 compatible = "fsl,gianfar-tbi";
245 reg = <0x25520 0x20>;
246
247 tbi1: tbi-phy@11 {
248 reg = <0x11>;
249 device_type = "tbi-phy";
250 };
235 }; 251 };
236 252
237 enet0: ethernet@24000 { 253 enet0: ethernet@24000 {
@@ -244,6 +260,7 @@
244 interrupts = <32 0x8 33 0x8 34 0x8>; 260 interrupts = <32 0x8 33 0x8 34 0x8>;
245 phy-connection-type = "mii"; 261 phy-connection-type = "mii";
246 interrupt-parent = <&ipic>; 262 interrupt-parent = <&ipic>;
263 tbi-handle = <&tbi0>;
247 phy-handle = <&phy2>; 264 phy-handle = <&phy2>;
248 }; 265 };
249 266
@@ -257,6 +274,7 @@
257 interrupts = <35 0x8 36 0x8 37 0x8>; 274 interrupts = <35 0x8 36 0x8 37 0x8>;
258 phy-connection-type = "mii"; 275 phy-connection-type = "mii";
259 interrupt-parent = <&ipic>; 276 interrupt-parent = <&ipic>;
277 tbi-handle = <&tbi1>;
260 phy-handle = <&phy3>; 278 phy-handle = <&phy3>;
261 }; 279 };
262 280
diff --git a/arch/powerpc/boot/dts/mpc8379_rdb.dts b/arch/powerpc/boot/dts/mpc8379_rdb.dts
index 337af6ea26d3..e067616f3f42 100644
--- a/arch/powerpc/boot/dts/mpc8379_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8379_rdb.dts
@@ -211,6 +211,22 @@
211 reg = <0x2>; 211 reg = <0x2>;
212 device_type = "ethernet-phy"; 212 device_type = "ethernet-phy";
213 }; 213 };
214 tbi0: tbi-phy@11 {
215 reg = <0x11>;
216 device_type = "tbi-phy";
217 };
218 };
219
220 mdio@25520 {
221 #address-cells = <1>;
222 #size-cells = <0>;
223 compatible = "fsl,gianfar-tbi";
224 reg = <0x25520 0x20>;
225
226 tbi1: tbi-phy@11 {
227 reg = <0x11>;
228 device_type = "tbi-phy";
229 };
214 }; 230 };
215 231
216 enet0: ethernet@24000 { 232 enet0: ethernet@24000 {
@@ -223,6 +239,7 @@
223 interrupts = <32 0x8 33 0x8 34 0x8>; 239 interrupts = <32 0x8 33 0x8 34 0x8>;
224 phy-connection-type = "mii"; 240 phy-connection-type = "mii";
225 interrupt-parent = <&ipic>; 241 interrupt-parent = <&ipic>;
242 tbi-handle = <&tbi0>;
226 phy-handle = <&phy2>; 243 phy-handle = <&phy2>;
227 }; 244 };
228 245
@@ -237,6 +254,7 @@
237 phy-connection-type = "mii"; 254 phy-connection-type = "mii";
238 interrupt-parent = <&ipic>; 255 interrupt-parent = <&ipic>;
239 fixed-link = <1 1 1000 0 0>; 256 fixed-link = <1 1 1000 0 0>;
257 tbi-handle = <&tbi1>;
240 }; 258 };
241 259
242 serial0: serial@4500 { 260 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/mpc8536ds.dts b/arch/powerpc/boot/dts/mpc8536ds.dts
index 35db1e5440c7..3c905df1812c 100644
--- a/arch/powerpc/boot/dts/mpc8536ds.dts
+++ b/arch/powerpc/boot/dts/mpc8536ds.dts
@@ -155,6 +155,22 @@
155 reg = <1>; 155 reg = <1>;
156 device_type = "ethernet-phy"; 156 device_type = "ethernet-phy";
157 }; 157 };
158 tbi0: tbi-phy@11 {
159 reg = <0x11>;
160 device_type = "tbi-phy";
161 };
162 };
163
164 mdio@26520 {
165 #address-cells = <1>;
166 #size-cells = <0>;
167 compatible = "fsl,gianfar-tbi";
168 reg = <0x26520 0x20>;
169
170 tbi1: tbi-phy@11 {
171 reg = <0x11>;
172 device_type = "tbi-phy";
173 };
158 }; 174 };
159 175
160 usb@22000 { 176 usb@22000 {
@@ -186,6 +202,7 @@
186 local-mac-address = [ 00 00 00 00 00 00 ]; 202 local-mac-address = [ 00 00 00 00 00 00 ];
187 interrupts = <29 2 30 2 34 2>; 203 interrupts = <29 2 30 2 34 2>;
188 interrupt-parent = <&mpic>; 204 interrupt-parent = <&mpic>;
205 tbi-handle = <&tbi0>;
189 phy-handle = <&phy1>; 206 phy-handle = <&phy1>;
190 phy-connection-type = "rgmii-id"; 207 phy-connection-type = "rgmii-id";
191 }; 208 };
@@ -199,6 +216,7 @@
199 local-mac-address = [ 00 00 00 00 00 00 ]; 216 local-mac-address = [ 00 00 00 00 00 00 ];
200 interrupts = <31 2 32 2 33 2>; 217 interrupts = <31 2 32 2 33 2>;
201 interrupt-parent = <&mpic>; 218 interrupt-parent = <&mpic>;
219 tbi-handle = <&tbi1>;
202 phy-handle = <&phy0>; 220 phy-handle = <&phy0>;
203 phy-connection-type = "rgmii-id"; 221 phy-connection-type = "rgmii-id";
204 }; 222 };
diff --git a/arch/powerpc/boot/dts/mpc8540ads.dts b/arch/powerpc/boot/dts/mpc8540ads.dts
index 9568bfaff8f7..79570ffe41b9 100644
--- a/arch/powerpc/boot/dts/mpc8540ads.dts
+++ b/arch/powerpc/boot/dts/mpc8540ads.dts
@@ -150,6 +150,34 @@
150 reg = <0x3>; 150 reg = <0x3>;
151 device_type = "ethernet-phy"; 151 device_type = "ethernet-phy";
152 }; 152 };
153 tbi0: tbi-phy@11 {
154 reg = <0x11>;
155 device_type = "tbi-phy";
156 };
157 };
158
159 mdio@25520 {
160 #address-cells = <1>;
161 #size-cells = <0>;
162 compatible = "fsl,gianfar-tbi";
163 reg = <0x25520 0x20>;
164
165 tbi1: tbi-phy@11 {
166 reg = <0x11>;
167 device_type = "tbi-phy";
168 };
169 };
170
171 mdio@26520 {
172 #address-cells = <1>;
173 #size-cells = <0>;
174 compatible = "fsl,gianfar-tbi";
175 reg = <0x26520 0x20>;
176
177 tbi2: tbi-phy@11 {
178 reg = <0x11>;
179 device_type = "tbi-phy";
180 };
153 }; 181 };
154 182
155 enet0: ethernet@24000 { 183 enet0: ethernet@24000 {
@@ -161,6 +189,7 @@
161 local-mac-address = [ 00 00 00 00 00 00 ]; 189 local-mac-address = [ 00 00 00 00 00 00 ];
162 interrupts = <29 2 30 2 34 2>; 190 interrupts = <29 2 30 2 34 2>;
163 interrupt-parent = <&mpic>; 191 interrupt-parent = <&mpic>;
192 tbi-handle = <&tbi0>;
164 phy-handle = <&phy0>; 193 phy-handle = <&phy0>;
165 }; 194 };
166 195
@@ -173,6 +202,7 @@
173 local-mac-address = [ 00 00 00 00 00 00 ]; 202 local-mac-address = [ 00 00 00 00 00 00 ];
174 interrupts = <35 2 36 2 40 2>; 203 interrupts = <35 2 36 2 40 2>;
175 interrupt-parent = <&mpic>; 204 interrupt-parent = <&mpic>;
205 tbi-handle = <&tbi1>;
176 phy-handle = <&phy1>; 206 phy-handle = <&phy1>;
177 }; 207 };
178 208
@@ -185,6 +215,7 @@
185 local-mac-address = [ 00 00 00 00 00 00 ]; 215 local-mac-address = [ 00 00 00 00 00 00 ];
186 interrupts = <41 2>; 216 interrupts = <41 2>;
187 interrupt-parent = <&mpic>; 217 interrupt-parent = <&mpic>;
218 tbi-handle = <&tbi2>;
188 phy-handle = <&phy3>; 219 phy-handle = <&phy3>;
189 }; 220 };
190 221
diff --git a/arch/powerpc/boot/dts/mpc8541cds.dts b/arch/powerpc/boot/dts/mpc8541cds.dts
index 6480f4fd96e0..221036a8ce23 100644
--- a/arch/powerpc/boot/dts/mpc8541cds.dts
+++ b/arch/powerpc/boot/dts/mpc8541cds.dts
@@ -144,6 +144,22 @@
144 reg = <0x1>; 144 reg = <0x1>;
145 device_type = "ethernet-phy"; 145 device_type = "ethernet-phy";
146 }; 146 };
147 tbi0: tbi-phy@11 {
148 reg = <0x11>;
149 device_type = "tbi-phy";
150 };
151 };
152
153 mdio@25520 {
154 #address-cells = <1>;
155 #size-cells = <0>;
156 compatible = "fsl,gianfar-tbi";
157 reg = <0x25520 0x20>;
158
159 tbi1: tbi-phy@11 {
160 reg = <0x11>;
161 device_type = "tbi-phy";
162 };
147 }; 163 };
148 164
149 enet0: ethernet@24000 { 165 enet0: ethernet@24000 {
@@ -155,6 +171,7 @@
155 local-mac-address = [ 00 00 00 00 00 00 ]; 171 local-mac-address = [ 00 00 00 00 00 00 ];
156 interrupts = <29 2 30 2 34 2>; 172 interrupts = <29 2 30 2 34 2>;
157 interrupt-parent = <&mpic>; 173 interrupt-parent = <&mpic>;
174 tbi-handle = <&tbi0>;
158 phy-handle = <&phy0>; 175 phy-handle = <&phy0>;
159 }; 176 };
160 177
@@ -167,6 +184,7 @@
167 local-mac-address = [ 00 00 00 00 00 00 ]; 184 local-mac-address = [ 00 00 00 00 00 00 ];
168 interrupts = <35 2 36 2 40 2>; 185 interrupts = <35 2 36 2 40 2>;
169 interrupt-parent = <&mpic>; 186 interrupt-parent = <&mpic>;
187 tbi-handle = <&tbi1>;
170 phy-handle = <&phy1>; 188 phy-handle = <&phy1>;
171 }; 189 };
172 190
diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/mpc8544ds.dts
index f1fb20737e3e..b9da42105066 100644
--- a/arch/powerpc/boot/dts/mpc8544ds.dts
+++ b/arch/powerpc/boot/dts/mpc8544ds.dts
@@ -116,8 +116,26 @@
116 reg = <0x1>; 116 reg = <0x1>;
117 device_type = "ethernet-phy"; 117 device_type = "ethernet-phy";
118 }; 118 };
119
120 tbi0: tbi-phy@11 {
121 reg = <0x11>;
122 device_type = "tbi-phy";
123 };
119 }; 124 };
120 125
126 mdio@26520 {
127 #address-cells = <1>;
128 #size-cells = <0>;
129 compatible = "fsl,gianfar-tbi";
130 reg = <0x26520 0x20>;
131
132 tbi1: tbi-phy@11 {
133 reg = <0x11>;
134 device_type = "tbi-phy";
135 };
136 };
137
138
121 dma@21300 { 139 dma@21300 {
122 #address-cells = <1>; 140 #address-cells = <1>;
123 #size-cells = <1>; 141 #size-cells = <1>;
@@ -169,6 +187,7 @@
169 interrupts = <29 2 30 2 34 2>; 187 interrupts = <29 2 30 2 34 2>;
170 interrupt-parent = <&mpic>; 188 interrupt-parent = <&mpic>;
171 phy-handle = <&phy0>; 189 phy-handle = <&phy0>;
190 tbi-handle = <&tbi0>;
172 phy-connection-type = "rgmii-id"; 191 phy-connection-type = "rgmii-id";
173 }; 192 };
174 193
@@ -182,6 +201,7 @@
182 interrupts = <31 2 32 2 33 2>; 201 interrupts = <31 2 32 2 33 2>;
183 interrupt-parent = <&mpic>; 202 interrupt-parent = <&mpic>;
184 phy-handle = <&phy1>; 203 phy-handle = <&phy1>;
204 tbi-handle = <&tbi1>;
185 phy-connection-type = "rgmii-id"; 205 phy-connection-type = "rgmii-id";
186 }; 206 };
187 207
diff --git a/arch/powerpc/boot/dts/mpc8548cds.dts b/arch/powerpc/boot/dts/mpc8548cds.dts
index 431b496270dc..df774a7088ff 100644
--- a/arch/powerpc/boot/dts/mpc8548cds.dts
+++ b/arch/powerpc/boot/dts/mpc8548cds.dts
@@ -172,6 +172,46 @@
172 reg = <0x3>; 172 reg = <0x3>;
173 device_type = "ethernet-phy"; 173 device_type = "ethernet-phy";
174 }; 174 };
175 tbi0: tbi-phy@11 {
176 reg = <0x11>;
177 device_type = "tbi-phy";
178 };
179 };
180
181 mdio@25520 {
182 #address-cells = <1>;
183 #size-cells = <0>;
184 compatible = "fsl,gianfar-tbi";
185 reg = <0x25520 0x20>;
186
187 tbi1: tbi-phy@11 {
188 reg = <0x11>;
189 device_type = "tbi-phy";
190 };
191 };
192
193 mdio@26520 {
194 #address-cells = <1>;
195 #size-cells = <0>;
196 compatible = "fsl,gianfar-tbi";
197 reg = <0x26520 0x20>;
198
199 tbi2: tbi-phy@11 {
200 reg = <0x11>;
201 device_type = "tbi-phy";
202 };
203 };
204
205 mdio@27520 {
206 #address-cells = <1>;
207 #size-cells = <0>;
208 compatible = "fsl,gianfar-tbi";
209 reg = <0x27520 0x20>;
210
211 tbi3: tbi-phy@11 {
212 reg = <0x11>;
213 device_type = "tbi-phy";
214 };
175 }; 215 };
176 216
177 enet0: ethernet@24000 { 217 enet0: ethernet@24000 {
@@ -183,6 +223,7 @@
183 local-mac-address = [ 00 00 00 00 00 00 ]; 223 local-mac-address = [ 00 00 00 00 00 00 ];
184 interrupts = <29 2 30 2 34 2>; 224 interrupts = <29 2 30 2 34 2>;
185 interrupt-parent = <&mpic>; 225 interrupt-parent = <&mpic>;
226 tbi-handle = <&tbi0>;
186 phy-handle = <&phy0>; 227 phy-handle = <&phy0>;
187 }; 228 };
188 229
@@ -195,6 +236,7 @@
195 local-mac-address = [ 00 00 00 00 00 00 ]; 236 local-mac-address = [ 00 00 00 00 00 00 ];
196 interrupts = <35 2 36 2 40 2>; 237 interrupts = <35 2 36 2 40 2>;
197 interrupt-parent = <&mpic>; 238 interrupt-parent = <&mpic>;
239 tbi-handle = <&tbi1>;
198 phy-handle = <&phy1>; 240 phy-handle = <&phy1>;
199 }; 241 };
200 242
@@ -208,6 +250,7 @@
208 local-mac-address = [ 00 00 00 00 00 00 ]; 250 local-mac-address = [ 00 00 00 00 00 00 ];
209 interrupts = <31 2 32 2 33 2>; 251 interrupts = <31 2 32 2 33 2>;
210 interrupt-parent = <&mpic>; 252 interrupt-parent = <&mpic>;
253 tbi-handle = <&tbi2>;
211 phy-handle = <&phy2>; 254 phy-handle = <&phy2>;
212 }; 255 };
213 256
@@ -220,6 +263,7 @@
220 local-mac-address = [ 00 00 00 00 00 00 ]; 263 local-mac-address = [ 00 00 00 00 00 00 ];
221 interrupts = <37 2 38 2 39 2>; 264 interrupts = <37 2 38 2 39 2>;
222 interrupt-parent = <&mpic>; 265 interrupt-parent = <&mpic>;
266 tbi-handle = <&tbi3>;
223 phy-handle = <&phy3>; 267 phy-handle = <&phy3>;
224 }; 268 };
225 */ 269 */
diff --git a/arch/powerpc/boot/dts/mpc8555cds.dts b/arch/powerpc/boot/dts/mpc8555cds.dts
index d833a5c4f476..053b01e1c93b 100644
--- a/arch/powerpc/boot/dts/mpc8555cds.dts
+++ b/arch/powerpc/boot/dts/mpc8555cds.dts
@@ -144,6 +144,22 @@
144 reg = <0x1>; 144 reg = <0x1>;
145 device_type = "ethernet-phy"; 145 device_type = "ethernet-phy";
146 }; 146 };
147 tbi0: tbi-phy@11 {
148 reg = <0x11>;
149 device_type = "tbi-phy";
150 };
151 };
152
153 mdio@25520 {
154 #address-cells = <1>;
155 #size-cells = <0>;
156 compatible = "fsl,gianfar-tbi";
157 reg = <0x25520 0x20>;
158
159 tbi1: tbi-phy@11 {
160 reg = <0x11>;
161 device_type = "tbi-phy";
162 };
147 }; 163 };
148 164
149 enet0: ethernet@24000 { 165 enet0: ethernet@24000 {
@@ -155,6 +171,7 @@
155 local-mac-address = [ 00 00 00 00 00 00 ]; 171 local-mac-address = [ 00 00 00 00 00 00 ];
156 interrupts = <29 2 30 2 34 2>; 172 interrupts = <29 2 30 2 34 2>;
157 interrupt-parent = <&mpic>; 173 interrupt-parent = <&mpic>;
174 tbi-handle = <&tbi0>;
158 phy-handle = <&phy0>; 175 phy-handle = <&phy0>;
159 }; 176 };
160 177
@@ -167,6 +184,7 @@
167 local-mac-address = [ 00 00 00 00 00 00 ]; 184 local-mac-address = [ 00 00 00 00 00 00 ];
168 interrupts = <35 2 36 2 40 2>; 185 interrupts = <35 2 36 2 40 2>;
169 interrupt-parent = <&mpic>; 186 interrupt-parent = <&mpic>;
187 tbi-handle = <&tbi1>;
170 phy-handle = <&phy1>; 188 phy-handle = <&phy1>;
171 }; 189 };
172 190
diff --git a/arch/powerpc/boot/dts/mpc8560ads.dts b/arch/powerpc/boot/dts/mpc8560ads.dts
index 4d1f2f284094..11b1bcbe14ce 100644
--- a/arch/powerpc/boot/dts/mpc8560ads.dts
+++ b/arch/powerpc/boot/dts/mpc8560ads.dts
@@ -145,6 +145,22 @@
145 reg = <0x3>; 145 reg = <0x3>;
146 device_type = "ethernet-phy"; 146 device_type = "ethernet-phy";
147 }; 147 };
148 tbi0: tbi-phy@11 {
149 reg = <0x11>;
150 device_type = "tbi-phy";
151 };
152 };
153
154 mdio@25520 {
155 #address-cells = <1>;
156 #size-cells = <0>;
157 compatible = "fsl,gianfar-tbi";
158 reg = <0x25520 0x20>;
159
160 tbi1: tbi-phy@11 {
161 reg = <0x11>;
162 device_type = "tbi-phy";
163 };
148 }; 164 };
149 165
150 enet0: ethernet@24000 { 166 enet0: ethernet@24000 {
@@ -156,6 +172,7 @@
156 local-mac-address = [ 00 00 00 00 00 00 ]; 172 local-mac-address = [ 00 00 00 00 00 00 ];
157 interrupts = <29 2 30 2 34 2>; 173 interrupts = <29 2 30 2 34 2>;
158 interrupt-parent = <&mpic>; 174 interrupt-parent = <&mpic>;
175 tbi-handle = <&tbi0>;
159 phy-handle = <&phy0>; 176 phy-handle = <&phy0>;
160 }; 177 };
161 178
@@ -168,6 +185,7 @@
168 local-mac-address = [ 00 00 00 00 00 00 ]; 185 local-mac-address = [ 00 00 00 00 00 00 ];
169 interrupts = <35 2 36 2 40 2>; 186 interrupts = <35 2 36 2 40 2>;
170 interrupt-parent = <&mpic>; 187 interrupt-parent = <&mpic>;
188 tbi-handle = <&tbi1>;
171 phy-handle = <&phy1>; 189 phy-handle = <&phy1>;
172 }; 190 };
173 191
diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts
index c80158f7741d..1955bd9e113d 100644
--- a/arch/powerpc/boot/dts/mpc8568mds.dts
+++ b/arch/powerpc/boot/dts/mpc8568mds.dts
@@ -179,6 +179,22 @@
179 reg = <0x3>; 179 reg = <0x3>;
180 device_type = "ethernet-phy"; 180 device_type = "ethernet-phy";
181 }; 181 };
182 tbi0: tbi-phy@11 {
183 reg = <0x11>;
184 device_type = "tbi-phy";
185 };
186 };
187
188 mdio@25520 {
189 #address-cells = <1>;
190 #size-cells = <0>;
191 compatible = "fsl,gianfar-tbi";
192 reg = <0x25520 0x20>;
193
194 tbi1: tbi-phy@11 {
195 reg = <0x11>;
196 device_type = "tbi-phy";
197 };
182 }; 198 };
183 199
184 enet0: ethernet@24000 { 200 enet0: ethernet@24000 {
@@ -190,6 +206,7 @@
190 local-mac-address = [ 00 00 00 00 00 00 ]; 206 local-mac-address = [ 00 00 00 00 00 00 ];
191 interrupts = <29 2 30 2 34 2>; 207 interrupts = <29 2 30 2 34 2>;
192 interrupt-parent = <&mpic>; 208 interrupt-parent = <&mpic>;
209 tbi-handle = <&tbi0>;
193 phy-handle = <&phy2>; 210 phy-handle = <&phy2>;
194 }; 211 };
195 212
@@ -202,6 +219,7 @@
202 local-mac-address = [ 00 00 00 00 00 00 ]; 219 local-mac-address = [ 00 00 00 00 00 00 ];
203 interrupts = <35 2 36 2 40 2>; 220 interrupts = <35 2 36 2 40 2>;
204 interrupt-parent = <&mpic>; 221 interrupt-parent = <&mpic>;
222 tbi-handle = <&tbi1>;
205 phy-handle = <&phy3>; 223 phy-handle = <&phy3>;
206 }; 224 };
207 225
diff --git a/arch/powerpc/boot/dts/mpc8572ds.dts b/arch/powerpc/boot/dts/mpc8572ds.dts
index 5c69b2fafd32..05f67253b49f 100644
--- a/arch/powerpc/boot/dts/mpc8572ds.dts
+++ b/arch/powerpc/boot/dts/mpc8572ds.dts
@@ -225,6 +225,47 @@
225 interrupts = <10 1>; 225 interrupts = <10 1>;
226 reg = <0x3>; 226 reg = <0x3>;
227 }; 227 };
228
229 tbi0: tbi-phy@11 {
230 reg = <0x11>;
231 device_type = "tbi-phy";
232 };
233 };
234
235 mdio@25520 {
236 #address-cells = <1>;
237 #size-cells = <0>;
238 compatible = "fsl,gianfar-tbi";
239 reg = <0x25520 0x20>;
240
241 tbi1: tbi-phy@11 {
242 reg = <0x11>;
243 device_type = "tbi-phy";
244 };
245 };
246
247 mdio@26520 {
248 #address-cells = <1>;
249 #size-cells = <0>;
250 compatible = "fsl,gianfar-tbi";
251 reg = <0x26520 0x20>;
252
253 tbi2: tbi-phy@11 {
254 reg = <0x11>;
255 device_type = "tbi-phy";
256 };
257 };
258
259 mdio@27520 {
260 #address-cells = <1>;
261 #size-cells = <0>;
262 compatible = "fsl,gianfar-tbi";
263 reg = <0x27520 0x20>;
264
265 tbi3: tbi-phy@11 {
266 reg = <0x11>;
267 device_type = "tbi-phy";
268 };
228 }; 269 };
229 270
230 enet0: ethernet@24000 { 271 enet0: ethernet@24000 {
@@ -236,6 +277,7 @@
236 local-mac-address = [ 00 00 00 00 00 00 ]; 277 local-mac-address = [ 00 00 00 00 00 00 ];
237 interrupts = <29 2 30 2 34 2>; 278 interrupts = <29 2 30 2 34 2>;
238 interrupt-parent = <&mpic>; 279 interrupt-parent = <&mpic>;
280 tbi-handle = <&tbi0>;
239 phy-handle = <&phy0>; 281 phy-handle = <&phy0>;
240 phy-connection-type = "rgmii-id"; 282 phy-connection-type = "rgmii-id";
241 }; 283 };
@@ -249,6 +291,7 @@
249 local-mac-address = [ 00 00 00 00 00 00 ]; 291 local-mac-address = [ 00 00 00 00 00 00 ];
250 interrupts = <35 2 36 2 40 2>; 292 interrupts = <35 2 36 2 40 2>;
251 interrupt-parent = <&mpic>; 293 interrupt-parent = <&mpic>;
294 tbi-handle = <&tbi1>;
252 phy-handle = <&phy1>; 295 phy-handle = <&phy1>;
253 phy-connection-type = "rgmii-id"; 296 phy-connection-type = "rgmii-id";
254 }; 297 };
@@ -262,6 +305,7 @@
262 local-mac-address = [ 00 00 00 00 00 00 ]; 305 local-mac-address = [ 00 00 00 00 00 00 ];
263 interrupts = <31 2 32 2 33 2>; 306 interrupts = <31 2 32 2 33 2>;
264 interrupt-parent = <&mpic>; 307 interrupt-parent = <&mpic>;
308 tbi-handle = <&tbi2>;
265 phy-handle = <&phy2>; 309 phy-handle = <&phy2>;
266 phy-connection-type = "rgmii-id"; 310 phy-connection-type = "rgmii-id";
267 }; 311 };
@@ -275,6 +319,7 @@
275 local-mac-address = [ 00 00 00 00 00 00 ]; 319 local-mac-address = [ 00 00 00 00 00 00 ];
276 interrupts = <37 2 38 2 39 2>; 320 interrupts = <37 2 38 2 39 2>;
277 interrupt-parent = <&mpic>; 321 interrupt-parent = <&mpic>;
322 tbi-handle = <&tbi3>;
278 phy-handle = <&phy3>; 323 phy-handle = <&phy3>;
279 phy-connection-type = "rgmii-id"; 324 phy-connection-type = "rgmii-id";
280 }; 325 };
diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
index d665e767822a..35d5e248ccd7 100644
--- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts
+++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
@@ -205,8 +205,49 @@
205 reg = <3>; 205 reg = <3>;
206 device_type = "ethernet-phy"; 206 device_type = "ethernet-phy";
207 }; 207 };
208 tbi0: tbi-phy@11 {
209 reg = <0x11>;
210 device_type = "tbi-phy";
211 };
212 };
213
214 mdio@25520 {
215 #address-cells = <1>;
216 #size-cells = <0>;
217 compatible = "fsl,gianfar-tbi";
218 reg = <0x25520 0x20>;
219
220 tbi1: tbi-phy@11 {
221 reg = <0x11>;
222 device_type = "tbi-phy";
223 };
224 };
225
226 mdio@26520 {
227 #address-cells = <1>;
228 #size-cells = <0>;
229 compatible = "fsl,gianfar-tbi";
230 reg = <0x26520 0x20>;
231
232 tbi2: tbi-phy@11 {
233 reg = <0x11>;
234 device_type = "tbi-phy";
235 };
236 };
237
238 mdio@27520 {
239 #address-cells = <1>;
240 #size-cells = <0>;
241 compatible = "fsl,gianfar-tbi";
242 reg = <0x27520 0x20>;
243
244 tbi3: tbi-phy@11 {
245 reg = <0x11>;
246 device_type = "tbi-phy";
247 };
208 }; 248 };
209 249
250
210 enet0: ethernet@24000 { 251 enet0: ethernet@24000 {
211 cell-index = <0>; 252 cell-index = <0>;
212 device_type = "network"; 253 device_type = "network";
@@ -216,6 +257,7 @@
216 local-mac-address = [ 00 00 00 00 00 00 ]; 257 local-mac-address = [ 00 00 00 00 00 00 ];
217 interrupts = <29 2 30 2 34 2>; 258 interrupts = <29 2 30 2 34 2>;
218 interrupt-parent = <&mpic>; 259 interrupt-parent = <&mpic>;
260 tbi-handle = <&tbi0>;
219 phy-handle = <&phy0>; 261 phy-handle = <&phy0>;
220 phy-connection-type = "rgmii-id"; 262 phy-connection-type = "rgmii-id";
221 }; 263 };
@@ -229,6 +271,7 @@
229 local-mac-address = [ 00 00 00 00 00 00 ]; 271 local-mac-address = [ 00 00 00 00 00 00 ];
230 interrupts = <35 2 36 2 40 2>; 272 interrupts = <35 2 36 2 40 2>;
231 interrupt-parent = <&mpic>; 273 interrupt-parent = <&mpic>;
274 tbi-handle = <&tbi1>;
232 phy-handle = <&phy1>; 275 phy-handle = <&phy1>;
233 phy-connection-type = "rgmii-id"; 276 phy-connection-type = "rgmii-id";
234 }; 277 };
@@ -242,6 +285,7 @@
242 local-mac-address = [ 00 00 00 00 00 00 ]; 285 local-mac-address = [ 00 00 00 00 00 00 ];
243 interrupts = <31 2 32 2 33 2>; 286 interrupts = <31 2 32 2 33 2>;
244 interrupt-parent = <&mpic>; 287 interrupt-parent = <&mpic>;
288 tbi-handle = <&tbi2>;
245 phy-handle = <&phy2>; 289 phy-handle = <&phy2>;
246 phy-connection-type = "rgmii-id"; 290 phy-connection-type = "rgmii-id";
247 }; 291 };
@@ -255,6 +299,7 @@
255 local-mac-address = [ 00 00 00 00 00 00 ]; 299 local-mac-address = [ 00 00 00 00 00 00 ];
256 interrupts = <37 2 38 2 39 2>; 300 interrupts = <37 2 38 2 39 2>;
257 interrupt-parent = <&mpic>; 301 interrupt-parent = <&mpic>;
302 tbi-handle = <&tbi3>;
258 phy-handle = <&phy3>; 303 phy-handle = <&phy3>;
259 phy-connection-type = "rgmii-id"; 304 phy-connection-type = "rgmii-id";
260 }; 305 };
diff --git a/arch/powerpc/boot/dts/sbc8349.dts b/arch/powerpc/boot/dts/sbc8349.dts
index 0f941f310e44..8d365a57ebc1 100644
--- a/arch/powerpc/boot/dts/sbc8349.dts
+++ b/arch/powerpc/boot/dts/sbc8349.dts
@@ -177,6 +177,22 @@
177 reg = <0x1a>; 177 reg = <0x1a>;
178 device_type = "ethernet-phy"; 178 device_type = "ethernet-phy";
179 }; 179 };
180 tbi0: tbi-phy@11 {
181 reg = <0x11>;
182 device_type = "tbi-phy";
183 };
184 };
185
186 mdio@25520 {
187 #address-cells = <1>;
188 #size-cells = <0>;
189 compatible = "fsl,gianfar-tbi";
190 reg = <0x25520 0x20>;
191
192 tbi1: tbi-phy@11 {
193 reg = <0x11>;
194 device_type = "tbi-phy";
195 };
180 }; 196 };
181 197
182 enet0: ethernet@24000 { 198 enet0: ethernet@24000 {
@@ -188,6 +204,7 @@
188 local-mac-address = [ 00 00 00 00 00 00 ]; 204 local-mac-address = [ 00 00 00 00 00 00 ];
189 interrupts = <32 0x8 33 0x8 34 0x8>; 205 interrupts = <32 0x8 33 0x8 34 0x8>;
190 interrupt-parent = <&ipic>; 206 interrupt-parent = <&ipic>;
207 tbi-handle = <&tbi0>;
191 phy-handle = <&phy0>; 208 phy-handle = <&phy0>;
192 linux,network-index = <0>; 209 linux,network-index = <0>;
193 }; 210 };
@@ -201,6 +218,7 @@
201 local-mac-address = [ 00 00 00 00 00 00 ]; 218 local-mac-address = [ 00 00 00 00 00 00 ];
202 interrupts = <35 0x8 36 0x8 37 0x8>; 219 interrupts = <35 0x8 36 0x8 37 0x8>;
203 interrupt-parent = <&ipic>; 220 interrupt-parent = <&ipic>;
221 tbi-handle = <&tbi1>;
204 phy-handle = <&phy1>; 222 phy-handle = <&phy1>;
205 linux,network-index = <1>; 223 linux,network-index = <1>;
206 }; 224 };
diff --git a/arch/powerpc/boot/dts/sbc8548.dts b/arch/powerpc/boot/dts/sbc8548.dts
index 333552b4e90d..2baf4a51f224 100644
--- a/arch/powerpc/boot/dts/sbc8548.dts
+++ b/arch/powerpc/boot/dts/sbc8548.dts
@@ -252,6 +252,22 @@
252 reg = <0x1a>; 252 reg = <0x1a>;
253 device_type = "ethernet-phy"; 253 device_type = "ethernet-phy";
254 }; 254 };
255 tbi0: tbi-phy@11 {
256 reg = <0x11>;
257 device_type = "tbi-phy";
258 };
259 };
260
261 mdio@25520 {
262 #address-cells = <1>;
263 #size-cells = <0>;
264 compatible = "fsl,gianfar-tbi";
265 reg = <0x25520 0x20>;
266
267 tbi1: tbi-phy@11 {
268 reg = <0x11>;
269 device_type = "tbi-phy";
270 };
255 }; 271 };
256 272
257 enet0: ethernet@24000 { 273 enet0: ethernet@24000 {
@@ -263,6 +279,7 @@
263 local-mac-address = [ 00 00 00 00 00 00 ]; 279 local-mac-address = [ 00 00 00 00 00 00 ];
264 interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>; 280 interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>;
265 interrupt-parent = <&mpic>; 281 interrupt-parent = <&mpic>;
282 tbi-handle = <&tbi0>;
266 phy-handle = <&phy0>; 283 phy-handle = <&phy0>;
267 }; 284 };
268 285
@@ -275,6 +292,7 @@
275 local-mac-address = [ 00 00 00 00 00 00 ]; 292 local-mac-address = [ 00 00 00 00 00 00 ];
276 interrupts = <0x23 0x2 0x24 0x2 0x28 0x2>; 293 interrupts = <0x23 0x2 0x24 0x2 0x28 0x2>;
277 interrupt-parent = <&mpic>; 294 interrupt-parent = <&mpic>;
295 tbi-handle = <&tbi1>;
278 phy-handle = <&phy1>; 296 phy-handle = <&phy1>;
279 }; 297 };
280 298
diff --git a/arch/powerpc/boot/dts/sbc8560.dts b/arch/powerpc/boot/dts/sbc8560.dts
index db3632ef9888..01542f7062ab 100644
--- a/arch/powerpc/boot/dts/sbc8560.dts
+++ b/arch/powerpc/boot/dts/sbc8560.dts
@@ -168,6 +168,22 @@
168 reg = <0x1c>; 168 reg = <0x1c>;
169 device_type = "ethernet-phy"; 169 device_type = "ethernet-phy";
170 }; 170 };
171 tbi0: tbi-phy@11 {
172 reg = <0x11>;
173 device_type = "tbi-phy";
174 };
175 };
176
177 mdio@25520 {
178 #address-cells = <1>;
179 #size-cells = <0>;
180 compatible = "fsl,gianfar-tbi";
181 reg = <0x25520 0x20>;
182
183 tbi1: tbi-phy@11 {
184 reg = <0x11>;
185 device_type = "tbi-phy";
186 };
171 }; 187 };
172 188
173 enet0: ethernet@24000 { 189 enet0: ethernet@24000 {
@@ -179,6 +195,7 @@
179 local-mac-address = [ 00 00 00 00 00 00 ]; 195 local-mac-address = [ 00 00 00 00 00 00 ];
180 interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>; 196 interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>;
181 interrupt-parent = <&mpic>; 197 interrupt-parent = <&mpic>;
198 tbi-handle = <&tbi0>;
182 phy-handle = <&phy0>; 199 phy-handle = <&phy0>;
183 }; 200 };
184 201
@@ -191,6 +208,7 @@
191 local-mac-address = [ 00 00 00 00 00 00 ]; 208 local-mac-address = [ 00 00 00 00 00 00 ];
192 interrupts = <0x23 0x2 0x24 0x2 0x28 0x2>; 209 interrupts = <0x23 0x2 0x24 0x2 0x28 0x2>;
193 interrupt-parent = <&mpic>; 210 interrupt-parent = <&mpic>;
211 tbi-handle = <&tbi1>;
194 phy-handle = <&phy1>; 212 phy-handle = <&phy1>;
195 }; 213 };
196 214
diff --git a/arch/powerpc/boot/dts/sbc8641d.dts b/arch/powerpc/boot/dts/sbc8641d.dts
index 9652456158fb..36db981548e4 100644
--- a/arch/powerpc/boot/dts/sbc8641d.dts
+++ b/arch/powerpc/boot/dts/sbc8641d.dts
@@ -222,6 +222,46 @@
222 reg = <2>; 222 reg = <2>;
223 device_type = "ethernet-phy"; 223 device_type = "ethernet-phy";
224 }; 224 };
225 tbi0: tbi-phy@11 {
226 reg = <0x11>;
227 device_type = "tbi-phy";
228 };
229 };
230
231 mdio@25520 {
232 #address-cells = <1>;
233 #size-cells = <0>;
234 compatible = "fsl,gianfar-tbi";
235 reg = <0x25520 0x20>;
236
237 tbi1: tbi-phy@11 {
238 reg = <0x11>;
239 device_type = "tbi-phy";
240 };
241 };
242
243 mdio@26520 {
244 #address-cells = <1>;
245 #size-cells = <0>;
246 compatible = "fsl,gianfar-tbi";
247 reg = <0x26520 0x20>;
248
249 tbi2: tbi-phy@11 {
250 reg = <0x11>;
251 device_type = "tbi-phy";
252 };
253 };
254
255 mdio@27520 {
256 #address-cells = <1>;
257 #size-cells = <0>;
258 compatible = "fsl,gianfar-tbi";
259 reg = <0x27520 0x20>;
260
261 tbi3: tbi-phy@11 {
262 reg = <0x11>;
263 device_type = "tbi-phy";
264 };
225 }; 265 };
226 266
227 enet0: ethernet@24000 { 267 enet0: ethernet@24000 {
@@ -233,6 +273,7 @@
233 local-mac-address = [ 00 00 00 00 00 00 ]; 273 local-mac-address = [ 00 00 00 00 00 00 ];
234 interrupts = <29 2 30 2 34 2>; 274 interrupts = <29 2 30 2 34 2>;
235 interrupt-parent = <&mpic>; 275 interrupt-parent = <&mpic>;
276 tbi-handle = <&tbi0>;
236 phy-handle = <&phy0>; 277 phy-handle = <&phy0>;
237 phy-connection-type = "rgmii-id"; 278 phy-connection-type = "rgmii-id";
238 }; 279 };
@@ -246,6 +287,7 @@
246 local-mac-address = [ 00 00 00 00 00 00 ]; 287 local-mac-address = [ 00 00 00 00 00 00 ];
247 interrupts = <35 2 36 2 40 2>; 288 interrupts = <35 2 36 2 40 2>;
248 interrupt-parent = <&mpic>; 289 interrupt-parent = <&mpic>;
290 tbi-handle = <&tbi1>;
249 phy-handle = <&phy1>; 291 phy-handle = <&phy1>;
250 phy-connection-type = "rgmii-id"; 292 phy-connection-type = "rgmii-id";
251 }; 293 };
@@ -259,6 +301,7 @@
259 local-mac-address = [ 00 00 00 00 00 00 ]; 301 local-mac-address = [ 00 00 00 00 00 00 ];
260 interrupts = <31 2 32 2 33 2>; 302 interrupts = <31 2 32 2 33 2>;
261 interrupt-parent = <&mpic>; 303 interrupt-parent = <&mpic>;
304 tbi-handle = <&tbi2>;
262 phy-handle = <&phy2>; 305 phy-handle = <&phy2>;
263 phy-connection-type = "rgmii-id"; 306 phy-connection-type = "rgmii-id";
264 }; 307 };
@@ -272,6 +315,7 @@
272 local-mac-address = [ 00 00 00 00 00 00 ]; 315 local-mac-address = [ 00 00 00 00 00 00 ];
273 interrupts = <37 2 38 2 39 2>; 316 interrupts = <37 2 38 2 39 2>;
274 interrupt-parent = <&mpic>; 317 interrupt-parent = <&mpic>;
318 tbi-handle = <&tbi3>;
275 phy-handle = <&phy3>; 319 phy-handle = <&phy3>;
276 phy-connection-type = "rgmii-id"; 320 phy-connection-type = "rgmii-id";
277 }; 321 };
diff --git a/arch/powerpc/boot/dts/stx_gp3_8560.dts b/arch/powerpc/boot/dts/stx_gp3_8560.dts
index fcd1db6ca0a8..fff33fe6efc6 100644
--- a/arch/powerpc/boot/dts/stx_gp3_8560.dts
+++ b/arch/powerpc/boot/dts/stx_gp3_8560.dts
@@ -142,6 +142,22 @@
142 reg = <4>; 142 reg = <4>;
143 device_type = "ethernet-phy"; 143 device_type = "ethernet-phy";
144 }; 144 };
145 tbi0: tbi-phy@11 {
146 reg = <0x11>;
147 device_type = "tbi-phy";
148 };
149 };
150
151 mdio@25520 {
152 #address-cells = <1>;
153 #size-cells = <0>;
154 compatible = "fsl,gianfar-tbi";
155 reg = <0x25520 0x20>;
156
157 tbi1: tbi-phy@11 {
158 reg = <0x11>;
159 device_type = "tbi-phy";
160 };
145 }; 161 };
146 162
147 enet0: ethernet@24000 { 163 enet0: ethernet@24000 {
@@ -153,6 +169,7 @@
153 local-mac-address = [ 00 00 00 00 00 00 ]; 169 local-mac-address = [ 00 00 00 00 00 00 ];
154 interrupts = <29 2 30 2 34 2>; 170 interrupts = <29 2 30 2 34 2>;
155 interrupt-parent = <&mpic>; 171 interrupt-parent = <&mpic>;
172 tbi-handle = <&tbi0>;
156 phy-handle = <&phy2>; 173 phy-handle = <&phy2>;
157 }; 174 };
158 175
@@ -165,6 +182,7 @@
165 local-mac-address = [ 00 00 00 00 00 00 ]; 182 local-mac-address = [ 00 00 00 00 00 00 ];
166 interrupts = <35 2 36 2 40 2>; 183 interrupts = <35 2 36 2 40 2>;
167 interrupt-parent = <&mpic>; 184 interrupt-parent = <&mpic>;
185 tbi-handle = <&tbi1>;
168 phy-handle = <&phy4>; 186 phy-handle = <&phy4>;
169 }; 187 };
170 188
diff --git a/arch/powerpc/boot/dts/tqm8540.dts b/arch/powerpc/boot/dts/tqm8540.dts
index e1d260b9085e..a693f01c21aa 100644
--- a/arch/powerpc/boot/dts/tqm8540.dts
+++ b/arch/powerpc/boot/dts/tqm8540.dts
@@ -155,6 +155,34 @@
155 reg = <3>; 155 reg = <3>;
156 device_type = "ethernet-phy"; 156 device_type = "ethernet-phy";
157 }; 157 };
158 tbi0: tbi-phy@11 {
159 reg = <0x11>;
160 device_type = "tbi-phy";
161 };
162 };
163
164 mdio@25520 {
165 #address-cells = <1>;
166 #size-cells = <0>;
167 compatible = "fsl,gianfar-tbi";
168 reg = <0x25520 0x20>;
169
170 tbi1: tbi-phy@11 {
171 reg = <0x11>;
172 device_type = "tbi-phy";
173 };
174 };
175
176 mdio@26520 {
177 #address-cells = <1>;
178 #size-cells = <0>;
179 compatible = "fsl,gianfar-tbi";
180 reg = <0x26520 0x20>;
181
182 tbi2: tbi-phy@11 {
183 reg = <0x11>;
184 device_type = "tbi-phy";
185 };
158 }; 186 };
159 187
160 enet0: ethernet@24000 { 188 enet0: ethernet@24000 {
diff --git a/arch/powerpc/boot/dts/tqm8541.dts b/arch/powerpc/boot/dts/tqm8541.dts
index d76441ec5dc7..9e3f5f0dde20 100644
--- a/arch/powerpc/boot/dts/tqm8541.dts
+++ b/arch/powerpc/boot/dts/tqm8541.dts
@@ -154,6 +154,22 @@
154 reg = <3>; 154 reg = <3>;
155 device_type = "ethernet-phy"; 155 device_type = "ethernet-phy";
156 }; 156 };
157 tbi0: tbi-phy@11 {
158 reg = <0x11>;
159 device_type = "tbi-phy";
160 };
161 };
162
163 mdio@25520 {
164 #address-cells = <1>;
165 #size-cells = <0>;
166 compatible = "fsl,gianfar-tbi";
167 reg = <0x25520 0x20>;
168
169 tbi1: tbi-phy@11 {
170 reg = <0x11>;
171 device_type = "tbi-phy";
172 };
157 }; 173 };
158 174
159 enet0: ethernet@24000 { 175 enet0: ethernet@24000 {
@@ -165,6 +181,7 @@
165 local-mac-address = [ 00 00 00 00 00 00 ]; 181 local-mac-address = [ 00 00 00 00 00 00 ];
166 interrupts = <29 2 30 2 34 2>; 182 interrupts = <29 2 30 2 34 2>;
167 interrupt-parent = <&mpic>; 183 interrupt-parent = <&mpic>;
184 tbi-handle = <&tbi0>;
168 phy-handle = <&phy2>; 185 phy-handle = <&phy2>;
169 }; 186 };
170 187
@@ -177,6 +194,7 @@
177 local-mac-address = [ 00 00 00 00 00 00 ]; 194 local-mac-address = [ 00 00 00 00 00 00 ];
178 interrupts = <35 2 36 2 40 2>; 195 interrupts = <35 2 36 2 40 2>;
179 interrupt-parent = <&mpic>; 196 interrupt-parent = <&mpic>;
197 tbi-handle = <&tbi1>;
180 phy-handle = <&phy1>; 198 phy-handle = <&phy1>;
181 }; 199 };
182 200
diff --git a/arch/powerpc/boot/dts/tqm8548-bigflash.dts b/arch/powerpc/boot/dts/tqm8548-bigflash.dts
index 4199e89b4e50..15086eb65c50 100644
--- a/arch/powerpc/boot/dts/tqm8548-bigflash.dts
+++ b/arch/powerpc/boot/dts/tqm8548-bigflash.dts
@@ -179,6 +179,46 @@
179 reg = <5>; 179 reg = <5>;
180 device_type = "ethernet-phy"; 180 device_type = "ethernet-phy";
181 }; 181 };
182 tbi0: tbi-phy@11 {
183 reg = <0x11>;
184 device_type = "tbi-phy";
185 };
186 };
187
188 mdio@25520 {
189 #address-cells = <1>;
190 #size-cells = <0>;
191 compatible = "fsl,gianfar-tbi";
192 reg = <0x25520 0x20>;
193
194 tbi1: tbi-phy@11 {
195 reg = <0x11>;
196 device_type = "tbi-phy";
197 };
198 };
199
200 mdio@26520 {
201 #address-cells = <1>;
202 #size-cells = <0>;
203 compatible = "fsl,gianfar-tbi";
204 reg = <0x26520 0x20>;
205
206 tbi2: tbi-phy@11 {
207 reg = <0x11>;
208 device_type = "tbi-phy";
209 };
210 };
211
212 mdio@27520 {
213 #address-cells = <1>;
214 #size-cells = <0>;
215 compatible = "fsl,gianfar-tbi";
216 reg = <0x27520 0x20>;
217
218 tbi3: tbi-phy@11 {
219 reg = <0x11>;
220 device_type = "tbi-phy";
221 };
182 }; 222 };
183 223
184 enet0: ethernet@24000 { 224 enet0: ethernet@24000 {
@@ -190,6 +230,7 @@
190 local-mac-address = [ 00 00 00 00 00 00 ]; 230 local-mac-address = [ 00 00 00 00 00 00 ];
191 interrupts = <29 2 30 2 34 2>; 231 interrupts = <29 2 30 2 34 2>;
192 interrupt-parent = <&mpic>; 232 interrupt-parent = <&mpic>;
233 tbi-handle = <&tbi0>;
193 phy-handle = <&phy2>; 234 phy-handle = <&phy2>;
194 }; 235 };
195 236
@@ -202,6 +243,7 @@
202 local-mac-address = [ 00 00 00 00 00 00 ]; 243 local-mac-address = [ 00 00 00 00 00 00 ];
203 interrupts = <35 2 36 2 40 2>; 244 interrupts = <35 2 36 2 40 2>;
204 interrupt-parent = <&mpic>; 245 interrupt-parent = <&mpic>;
246 tbi-handle = <&tbi1>;
205 phy-handle = <&phy1>; 247 phy-handle = <&phy1>;
206 }; 248 };
207 249
@@ -214,6 +256,7 @@
214 local-mac-address = [ 00 00 00 00 00 00 ]; 256 local-mac-address = [ 00 00 00 00 00 00 ];
215 interrupts = <31 2 32 2 33 2>; 257 interrupts = <31 2 32 2 33 2>;
216 interrupt-parent = <&mpic>; 258 interrupt-parent = <&mpic>;
259 tbi-handle = <&tbi2>;
217 phy-handle = <&phy3>; 260 phy-handle = <&phy3>;
218 }; 261 };
219 262
@@ -226,6 +269,7 @@
226 local-mac-address = [ 00 00 00 00 00 00 ]; 269 local-mac-address = [ 00 00 00 00 00 00 ];
227 interrupts = <37 2 38 2 39 2>; 270 interrupts = <37 2 38 2 39 2>;
228 interrupt-parent = <&mpic>; 271 interrupt-parent = <&mpic>;
272 tbi-handle = <&tbi3>;
229 phy-handle = <&phy4>; 273 phy-handle = <&phy4>;
230 }; 274 };
231 275
diff --git a/arch/powerpc/boot/dts/tqm8548.dts b/arch/powerpc/boot/dts/tqm8548.dts
index 58ee4185454b..b7b65f5e79b6 100644
--- a/arch/powerpc/boot/dts/tqm8548.dts
+++ b/arch/powerpc/boot/dts/tqm8548.dts
@@ -179,6 +179,46 @@
179 reg = <5>; 179 reg = <5>;
180 device_type = "ethernet-phy"; 180 device_type = "ethernet-phy";
181 }; 181 };
182 tbi0: tbi-phy@11 {
183 reg = <0x11>;
184 device_type = "tbi-phy";
185 };
186 };
187
188 mdio@25520 {
189 #address-cells = <1>;
190 #size-cells = <0>;
191 compatible = "fsl,gianfar-tbi";
192 reg = <0x25520 0x20>;
193
194 tbi1: tbi-phy@11 {
195 reg = <0x11>;
196 device_type = "tbi-phy";
197 };
198 };
199
200 mdio@26520 {
201 #address-cells = <1>;
202 #size-cells = <0>;
203 compatible = "fsl,gianfar-tbi";
204 reg = <0x26520 0x20>;
205
206 tbi2: tbi-phy@11 {
207 reg = <0x11>;
208 device_type = "tbi-phy";
209 };
210 };
211
212 mdio@27520 {
213 #address-cells = <1>;
214 #size-cells = <0>;
215 compatible = "fsl,gianfar-tbi";
216 reg = <0x27520 0x20>;
217
218 tbi3: tbi-phy@11 {
219 reg = <0x11>;
220 device_type = "tbi-phy";
221 };
182 }; 222 };
183 223
184 enet0: ethernet@24000 { 224 enet0: ethernet@24000 {
@@ -190,6 +230,7 @@
190 local-mac-address = [ 00 00 00 00 00 00 ]; 230 local-mac-address = [ 00 00 00 00 00 00 ];
191 interrupts = <29 2 30 2 34 2>; 231 interrupts = <29 2 30 2 34 2>;
192 interrupt-parent = <&mpic>; 232 interrupt-parent = <&mpic>;
233 tbi-handle = <&tbi0>;
193 phy-handle = <&phy2>; 234 phy-handle = <&phy2>;
194 }; 235 };
195 236
@@ -202,6 +243,7 @@
202 local-mac-address = [ 00 00 00 00 00 00 ]; 243 local-mac-address = [ 00 00 00 00 00 00 ];
203 interrupts = <35 2 36 2 40 2>; 244 interrupts = <35 2 36 2 40 2>;
204 interrupt-parent = <&mpic>; 245 interrupt-parent = <&mpic>;
246 tbi-handle = <&tbi1>;
205 phy-handle = <&phy1>; 247 phy-handle = <&phy1>;
206 }; 248 };
207 249
@@ -214,6 +256,7 @@
214 local-mac-address = [ 00 00 00 00 00 00 ]; 256 local-mac-address = [ 00 00 00 00 00 00 ];
215 interrupts = <31 2 32 2 33 2>; 257 interrupts = <31 2 32 2 33 2>;
216 interrupt-parent = <&mpic>; 258 interrupt-parent = <&mpic>;
259 tbi-handle = <&tbi2>;
217 phy-handle = <&phy3>; 260 phy-handle = <&phy3>;
218 }; 261 };
219 262
@@ -226,6 +269,7 @@
226 local-mac-address = [ 00 00 00 00 00 00 ]; 269 local-mac-address = [ 00 00 00 00 00 00 ];
227 interrupts = <37 2 38 2 39 2>; 270 interrupts = <37 2 38 2 39 2>;
228 interrupt-parent = <&mpic>; 271 interrupt-parent = <&mpic>;
272 tbi-handle = <&tbi3>;
229 phy-handle = <&phy4>; 273 phy-handle = <&phy4>;
230 }; 274 };
231 275
diff --git a/arch/powerpc/boot/dts/tqm8555.dts b/arch/powerpc/boot/dts/tqm8555.dts
index 6f7ea59c4846..cf92b4e7945e 100644
--- a/arch/powerpc/boot/dts/tqm8555.dts
+++ b/arch/powerpc/boot/dts/tqm8555.dts
@@ -154,6 +154,22 @@
154 reg = <3>; 154 reg = <3>;
155 device_type = "ethernet-phy"; 155 device_type = "ethernet-phy";
156 }; 156 };
157 tbi0: tbi-phy@11 {
158 reg = <0x11>;
159 device_type = "tbi-phy";
160 };
161 };
162
163 mdio@25520 {
164 #address-cells = <1>;
165 #size-cells = <0>;
166 compatible = "fsl,gianfar-tbi";
167 reg = <0x25520 0x20>;
168
169 tbi1: tbi-phy@11 {
170 reg = <0x11>;
171 device_type = "tbi-phy";
172 };
157 }; 173 };
158 174
159 enet0: ethernet@24000 { 175 enet0: ethernet@24000 {
@@ -165,6 +181,7 @@
165 local-mac-address = [ 00 00 00 00 00 00 ]; 181 local-mac-address = [ 00 00 00 00 00 00 ];
166 interrupts = <29 2 30 2 34 2>; 182 interrupts = <29 2 30 2 34 2>;
167 interrupt-parent = <&mpic>; 183 interrupt-parent = <&mpic>;
184 tbi-handle = <&tbi0>;
168 phy-handle = <&phy2>; 185 phy-handle = <&phy2>;
169 }; 186 };
170 187
@@ -177,6 +194,7 @@
177 local-mac-address = [ 00 00 00 00 00 00 ]; 194 local-mac-address = [ 00 00 00 00 00 00 ];
178 interrupts = <35 2 36 2 40 2>; 195 interrupts = <35 2 36 2 40 2>;
179 interrupt-parent = <&mpic>; 196 interrupt-parent = <&mpic>;
197 tbi-handle = <&tbi1>;
180 phy-handle = <&phy1>; 198 phy-handle = <&phy1>;
181 }; 199 };
182 200
diff --git a/arch/powerpc/boot/dts/tqm8560.dts b/arch/powerpc/boot/dts/tqm8560.dts
index 3fe35208907b..9e1ab2d2f669 100644
--- a/arch/powerpc/boot/dts/tqm8560.dts
+++ b/arch/powerpc/boot/dts/tqm8560.dts
@@ -156,6 +156,22 @@
156 reg = <3>; 156 reg = <3>;
157 device_type = "ethernet-phy"; 157 device_type = "ethernet-phy";
158 }; 158 };
159 tbi0: tbi-phy@11 {
160 reg = <0x11>;
161 device_type = "tbi-phy";
162 };
163 };
164
165 mdio@25520 {
166 #address-cells = <1>;
167 #size-cells = <0>;
168 compatible = "fsl,gianfar-tbi";
169 reg = <0x25520 0x20>;
170
171 tbi1: tbi-phy@11 {
172 reg = <0x11>;
173 device_type = "tbi-phy";
174 };
159 }; 175 };
160 176
161 enet0: ethernet@24000 { 177 enet0: ethernet@24000 {
@@ -167,6 +183,7 @@
167 local-mac-address = [ 00 00 00 00 00 00 ]; 183 local-mac-address = [ 00 00 00 00 00 00 ];
168 interrupts = <29 2 30 2 34 2>; 184 interrupts = <29 2 30 2 34 2>;
169 interrupt-parent = <&mpic>; 185 interrupt-parent = <&mpic>;
186 tbi-handle = <&tbi0>;
170 phy-handle = <&phy2>; 187 phy-handle = <&phy2>;
171 }; 188 };
172 189
@@ -179,6 +196,7 @@
179 local-mac-address = [ 00 00 00 00 00 00 ]; 196 local-mac-address = [ 00 00 00 00 00 00 ];
180 interrupts = <35 2 36 2 40 2>; 197 interrupts = <35 2 36 2 40 2>;
181 interrupt-parent = <&mpic>; 198 interrupt-parent = <&mpic>;
199 tbi-handle = <&tbi1>;
182 phy-handle = <&phy1>; 200 phy-handle = <&phy1>;
183 }; 201 };
184 202
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 26ecb96f9731..115cb16351fd 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -207,236 +207,51 @@ static int __init of_add_fixed_phys(void)
207arch_initcall(of_add_fixed_phys); 207arch_initcall(of_add_fixed_phys);
208#endif /* CONFIG_FIXED_PHY */ 208#endif /* CONFIG_FIXED_PHY */
209 209
210static int gfar_mdio_of_init_one(struct device_node *np) 210#ifdef CONFIG_PPC_83xx
211{ 211static int __init mpc83xx_wdt_init(void)
212 int k;
213 struct device_node *child = NULL;
214 struct gianfar_mdio_data mdio_data;
215 struct platform_device *mdio_dev;
216 struct resource res;
217 int ret;
218
219 memset(&res, 0, sizeof(res));
220 memset(&mdio_data, 0, sizeof(mdio_data));
221
222 ret = of_address_to_resource(np, 0, &res);
223 if (ret)
224 return ret;
225
226 /* The gianfar device will try to use the same ID created below to find
227 * this bus, to coordinate register access (since they share). */
228 mdio_dev = platform_device_register_simple("fsl-gianfar_mdio",
229 res.start&0xfffff, &res, 1);
230 if (IS_ERR(mdio_dev))
231 return PTR_ERR(mdio_dev);
232
233 for (k = 0; k < 32; k++)
234 mdio_data.irq[k] = PHY_POLL;
235
236 while ((child = of_get_next_child(np, child)) != NULL) {
237 int irq = irq_of_parse_and_map(child, 0);
238 if (irq != NO_IRQ) {
239 const u32 *id = of_get_property(child, "reg", NULL);
240 mdio_data.irq[*id] = irq;
241 }
242 }
243
244 ret = platform_device_add_data(mdio_dev, &mdio_data,
245 sizeof(struct gianfar_mdio_data));
246 if (ret)
247 platform_device_unregister(mdio_dev);
248
249 return ret;
250}
251
252static int __init gfar_mdio_of_init(void)
253{
254 struct device_node *np = NULL;
255
256 for_each_compatible_node(np, NULL, "fsl,gianfar-mdio")
257 gfar_mdio_of_init_one(np);
258
259 /* try the deprecated version */
260 for_each_compatible_node(np, "mdio", "gianfar");
261 gfar_mdio_of_init_one(np);
262
263 return 0;
264}
265
266arch_initcall(gfar_mdio_of_init);
267
268static const char *gfar_tx_intr = "tx";
269static const char *gfar_rx_intr = "rx";
270static const char *gfar_err_intr = "error";
271
272static int __init gfar_of_init(void)
273{ 212{
213 struct resource r;
274 struct device_node *np; 214 struct device_node *np;
275 unsigned int i; 215 struct platform_device *dev;
276 struct platform_device *gfar_dev; 216 u32 freq = fsl_get_sys_freq();
277 struct resource res;
278 int ret; 217 int ret;
279 218
280 for (np = NULL, i = 0; 219 np = of_find_compatible_node(NULL, "watchdog", "mpc83xx_wdt");
281 (np = of_find_compatible_node(np, "network", "gianfar")) != NULL;
282 i++) {
283 struct resource r[4];
284 struct device_node *phy, *mdio;
285 struct gianfar_platform_data gfar_data;
286 const unsigned int *id;
287 const char *model;
288 const char *ctype;
289 const void *mac_addr;
290 const phandle *ph;
291 int n_res = 2;
292
293 if (!of_device_is_available(np))
294 continue;
295
296 memset(r, 0, sizeof(r));
297 memset(&gfar_data, 0, sizeof(gfar_data));
298
299 ret = of_address_to_resource(np, 0, &r[0]);
300 if (ret)
301 goto err;
302
303 of_irq_to_resource(np, 0, &r[1]);
304
305 model = of_get_property(np, "model", NULL);
306
307 /* If we aren't the FEC we have multiple interrupts */
308 if (model && strcasecmp(model, "FEC")) {
309 r[1].name = gfar_tx_intr;
310
311 r[2].name = gfar_rx_intr;
312 of_irq_to_resource(np, 1, &r[2]);
313 220
314 r[3].name = gfar_err_intr; 221 if (!np) {
315 of_irq_to_resource(np, 2, &r[3]); 222 ret = -ENODEV;
316 223 goto nodev;
317 n_res += 2; 224 }
318 }
319
320 gfar_dev =
321 platform_device_register_simple("fsl-gianfar", i, &r[0],
322 n_res);
323
324 if (IS_ERR(gfar_dev)) {
325 ret = PTR_ERR(gfar_dev);
326 goto err;
327 }
328
329 mac_addr = of_get_mac_address(np);
330 if (mac_addr)
331 memcpy(gfar_data.mac_addr, mac_addr, 6);
332
333 if (model && !strcasecmp(model, "TSEC"))
334 gfar_data.device_flags =
335 FSL_GIANFAR_DEV_HAS_GIGABIT |
336 FSL_GIANFAR_DEV_HAS_COALESCE |
337 FSL_GIANFAR_DEV_HAS_RMON |
338 FSL_GIANFAR_DEV_HAS_MULTI_INTR;
339 if (model && !strcasecmp(model, "eTSEC"))
340 gfar_data.device_flags =
341 FSL_GIANFAR_DEV_HAS_GIGABIT |
342 FSL_GIANFAR_DEV_HAS_COALESCE |
343 FSL_GIANFAR_DEV_HAS_RMON |
344 FSL_GIANFAR_DEV_HAS_MULTI_INTR |
345 FSL_GIANFAR_DEV_HAS_CSUM |
346 FSL_GIANFAR_DEV_HAS_VLAN |
347 FSL_GIANFAR_DEV_HAS_EXTENDED_HASH;
348
349 ctype = of_get_property(np, "phy-connection-type", NULL);
350
351 /* We only care about rgmii-id. The rest are autodetected */
352 if (ctype && !strcmp(ctype, "rgmii-id"))
353 gfar_data.interface = PHY_INTERFACE_MODE_RGMII_ID;
354 else
355 gfar_data.interface = PHY_INTERFACE_MODE_MII;
356
357 if (of_get_property(np, "fsl,magic-packet", NULL))
358 gfar_data.device_flags |= FSL_GIANFAR_DEV_HAS_MAGIC_PACKET;
359
360 ph = of_get_property(np, "phy-handle", NULL);
361 if (ph == NULL) {
362 u32 *fixed_link;
363
364 fixed_link = (u32 *)of_get_property(np, "fixed-link",
365 NULL);
366 if (!fixed_link) {
367 ret = -ENODEV;
368 goto unreg;
369 }
370
371 snprintf(gfar_data.bus_id, MII_BUS_ID_SIZE, "0");
372 gfar_data.phy_id = fixed_link[0];
373 } else {
374 phy = of_find_node_by_phandle(*ph);
375
376 if (phy == NULL) {
377 ret = -ENODEV;
378 goto unreg;
379 }
380
381 mdio = of_get_parent(phy);
382
383 id = of_get_property(phy, "reg", NULL);
384 ret = of_address_to_resource(mdio, 0, &res);
385 if (ret) {
386 of_node_put(phy);
387 of_node_put(mdio);
388 goto unreg;
389 }
390
391 gfar_data.phy_id = *id;
392 snprintf(gfar_data.bus_id, MII_BUS_ID_SIZE, "%llx",
393 (unsigned long long)res.start&0xfffff);
394 225
395 of_node_put(phy); 226 memset(&r, 0, sizeof(r));
396 of_node_put(mdio);
397 }
398 227
399 /* Get MDIO bus controlled by this eTSEC, if any. Normally only 228 ret = of_address_to_resource(np, 0, &r);
400 * eTSEC 1 will control an MDIO bus, not necessarily the same 229 if (ret)
401 * bus that its PHY is on ('mdio' above), so we can't just use 230 goto err;
402 * that. What we do is look for a gianfar mdio device that has
403 * overlapping registers with this device. That's really the
404 * whole point, to find the device sharing our registers to
405 * coordinate access with it.
406 */
407 for_each_compatible_node(mdio, NULL, "fsl,gianfar-mdio") {
408 if (of_address_to_resource(mdio, 0, &res))
409 continue;
410
411 if (res.start >= r[0].start && res.end <= r[0].end) {
412 /* Get the ID the mdio bus platform device was
413 * registered with. gfar_data.bus_id is
414 * different because it's for finding a PHY,
415 * while this is for finding a MII bus.
416 */
417 gfar_data.mdio_bus = res.start&0xfffff;
418 of_node_put(mdio);
419 break;
420 }
421 }
422 231
423 ret = 232 dev = platform_device_register_simple("mpc83xx_wdt", 0, &r, 1);
424 platform_device_add_data(gfar_dev, &gfar_data, 233 if (IS_ERR(dev)) {
425 sizeof(struct 234 ret = PTR_ERR(dev);
426 gianfar_platform_data)); 235 goto err;
427 if (ret)
428 goto unreg;
429 } 236 }
430 237
238 ret = platform_device_add_data(dev, &freq, sizeof(freq));
239 if (ret)
240 goto unreg;
241
242 of_node_put(np);
431 return 0; 243 return 0;
432 244
433unreg: 245unreg:
434 platform_device_unregister(gfar_dev); 246 platform_device_unregister(dev);
435err: 247err:
248 of_node_put(np);
249nodev:
436 return ret; 250 return ret;
437} 251}
438 252
439arch_initcall(gfar_of_init); 253arch_initcall(mpc83xx_wdt_init);
254#endif
440 255
441static enum fsl_usb2_phy_modes determine_usb_phy(const char *phy_type) 256static enum fsl_usb2_phy_modes determine_usb_phy(const char *phy_type)
442{ 257{
diff --git a/arch/s390/appldata/appldata_net_sum.c b/arch/s390/appldata/appldata_net_sum.c
index 3b746556e1a3..fa741f84c5b9 100644
--- a/arch/s390/appldata/appldata_net_sum.c
+++ b/arch/s390/appldata/appldata_net_sum.c
@@ -67,7 +67,6 @@ static void appldata_get_net_sum_data(void *data)
67 int i; 67 int i;
68 struct appldata_net_sum_data *net_data; 68 struct appldata_net_sum_data *net_data;
69 struct net_device *dev; 69 struct net_device *dev;
70 struct net_device_stats *stats;
71 unsigned long rx_packets, tx_packets, rx_bytes, tx_bytes, rx_errors, 70 unsigned long rx_packets, tx_packets, rx_bytes, tx_bytes, rx_errors,
72 tx_errors, rx_dropped, tx_dropped, collisions; 71 tx_errors, rx_dropped, tx_dropped, collisions;
73 72
@@ -86,7 +85,8 @@ static void appldata_get_net_sum_data(void *data)
86 collisions = 0; 85 collisions = 0;
87 read_lock(&dev_base_lock); 86 read_lock(&dev_base_lock);
88 for_each_netdev(&init_net, dev) { 87 for_each_netdev(&init_net, dev) {
89 stats = dev->get_stats(dev); 88 const struct net_device_stats *stats = dev_get_stats(dev);
89
90 rx_packets += stats->rx_packets; 90 rx_packets += stats->rx_packets;
91 tx_packets += stats->tx_packets; 91 tx_packets += stats->tx_packets;
92 rx_bytes += stats->rx_bytes; 92 rx_bytes += stats->rx_bytes;
diff --git a/arch/sparc64/kernel/idprom.c b/arch/sparc64/kernel/idprom.c
index 5b45a808c621..a62ff83337cd 100644
--- a/arch/sparc64/kernel/idprom.c
+++ b/arch/sparc64/kernel/idprom.c
@@ -42,8 +42,5 @@ void __init idprom_init(void)
42 idprom->id_cksum, calc_idprom_cksum(idprom)); 42 idprom->id_cksum, calc_idprom_cksum(idprom));
43 } 43 }
44 44
45 printk("Ethernet address: %02x:%02x:%02x:%02x:%02x:%02x\n", 45 printk("Ethernet address: %pM\n", idprom->id_ethaddr);
46 idprom->id_ethaddr[0], idprom->id_ethaddr[1],
47 idprom->id_ethaddr[2], idprom->id_ethaddr[3],
48 idprom->id_ethaddr[4], idprom->id_ethaddr[5]);
49} 46}
diff --git a/arch/um/drivers/daemon_kern.c b/arch/um/drivers/daemon_kern.c
index d53ff52bb404..b4a1522f2157 100644
--- a/arch/um/drivers/daemon_kern.c
+++ b/arch/um/drivers/daemon_kern.c
@@ -22,7 +22,7 @@ static void daemon_init(struct net_device *dev, void *data)
22 struct daemon_data *dpri; 22 struct daemon_data *dpri;
23 struct daemon_init *init = data; 23 struct daemon_init *init = data;
24 24
25 pri = dev->priv; 25 pri = netdev_priv(dev);
26 dpri = (struct daemon_data *) pri->user; 26 dpri = (struct daemon_data *) pri->user;
27 dpri->sock_type = init->sock_type; 27 dpri->sock_type = init->sock_type;
28 dpri->ctl_sock = init->ctl_sock; 28 dpri->ctl_sock = init->ctl_sock;
diff --git a/arch/um/drivers/mcast_kern.c b/arch/um/drivers/mcast_kern.c
index 8c4378a76d63..ffc6416d5ed7 100644
--- a/arch/um/drivers/mcast_kern.c
+++ b/arch/um/drivers/mcast_kern.c
@@ -28,7 +28,7 @@ static void mcast_init(struct net_device *dev, void *data)
28 struct mcast_data *dpri; 28 struct mcast_data *dpri;
29 struct mcast_init *init = data; 29 struct mcast_init *init = data;
30 30
31 pri = dev->priv; 31 pri = netdev_priv(dev);
32 dpri = (struct mcast_data *) pri->user; 32 dpri = (struct mcast_data *) pri->user;
33 dpri->addr = init->addr; 33 dpri->addr = init->addr;
34 dpri->port = init->port; 34 dpri->port = init->port;
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index 5b4ca8d93682..fde510b664d3 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -76,7 +76,7 @@ out:
76 76
77static int uml_net_rx(struct net_device *dev) 77static int uml_net_rx(struct net_device *dev)
78{ 78{
79 struct uml_net_private *lp = dev->priv; 79 struct uml_net_private *lp = netdev_priv(dev);
80 int pkt_len; 80 int pkt_len;
81 struct sk_buff *skb; 81 struct sk_buff *skb;
82 82
@@ -119,7 +119,7 @@ static void uml_dev_close(struct work_struct *work)
119static irqreturn_t uml_net_interrupt(int irq, void *dev_id) 119static irqreturn_t uml_net_interrupt(int irq, void *dev_id)
120{ 120{
121 struct net_device *dev = dev_id; 121 struct net_device *dev = dev_id;
122 struct uml_net_private *lp = dev->priv; 122 struct uml_net_private *lp = netdev_priv(dev);
123 int err; 123 int err;
124 124
125 if (!netif_running(dev)) 125 if (!netif_running(dev))
@@ -150,7 +150,7 @@ out:
150 150
151static int uml_net_open(struct net_device *dev) 151static int uml_net_open(struct net_device *dev)
152{ 152{
153 struct uml_net_private *lp = dev->priv; 153 struct uml_net_private *lp = netdev_priv(dev);
154 int err; 154 int err;
155 155
156 if (lp->fd >= 0) { 156 if (lp->fd >= 0) {
@@ -195,7 +195,7 @@ out:
195 195
196static int uml_net_close(struct net_device *dev) 196static int uml_net_close(struct net_device *dev)
197{ 197{
198 struct uml_net_private *lp = dev->priv; 198 struct uml_net_private *lp = netdev_priv(dev);
199 199
200 netif_stop_queue(dev); 200 netif_stop_queue(dev);
201 201
@@ -213,7 +213,7 @@ static int uml_net_close(struct net_device *dev)
213 213
214static int uml_net_start_xmit(struct sk_buff *skb, struct net_device *dev) 214static int uml_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
215{ 215{
216 struct uml_net_private *lp = dev->priv; 216 struct uml_net_private *lp = netdev_priv(dev);
217 unsigned long flags; 217 unsigned long flags;
218 int len; 218 int len;
219 219
@@ -250,7 +250,7 @@ static int uml_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
250 250
251static struct net_device_stats *uml_net_get_stats(struct net_device *dev) 251static struct net_device_stats *uml_net_get_stats(struct net_device *dev)
252{ 252{
253 struct uml_net_private *lp = dev->priv; 253 struct uml_net_private *lp = netdev_priv(dev);
254 return &lp->stats; 254 return &lp->stats;
255} 255}
256 256
@@ -267,7 +267,7 @@ static void uml_net_tx_timeout(struct net_device *dev)
267 267
268static int uml_net_set_mac(struct net_device *dev, void *addr) 268static int uml_net_set_mac(struct net_device *dev, void *addr)
269{ 269{
270 struct uml_net_private *lp = dev->priv; 270 struct uml_net_private *lp = netdev_priv(dev);
271 struct sockaddr *hwaddr = addr; 271 struct sockaddr *hwaddr = addr;
272 272
273 spin_lock_irq(&lp->lock); 273 spin_lock_irq(&lp->lock);
@@ -368,7 +368,7 @@ static void net_device_release(struct device *dev)
368{ 368{
369 struct uml_net *device = dev->driver_data; 369 struct uml_net *device = dev->driver_data;
370 struct net_device *netdev = device->dev; 370 struct net_device *netdev = device->dev;
371 struct uml_net_private *lp = netdev->priv; 371 struct uml_net_private *lp = netdev_priv(netdev);
372 372
373 if (lp->remove != NULL) 373 if (lp->remove != NULL)
374 (*lp->remove)(&lp->user); 374 (*lp->remove)(&lp->user);
@@ -418,14 +418,9 @@ static void eth_configure(int n, void *init, char *mac,
418 418
419 setup_etheraddr(mac, device->mac, dev->name); 419 setup_etheraddr(mac, device->mac, dev->name);
420 420
421 printk(KERN_INFO "Netdevice %d ", n); 421 printk(KERN_INFO "Netdevice %d (%pM) : ", n, device->mac);
422 printk("(%02x:%02x:%02x:%02x:%02x:%02x) ",
423 device->mac[0], device->mac[1],
424 device->mac[2], device->mac[3],
425 device->mac[4], device->mac[5]);
426 printk(": ");
427 422
428 lp = dev->priv; 423 lp = netdev_priv(dev);
429 /* This points to the transport private data. It's still clear, but we 424 /* This points to the transport private data. It's still clear, but we
430 * must memset it to 0 *now*. Let's help the drivers. */ 425 * must memset it to 0 *now*. Let's help the drivers. */
431 memset(lp, 0, size); 426 memset(lp, 0, size);
@@ -735,7 +730,7 @@ static int net_remove(int n, char **error_out)
735 return -ENODEV; 730 return -ENODEV;
736 731
737 dev = device->dev; 732 dev = device->dev;
738 lp = dev->priv; 733 lp = netdev_priv(dev);
739 if (lp->fd > 0) 734 if (lp->fd > 0)
740 return -EBUSY; 735 return -EBUSY;
741 unregister_netdev(dev); 736 unregister_netdev(dev);
@@ -766,7 +761,7 @@ static int uml_inetaddr_event(struct notifier_block *this, unsigned long event,
766 if (dev->open != uml_net_open) 761 if (dev->open != uml_net_open)
767 return NOTIFY_DONE; 762 return NOTIFY_DONE;
768 763
769 lp = dev->priv; 764 lp = netdev_priv(dev);
770 765
771 proc = NULL; 766 proc = NULL;
772 switch (event) { 767 switch (event) {
diff --git a/arch/um/drivers/pcap_kern.c b/arch/um/drivers/pcap_kern.c
index 3a750dd39be1..2860525f8ff6 100644
--- a/arch/um/drivers/pcap_kern.c
+++ b/arch/um/drivers/pcap_kern.c
@@ -21,7 +21,7 @@ void pcap_init(struct net_device *dev, void *data)
21 struct pcap_data *ppri; 21 struct pcap_data *ppri;
22 struct pcap_init *init = data; 22 struct pcap_init *init = data;
23 23
24 pri = dev->priv; 24 pri = netdev_priv(dev);
25 ppri = (struct pcap_data *) pri->user; 25 ppri = (struct pcap_data *) pri->user;
26 ppri->host_if = init->host_if; 26 ppri->host_if = init->host_if;
27 ppri->promisc = init->promisc; 27 ppri->promisc = init->promisc;
diff --git a/arch/um/drivers/slip_kern.c b/arch/um/drivers/slip_kern.c
index d19faec7046e..5ec17563142e 100644
--- a/arch/um/drivers/slip_kern.c
+++ b/arch/um/drivers/slip_kern.c
@@ -19,7 +19,7 @@ static void slip_init(struct net_device *dev, void *data)
19 struct slip_data *spri; 19 struct slip_data *spri;
20 struct slip_init *init = data; 20 struct slip_init *init = data;
21 21
22 private = dev->priv; 22 private = netdev_priv(dev);
23 spri = (struct slip_data *) private->user; 23 spri = (struct slip_data *) private->user;
24 24
25 memset(spri->name, 0, sizeof(spri->name)); 25 memset(spri->name, 0, sizeof(spri->name));
diff --git a/arch/um/drivers/slirp_kern.c b/arch/um/drivers/slirp_kern.c
index d987af277db9..f15a6e7654f3 100644
--- a/arch/um/drivers/slirp_kern.c
+++ b/arch/um/drivers/slirp_kern.c
@@ -22,7 +22,7 @@ void slirp_init(struct net_device *dev, void *data)
22 struct slirp_init *init = data; 22 struct slirp_init *init = data;
23 int i; 23 int i;
24 24
25 private = dev->priv; 25 private = netdev_priv(dev);
26 spri = (struct slirp_data *) private->user; 26 spri = (struct slirp_data *) private->user;
27 27
28 spri->argw = init->argw; 28 spri->argw = init->argw;
diff --git a/arch/um/drivers/vde_kern.c b/arch/um/drivers/vde_kern.c
index add7e722defb..1b852bffdebc 100644
--- a/arch/um/drivers/vde_kern.c
+++ b/arch/um/drivers/vde_kern.c
@@ -19,7 +19,7 @@ static void vde_init(struct net_device *dev, void *data)
19 struct uml_net_private *pri; 19 struct uml_net_private *pri;
20 struct vde_data *vpri; 20 struct vde_data *vpri;
21 21
22 pri = dev->priv; 22 pri = netdev_priv(dev);
23 vpri = (struct vde_data *) pri->user; 23 vpri = (struct vde_data *) pri->user;
24 24
25 vpri->vde_switch = init->vde_switch; 25 vpri->vde_switch = init->vde_switch;
diff --git a/arch/um/os-Linux/drivers/ethertap_kern.c b/arch/um/os-Linux/drivers/ethertap_kern.c
index 046a131f6104..7f6f9a71aae4 100644
--- a/arch/um/os-Linux/drivers/ethertap_kern.c
+++ b/arch/um/os-Linux/drivers/ethertap_kern.c
@@ -22,7 +22,7 @@ static void etap_init(struct net_device *dev, void *data)
22 struct ethertap_data *epri; 22 struct ethertap_data *epri;
23 struct ethertap_init *init = data; 23 struct ethertap_init *init = data;
24 24
25 pri = dev->priv; 25 pri = netdev_priv(dev);
26 epri = (struct ethertap_data *) pri->user; 26 epri = (struct ethertap_data *) pri->user;
27 epri->dev_name = init->dev_name; 27 epri->dev_name = init->dev_name;
28 epri->gate_addr = init->gate_addr; 28 epri->gate_addr = init->gate_addr;
diff --git a/arch/um/os-Linux/drivers/tuntap_kern.c b/arch/um/os-Linux/drivers/tuntap_kern.c
index 6b9e33d5de20..4048800e4696 100644
--- a/arch/um/os-Linux/drivers/tuntap_kern.c
+++ b/arch/um/os-Linux/drivers/tuntap_kern.c
@@ -21,7 +21,7 @@ static void tuntap_init(struct net_device *dev, void *data)
21 struct tuntap_data *tpri; 21 struct tuntap_data *tpri;
22 struct tuntap_init *init = data; 22 struct tuntap_init *init = data;
23 23
24 pri = dev->priv; 24 pri = netdev_priv(dev);
25 tpri = (struct tuntap_data *) pri->user; 25 tpri = (struct tuntap_data *) pri->user;
26 tpri->dev_name = init->dev_name; 26 tpri->dev_name = init->dev_name;
27 tpri->fixed_config = (init->dev_name != NULL); 27 tpri->fixed_config = (init->dev_name != NULL);
diff --git a/arch/xtensa/platforms/iss/network.c b/arch/xtensa/platforms/iss/network.c
index 11a20adc1409..64f057d89e73 100644
--- a/arch/xtensa/platforms/iss/network.c
+++ b/arch/xtensa/platforms/iss/network.c
@@ -365,7 +365,7 @@ static int tuntap_probe(struct iss_net_private *lp, int index, char *init)
365 365
366static int iss_net_rx(struct net_device *dev) 366static int iss_net_rx(struct net_device *dev)
367{ 367{
368 struct iss_net_private *lp = dev->priv; 368 struct iss_net_private *lp = netdev_priv(dev);
369 int pkt_len; 369 int pkt_len;
370 struct sk_buff *skb; 370 struct sk_buff *skb;
371 371
@@ -456,7 +456,7 @@ static void iss_net_timer(unsigned long priv)
456 456
457static int iss_net_open(struct net_device *dev) 457static int iss_net_open(struct net_device *dev)
458{ 458{
459 struct iss_net_private *lp = dev->priv; 459 struct iss_net_private *lp = netdev_priv(dev);
460 char addr[sizeof "255.255.255.255\0"]; 460 char addr[sizeof "255.255.255.255\0"];
461 int err; 461 int err;
462 462
@@ -496,7 +496,7 @@ out:
496 496
497static int iss_net_close(struct net_device *dev) 497static int iss_net_close(struct net_device *dev)
498{ 498{
499 struct iss_net_private *lp = dev->priv; 499 struct iss_net_private *lp = netdev_priv(dev);
500printk("iss_net_close!\n"); 500printk("iss_net_close!\n");
501 netif_stop_queue(dev); 501 netif_stop_queue(dev);
502 spin_lock(&lp->lock); 502 spin_lock(&lp->lock);
@@ -515,7 +515,7 @@ printk("iss_net_close!\n");
515 515
516static int iss_net_start_xmit(struct sk_buff *skb, struct net_device *dev) 516static int iss_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
517{ 517{
518 struct iss_net_private *lp = dev->priv; 518 struct iss_net_private *lp = netdev_priv(dev);
519 unsigned long flags; 519 unsigned long flags;
520 int len; 520 int len;
521 521
@@ -551,7 +551,7 @@ static int iss_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
551 551
552static struct net_device_stats *iss_net_get_stats(struct net_device *dev) 552static struct net_device_stats *iss_net_get_stats(struct net_device *dev)
553{ 553{
554 struct iss_net_private *lp = dev->priv; 554 struct iss_net_private *lp = netdev_priv(dev);
555 return &lp->stats; 555 return &lp->stats;
556} 556}
557 557
@@ -578,7 +578,7 @@ static void iss_net_tx_timeout(struct net_device *dev)
578static int iss_net_set_mac(struct net_device *dev, void *addr) 578static int iss_net_set_mac(struct net_device *dev, void *addr)
579{ 579{
580#if 0 580#if 0
581 struct iss_net_private *lp = dev->priv; 581 struct iss_net_private *lp = netdev_priv(dev);
582 struct sockaddr *hwaddr = addr; 582 struct sockaddr *hwaddr = addr;
583 583
584 spin_lock(&lp->lock); 584 spin_lock(&lp->lock);
@@ -592,7 +592,7 @@ static int iss_net_set_mac(struct net_device *dev, void *addr)
592static int iss_net_change_mtu(struct net_device *dev, int new_mtu) 592static int iss_net_change_mtu(struct net_device *dev, int new_mtu)
593{ 593{
594#if 0 594#if 0
595 struct iss_net_private *lp = dev->priv; 595 struct iss_net_private *lp = netdev_priv(dev);
596 int err = 0; 596 int err = 0;
597 597
598 spin_lock(&lp->lock); 598 spin_lock(&lp->lock);
@@ -636,7 +636,7 @@ static int iss_net_configure(int index, char *init)
636 636
637 /* Initialize private element. */ 637 /* Initialize private element. */
638 638
639 lp = dev->priv; 639 lp = netdev_priv(dev);
640 *lp = ((struct iss_net_private) { 640 *lp = ((struct iss_net_private) {
641 .device_list = LIST_HEAD_INIT(lp->device_list), 641 .device_list = LIST_HEAD_INIT(lp->device_list),
642 .opened_list = LIST_HEAD_INIT(lp->opened_list), 642 .opened_list = LIST_HEAD_INIT(lp->opened_list),
@@ -660,10 +660,7 @@ static int iss_net_configure(int index, char *init)
660 660
661 printk(KERN_INFO "Netdevice %d ", index); 661 printk(KERN_INFO "Netdevice %d ", index);
662 if (lp->have_mac) 662 if (lp->have_mac)
663 printk("(%02x:%02x:%02x:%02x:%02x:%02x) ", 663 printk("(%pM) ", lp->mac);
664 lp->mac[0], lp->mac[1],
665 lp->mac[2], lp->mac[3],
666 lp->mac[4], lp->mac[5]);
667 printk(": "); 664 printk(": ");
668 665
669 /* sysfs register */ 666 /* sysfs register */