aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c28
-rw-r--r--arch/ppc/platforms/83xx/mpc834x_sys.c4
-rw-r--r--arch/ppc/platforms/85xx/mpc8540_ads.c4
-rw-r--r--arch/ppc/platforms/85xx/mpc8560_ads.c4
-rw-r--r--arch/ppc/platforms/85xx/mpc85xx_cds_common.c6
-rw-r--r--arch/ppc/platforms/85xx/sbc8560.c2
-rw-r--r--arch/ppc/platforms/85xx/stx_gp3.c2
-rw-r--r--arch/ppc/platforms/85xx/tqm85xx.c4
-rw-r--r--arch/ppc/platforms/mpc8272ads_setup.c6
-rw-r--r--arch/ppc/platforms/mpc866ads_setup.c4
-rw-r--r--drivers/net/phy/fixed.c2
-rw-r--r--include/asm-powerpc/prom.h7
-rw-r--r--include/linux/phy.h3
13 files changed, 40 insertions, 36 deletions
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index dbe92ae20333..ad31e56e892b 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -22,6 +22,7 @@
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/device.h> 23#include <linux/device.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/phy.h>
25#include <linux/fsl_devices.h> 26#include <linux/fsl_devices.h>
26#include <linux/fs_enet_pd.h> 27#include <linux/fs_enet_pd.h>
27#include <linux/fs_uart_pd.h> 28#include <linux/fs_uart_pd.h>
@@ -146,7 +147,7 @@ static int __init gfar_mdio_of_init(void)
146 } 147 }
147 148
148 for (k = 0; k < 32; k++) 149 for (k = 0; k < 32; k++)
149 mdio_data.irq[k] = -1; 150 mdio_data.irq[k] = PHY_POLL;
150 151
151 while ((child = of_get_next_child(np, child)) != NULL) { 152 while ((child = of_get_next_child(np, child)) != NULL) {
152 int irq = irq_of_parse_and_map(child, 0); 153 int irq = irq_of_parse_and_map(child, 0);
@@ -177,6 +178,7 @@ static const char *gfar_tx_intr = "tx";
177static const char *gfar_rx_intr = "rx"; 178static const char *gfar_rx_intr = "rx";
178static const char *gfar_err_intr = "error"; 179static const char *gfar_err_intr = "error";
179 180
181
180static int __init gfar_of_init(void) 182static int __init gfar_of_init(void)
181{ 183{
182 struct device_node *np; 184 struct device_node *np;
@@ -204,8 +206,7 @@ static int __init gfar_of_init(void)
204 if (ret) 206 if (ret)
205 goto err; 207 goto err;
206 208
207 r[1].start = r[1].end = irq_of_parse_and_map(np, 0); 209 of_irq_to_resource(np, 0, &r[1]);
208 r[1].flags = IORESOURCE_IRQ;
209 210
210 model = get_property(np, "model", NULL); 211 model = get_property(np, "model", NULL);
211 212
@@ -214,12 +215,10 @@ static int __init gfar_of_init(void)
214 r[1].name = gfar_tx_intr; 215 r[1].name = gfar_tx_intr;
215 216
216 r[2].name = gfar_rx_intr; 217 r[2].name = gfar_rx_intr;
217 r[2].start = r[2].end = irq_of_parse_and_map(np, 1); 218 of_irq_to_resource(np, 1, &r[2]);
218 r[2].flags = IORESOURCE_IRQ;
219 219
220 r[3].name = gfar_err_intr; 220 r[3].name = gfar_err_intr;
221 r[3].start = r[3].end = irq_of_parse_and_map(np, 2); 221 of_irq_to_resource(np, 2, &r[3]);
222 r[3].flags = IORESOURCE_IRQ;
223 222
224 n_res += 2; 223 n_res += 2;
225 } 224 }
@@ -323,8 +322,7 @@ static int __init fsl_i2c_of_init(void)
323 if (ret) 322 if (ret)
324 goto err; 323 goto err;
325 324
326 r[1].start = r[1].end = irq_of_parse_and_map(np, 0); 325 of_irq_to_resource(np, 0, &r[1]);
327 r[1].flags = IORESOURCE_IRQ;
328 326
329 i2c_dev = platform_device_register_simple("fsl-i2c", i, r, 2); 327 i2c_dev = platform_device_register_simple("fsl-i2c", i, r, 2);
330 if (IS_ERR(i2c_dev)) { 328 if (IS_ERR(i2c_dev)) {
@@ -459,8 +457,7 @@ static int __init fsl_usb_of_init(void)
459 if (ret) 457 if (ret)
460 goto err; 458 goto err;
461 459
462 r[1].start = r[1].end = irq_of_parse_and_map(np, 0); 460 of_irq_to_resource(np, 0, &r[1]);
463 r[1].flags = IORESOURCE_IRQ;
464 461
465 usb_dev_mph = 462 usb_dev_mph =
466 platform_device_register_simple("fsl-ehci", i, r, 2); 463 platform_device_register_simple("fsl-ehci", i, r, 2);
@@ -507,8 +504,7 @@ static int __init fsl_usb_of_init(void)
507 if (ret) 504 if (ret)
508 goto unreg_mph; 505 goto unreg_mph;
509 506
510 r[1].start = r[1].end = irq_of_parse_and_map(np, 0); 507 of_irq_to_resource(np, 0, &r[1]);
511 r[1].flags = IORESOURCE_IRQ;
512 508
513 usb_dev_dr = 509 usb_dev_dr =
514 platform_device_register_simple("fsl-ehci", i, r, 2); 510 platform_device_register_simple("fsl-ehci", i, r, 2);
@@ -591,8 +587,7 @@ static int __init fs_enet_of_init(void)
591 r[2].name = fcc_regs_c; 587 r[2].name = fcc_regs_c;
592 fs_enet_data.fcc_regs_c = r[2].start; 588 fs_enet_data.fcc_regs_c = r[2].start;
593 589
594 r[3].start = r[3].end = irq_of_parse_and_map(np, 0); 590 of_irq_to_resource(np, 0, &r[3]);
595 r[3].flags = IORESOURCE_IRQ;
596 591
597 fs_enet_dev = 592 fs_enet_dev =
598 platform_device_register_simple("fsl-cpm-fcc", i, &r[0], 4); 593 platform_device_register_simple("fsl-cpm-fcc", i, &r[0], 4);
@@ -754,8 +749,7 @@ static int __init cpm_uart_of_init(void)
754 goto err; 749 goto err;
755 r[1].name = scc_pram; 750 r[1].name = scc_pram;
756 751
757 r[2].start = r[2].end = irq_of_parse_and_map(np, 0); 752 of_irq_to_resource(np, 0, &r[2]);
758 r[2].flags = IORESOURCE_IRQ;
759 753
760 cpm_uart_dev = 754 cpm_uart_dev =
761 platform_device_register_simple("fsl-cpm-scc:uart", i, &r[0], 3); 755 platform_device_register_simple("fsl-cpm-scc:uart", i, &r[0], 3);
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c
index 3397f0de1592..b84f8df325c4 100644
--- a/arch/ppc/platforms/83xx/mpc834x_sys.c
+++ b/arch/ppc/platforms/83xx/mpc834x_sys.c
@@ -121,8 +121,8 @@ mpc834x_sys_setup_arch(void)
121 121
122 mdata->irq[0] = MPC83xx_IRQ_EXT1; 122 mdata->irq[0] = MPC83xx_IRQ_EXT1;
123 mdata->irq[1] = MPC83xx_IRQ_EXT2; 123 mdata->irq[1] = MPC83xx_IRQ_EXT2;
124 mdata->irq[2] = -1; 124 mdata->irq[2] = PHY_POLL;
125 mdata->irq[31] = -1; 125 mdata->irq[31] = PHY_POLL;
126 126
127 /* setup the board related information for the enet controllers */ 127 /* setup the board related information for the enet controllers */
128 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC83xx_TSEC1); 128 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC83xx_TSEC1);
diff --git a/arch/ppc/platforms/85xx/mpc8540_ads.c b/arch/ppc/platforms/85xx/mpc8540_ads.c
index 4f839da6782f..00a3ba57063f 100644
--- a/arch/ppc/platforms/85xx/mpc8540_ads.c
+++ b/arch/ppc/platforms/85xx/mpc8540_ads.c
@@ -92,9 +92,9 @@ mpc8540ads_setup_arch(void)
92 92
93 mdata->irq[0] = MPC85xx_IRQ_EXT5; 93 mdata->irq[0] = MPC85xx_IRQ_EXT5;
94 mdata->irq[1] = MPC85xx_IRQ_EXT5; 94 mdata->irq[1] = MPC85xx_IRQ_EXT5;
95 mdata->irq[2] = -1; 95 mdata->irq[2] = PHY_POLL;
96 mdata->irq[3] = MPC85xx_IRQ_EXT5; 96 mdata->irq[3] = MPC85xx_IRQ_EXT5;
97 mdata->irq[31] = -1; 97 mdata->irq[31] = PHY_POLL;
98 98
99 /* setup the board related information for the enet controllers */ 99 /* setup the board related information for the enet controllers */
100 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1); 100 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1);
diff --git a/arch/ppc/platforms/85xx/mpc8560_ads.c b/arch/ppc/platforms/85xx/mpc8560_ads.c
index 14ecec7bbed7..3a060468dd95 100644
--- a/arch/ppc/platforms/85xx/mpc8560_ads.c
+++ b/arch/ppc/platforms/85xx/mpc8560_ads.c
@@ -156,9 +156,9 @@ mpc8560ads_setup_arch(void)
156 156
157 mdata->irq[0] = MPC85xx_IRQ_EXT5; 157 mdata->irq[0] = MPC85xx_IRQ_EXT5;
158 mdata->irq[1] = MPC85xx_IRQ_EXT5; 158 mdata->irq[1] = MPC85xx_IRQ_EXT5;
159 mdata->irq[2] = -1; 159 mdata->irq[2] = PHY_POLL;
160 mdata->irq[3] = MPC85xx_IRQ_EXT5; 160 mdata->irq[3] = MPC85xx_IRQ_EXT5;
161 mdata->irq[31] = -1; 161 mdata->irq[31] = PHY_POLL;
162 162
163 /* setup the board related information for the enet controllers */ 163 /* setup the board related information for the enet controllers */
164 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1); 164 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1);
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
index 5ce0f69c1db6..2d59eb776c95 100644
--- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
+++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
@@ -451,9 +451,9 @@ mpc85xx_cds_setup_arch(void)
451 451
452 mdata->irq[0] = MPC85xx_IRQ_EXT5; 452 mdata->irq[0] = MPC85xx_IRQ_EXT5;
453 mdata->irq[1] = MPC85xx_IRQ_EXT5; 453 mdata->irq[1] = MPC85xx_IRQ_EXT5;
454 mdata->irq[2] = -1; 454 mdata->irq[2] = PHY_POLL;
455 mdata->irq[3] = -1; 455 mdata->irq[3] = PHY_POLL;
456 mdata->irq[31] = -1; 456 mdata->irq[31] = PHY_POLL;
457 457
458 /* setup the board related information for the enet controllers */ 458 /* setup the board related information for the enet controllers */
459 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1); 459 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1);
diff --git a/arch/ppc/platforms/85xx/sbc8560.c b/arch/ppc/platforms/85xx/sbc8560.c
index 764d580ff535..1d10ab98f66d 100644
--- a/arch/ppc/platforms/85xx/sbc8560.c
+++ b/arch/ppc/platforms/85xx/sbc8560.c
@@ -129,7 +129,7 @@ sbc8560_setup_arch(void)
129 129
130 mdata->irq[25] = MPC85xx_IRQ_EXT6; 130 mdata->irq[25] = MPC85xx_IRQ_EXT6;
131 mdata->irq[26] = MPC85xx_IRQ_EXT7; 131 mdata->irq[26] = MPC85xx_IRQ_EXT7;
132 mdata->irq[31] = -1; 132 mdata->irq[31] = PHY_POLL;
133 133
134 /* setup the board related information for the enet controllers */ 134 /* setup the board related information for the enet controllers */
135 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1); 135 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1);
diff --git a/arch/ppc/platforms/85xx/stx_gp3.c b/arch/ppc/platforms/85xx/stx_gp3.c
index 4bb18ab27672..b1f5b737c70d 100644
--- a/arch/ppc/platforms/85xx/stx_gp3.c
+++ b/arch/ppc/platforms/85xx/stx_gp3.c
@@ -123,7 +123,7 @@ gp3_setup_arch(void)
123 123
124 mdata->irq[2] = MPC85xx_IRQ_EXT5; 124 mdata->irq[2] = MPC85xx_IRQ_EXT5;
125 mdata->irq[4] = MPC85xx_IRQ_EXT5; 125 mdata->irq[4] = MPC85xx_IRQ_EXT5;
126 mdata->irq[31] = -1; 126 mdata->irq[31] = PHY_POLL;
127 127
128 /* setup the board related information for the enet controllers */ 128 /* setup the board related information for the enet controllers */
129 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1); 129 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1);
diff --git a/arch/ppc/platforms/85xx/tqm85xx.c b/arch/ppc/platforms/85xx/tqm85xx.c
index dd45f2e18449..4ee2bd156dc5 100644
--- a/arch/ppc/platforms/85xx/tqm85xx.c
+++ b/arch/ppc/platforms/85xx/tqm85xx.c
@@ -137,9 +137,9 @@ tqm85xx_setup_arch(void)
137 137
138 mdata->irq[0] = MPC85xx_IRQ_EXT8; 138 mdata->irq[0] = MPC85xx_IRQ_EXT8;
139 mdata->irq[1] = MPC85xx_IRQ_EXT8; 139 mdata->irq[1] = MPC85xx_IRQ_EXT8;
140 mdata->irq[2] = -1; 140 mdata->irq[2] = PHY_POLL;
141 mdata->irq[3] = MPC85xx_IRQ_EXT8; 141 mdata->irq[3] = MPC85xx_IRQ_EXT8;
142 mdata->irq[31] = -1; 142 mdata->irq[31] = PHY_POLL;
143 143
144 /* setup the board related information for the enet controllers */ 144 /* setup the board related information for the enet controllers */
145 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1); 145 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1);
diff --git a/arch/ppc/platforms/mpc8272ads_setup.c b/arch/ppc/platforms/mpc8272ads_setup.c
index 1f9ea36837b1..0bc06768cf24 100644
--- a/arch/ppc/platforms/mpc8272ads_setup.c
+++ b/arch/ppc/platforms/mpc8272ads_setup.c
@@ -266,10 +266,10 @@ static void __init mpc8272ads_fixup_mdio_pdata(struct platform_device *pdev,
266 int idx) 266 int idx)
267{ 267{
268 m82xx_mii_bb_pdata.irq[0] = PHY_INTERRUPT; 268 m82xx_mii_bb_pdata.irq[0] = PHY_INTERRUPT;
269 m82xx_mii_bb_pdata.irq[1] = -1; 269 m82xx_mii_bb_pdata.irq[1] = PHY_POLL;
270 m82xx_mii_bb_pdata.irq[2] = -1; 270 m82xx_mii_bb_pdata.irq[2] = PHY_POLL;
271 m82xx_mii_bb_pdata.irq[3] = PHY_INTERRUPT; 271 m82xx_mii_bb_pdata.irq[3] = PHY_INTERRUPT;
272 m82xx_mii_bb_pdata.irq[31] = -1; 272 m82xx_mii_bb_pdata.irq[31] = PHY_POLL;
273 273
274 274
275 m82xx_mii_bb_pdata.mdio_dat.offset = 275 m82xx_mii_bb_pdata.mdio_dat.offset =
diff --git a/arch/ppc/platforms/mpc866ads_setup.c b/arch/ppc/platforms/mpc866ads_setup.c
index e95d2c111747..8a0c07eb4449 100644
--- a/arch/ppc/platforms/mpc866ads_setup.c
+++ b/arch/ppc/platforms/mpc866ads_setup.c
@@ -361,7 +361,7 @@ int __init mpc866ads_init(void)
361 361
362 fmpi->mii_speed = ((((bd->bi_intfreq + 4999999) / 2500000) / 2) & 0x3F) << 1; 362 fmpi->mii_speed = ((((bd->bi_intfreq + 4999999) / 2500000) / 2) & 0x3F) << 1;
363 /* No PHY interrupt line here */ 363 /* No PHY interrupt line here */
364 fmpi->irq[0xf] = -1; 364 fmpi->irq[0xf] = PHY_POLL;
365 365
366/* Since either of the uarts could be used as console, they need to ready */ 366/* Since either of the uarts could be used as console, they need to ready */
367#ifdef CONFIG_SERIAL_CPM_SMC1 367#ifdef CONFIG_SERIAL_CPM_SMC1
@@ -380,7 +380,7 @@ int __init mpc866ads_init(void)
380 380
381 fmpi->mii_speed = ((((bd->bi_intfreq + 4999999) / 2500000) / 2) & 0x3F) << 1; 381 fmpi->mii_speed = ((((bd->bi_intfreq + 4999999) / 2500000) / 2) & 0x3F) << 1;
382 /* No PHY interrupt line here */ 382 /* No PHY interrupt line here */
383 fmpi->irq[0xf] = -1; 383 fmpi->irq[0xf] = PHY_POLL;
384 384
385 return 0; 385 return 0;
386} 386}
diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c
index f14e99276dba..096d4a100bf2 100644
--- a/drivers/net/phy/fixed.c
+++ b/drivers/net/phy/fixed.c
@@ -254,7 +254,7 @@ static int fixed_mdio_register_device(int number, int speed, int duplex)
254 goto device_create_fail; 254 goto device_create_fail;
255 } 255 }
256 256
257 phydev->irq = -1; 257 phydev->irq = PHY_IGNORE_INTERRUPT;
258 phydev->dev.bus = &mdio_bus_type; 258 phydev->dev.bus = &mdio_bus_type;
259 259
260 if(number) 260 if(number)
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h
index 524629769336..39f04ef96f38 100644
--- a/include/asm-powerpc/prom.h
+++ b/include/asm-powerpc/prom.h
@@ -17,6 +17,7 @@
17 */ 17 */
18#include <linux/types.h> 18#include <linux/types.h>
19#include <linux/proc_fs.h> 19#include <linux/proc_fs.h>
20#include <linux/platform_device.h>
20#include <asm/atomic.h> 21#include <asm/atomic.h>
21 22
22/* Definitions used by the flattened device tree */ 23/* Definitions used by the flattened device tree */
@@ -331,6 +332,12 @@ extern int of_irq_map_one(struct device_node *device, int index,
331struct pci_dev; 332struct pci_dev;
332extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq); 333extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq);
333 334
335static inline void of_irq_to_resource(struct device_node *dev, int index, struct resource *r)
336{
337 r->start = r->end = irq_of_parse_and_map(dev, index);
338 r->flags = IORESOURCE_IRQ;
339}
340
334 341
335#endif /* __KERNEL__ */ 342#endif /* __KERNEL__ */
336#endif /* _POWERPC_PROM_H */ 343#endif /* _POWERPC_PROM_H */
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 9447a57ee8a9..892d6abe57e5 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -20,6 +20,9 @@
20 20
21#include <linux/spinlock.h> 21#include <linux/spinlock.h>
22#include <linux/device.h> 22#include <linux/device.h>
23#include <linux/ethtool.h>
24#include <linux/mii.h>
25#include <asm/irq.h>
23 26
24#define PHY_BASIC_FEATURES (SUPPORTED_10baseT_Half | \ 27#define PHY_BASIC_FEATURES (SUPPORTED_10baseT_Half | \
25 SUPPORTED_10baseT_Full | \ 28 SUPPORTED_10baseT_Full | \