Commit 1636f8ac2b08410df4766449f7c86b912443cd99
1 parent
2b07be2493
Exists in
master
and in
4 other branches
sparc/of: Move of_device fields into struct pdev_archdata
This patch moves SPARC architecture specific data members out of struct of_device and into the pdev_archdata structure. The reason for this change is to unify the struct of_device definition amongst all the architectures. It also remvoes the .sysdata, .slot, .portid and .clock_freq properties because they aren't actually used by anything. A subsequent patch will replace struct of_device entirely with struct platform_device and the of_platform support code will share common routines with the platform bus (but the bus instances themselves can remain separate). This patch also adds 'struct resources *resource' and num_resources to match the fields defined in struct platform_device. After this change, 'struct platform_device' can be used as a drop-in replacement for 'struct of_platform'. This change is in preparation for merging the of_platform_bus_type with the platform_bus_type. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David S. Miller <davem@davemloft.net> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Showing 33 changed files with 100 additions and 108 deletions Side-by-side Diff
- arch/sparc/include/asm/device.h
- arch/sparc/include/asm/floppy_64.h
- arch/sparc/include/asm/of_device.h
- arch/sparc/include/asm/parport.h
- arch/sparc/kernel/of_device_32.c
- arch/sparc/kernel/of_device_64.c
- arch/sparc/kernel/of_device_common.c
- arch/sparc/kernel/pci.c
- arch/sparc/kernel/pci_psycho.c
- arch/sparc/kernel/pci_sabre.c
- arch/sparc/kernel/pci_schizo.c
- arch/sparc/kernel/power.c
- drivers/atm/fore200e.c
- drivers/input/serio/i8042-sparcio.h
- drivers/net/myri_sbus.c
- drivers/net/niu.c
- drivers/net/sunbmac.c
- drivers/net/sunhme.c
- drivers/net/sunlance.c
- drivers/net/sunqe.c
- drivers/parport/parport_sunbpp.c
- drivers/sbus/char/bbc_i2c.c
- drivers/sbus/char/uctrl.c
- drivers/scsi/qlogicpti.c
- drivers/scsi/sun_esp.c
- drivers/serial/sunhv.c
- drivers/serial/sunsab.c
- drivers/serial/sunsu.c
- drivers/serial/sunzilog.c
- drivers/watchdog/cpwd.c
- sound/sparc/amd7930.c
- sound/sparc/cs4231.c
- sound/sparc/dbri.c
arch/sparc/include/asm/device.h
... | ... | @@ -6,6 +6,8 @@ |
6 | 6 | #ifndef _ASM_SPARC_DEVICE_H |
7 | 7 | #define _ASM_SPARC_DEVICE_H |
8 | 8 | |
9 | +#include <asm/openprom.h> | |
10 | + | |
9 | 11 | struct device_node; |
10 | 12 | struct of_device; |
11 | 13 | |
... | ... | @@ -18,6 +20,9 @@ |
18 | 20 | }; |
19 | 21 | |
20 | 22 | struct pdev_archdata { |
23 | + struct resource resource[PROMREG_MAX]; | |
24 | + unsigned int irqs[PROMINTR_MAX]; | |
25 | + int num_irqs; | |
21 | 26 | }; |
22 | 27 | |
23 | 28 | #endif /* _ASM_SPARC_DEVICE_H */ |
arch/sparc/include/asm/floppy_64.h
... | ... | @@ -567,7 +567,7 @@ |
567 | 567 | } |
568 | 568 | if (op) { |
569 | 569 | floppy_op = op; |
570 | - FLOPPY_IRQ = op->irqs[0]; | |
570 | + FLOPPY_IRQ = op->archdata.irqs[0]; | |
571 | 571 | } else { |
572 | 572 | struct device_node *ebus_dp; |
573 | 573 | void __iomem *auxio_reg; |
... | ... | @@ -593,7 +593,7 @@ |
593 | 593 | if (state_prop && !strncmp(state_prop, "disabled", 8)) |
594 | 594 | return 0; |
595 | 595 | |
596 | - FLOPPY_IRQ = op->irqs[0]; | |
596 | + FLOPPY_IRQ = op->archdata.irqs[0]; | |
597 | 597 | |
598 | 598 | /* Make sure the high density bit is set, some systems |
599 | 599 | * (most notably Ultra5/Ultra10) come up with it clear. |
arch/sparc/include/asm/of_device.h
... | ... | @@ -15,15 +15,10 @@ |
15 | 15 | struct of_device |
16 | 16 | { |
17 | 17 | struct device dev; |
18 | - struct resource resource[PROMREG_MAX]; | |
19 | - unsigned int irqs[PROMINTR_MAX]; | |
20 | - int num_irqs; | |
18 | + u32 num_resources; | |
19 | + struct resource *resource; | |
21 | 20 | |
22 | - void *sysdata; | |
23 | - | |
24 | - int slot; | |
25 | - int portid; | |
26 | - int clock_freq; | |
21 | + struct pdev_archdata archdata; | |
27 | 22 | }; |
28 | 23 | |
29 | 24 | extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name); |
arch/sparc/include/asm/parport.h
... | ... | @@ -116,7 +116,7 @@ |
116 | 116 | parent = op->dev.of_node->parent; |
117 | 117 | if (!strcmp(parent->name, "dma")) { |
118 | 118 | p = parport_pc_probe_port(base, base + 0x400, |
119 | - op->irqs[0], PARPORT_DMA_NOFIFO, | |
119 | + op->archdata.irqs[0], PARPORT_DMA_NOFIFO, | |
120 | 120 | op->dev.parent->parent, 0); |
121 | 121 | if (!p) |
122 | 122 | return -ENOMEM; |
... | ... | @@ -166,7 +166,7 @@ |
166 | 166 | 0, PTR_LPT_REG_DIR); |
167 | 167 | |
168 | 168 | p = parport_pc_probe_port(base, base + 0x400, |
169 | - op->irqs[0], | |
169 | + op->archdata.irqs[0], | |
170 | 170 | slot, |
171 | 171 | op->dev.parent, |
172 | 172 | 0); |
arch/sparc/kernel/of_device_32.c
... | ... | @@ -267,6 +267,8 @@ |
267 | 267 | /* Conver to num-entries. */ |
268 | 268 | num_reg /= na + ns; |
269 | 269 | |
270 | + op->resource = op->archdata.resource; | |
271 | + op->num_resources = num_reg; | |
270 | 272 | for (index = 0; index < num_reg; index++) { |
271 | 273 | struct resource *r = &op->resource[index]; |
272 | 274 | u32 addr[OF_MAX_ADDR_CELLS]; |
273 | 275 | |
274 | 276 | |
275 | 277 | |
... | ... | @@ -349,27 +351,21 @@ |
349 | 351 | |
350 | 352 | op->dev.of_node = dp; |
351 | 353 | |
352 | - op->clock_freq = of_getintprop_default(dp, "clock-frequency", | |
353 | - (25*1000*1000)); | |
354 | - op->portid = of_getintprop_default(dp, "upa-portid", -1); | |
355 | - if (op->portid == -1) | |
356 | - op->portid = of_getintprop_default(dp, "portid", -1); | |
357 | - | |
358 | 354 | intr = of_get_property(dp, "intr", &len); |
359 | 355 | if (intr) { |
360 | - op->num_irqs = len / sizeof(struct linux_prom_irqs); | |
361 | - for (i = 0; i < op->num_irqs; i++) | |
362 | - op->irqs[i] = intr[i].pri; | |
356 | + op->archdata.num_irqs = len / sizeof(struct linux_prom_irqs); | |
357 | + for (i = 0; i < op->archdata.num_irqs; i++) | |
358 | + op->archdata.irqs[i] = intr[i].pri; | |
363 | 359 | } else { |
364 | 360 | const unsigned int *irq = |
365 | 361 | of_get_property(dp, "interrupts", &len); |
366 | 362 | |
367 | 363 | if (irq) { |
368 | - op->num_irqs = len / sizeof(unsigned int); | |
369 | - for (i = 0; i < op->num_irqs; i++) | |
370 | - op->irqs[i] = irq[i]; | |
364 | + op->archdata.num_irqs = len / sizeof(unsigned int); | |
365 | + for (i = 0; i < op->archdata.num_irqs; i++) | |
366 | + op->archdata.irqs[i] = irq[i]; | |
371 | 367 | } else { |
372 | - op->num_irqs = 0; | |
368 | + op->archdata.num_irqs = 0; | |
373 | 369 | } |
374 | 370 | } |
375 | 371 | if (sparc_cpu_model == sun4d) { |
... | ... | @@ -411,8 +407,8 @@ |
411 | 407 | goto build_resources; |
412 | 408 | } |
413 | 409 | |
414 | - for (i = 0; i < op->num_irqs; i++) { | |
415 | - int this_irq = op->irqs[i]; | |
410 | + for (i = 0; i < op->archdata.num_irqs; i++) { | |
411 | + int this_irq = op->archdata.irqs[i]; | |
416 | 412 | int sbusl = pil_to_sbus[this_irq]; |
417 | 413 | |
418 | 414 | if (sbusl) |
... | ... | @@ -420,7 +416,7 @@ |
420 | 416 | (sbusl << 2) + |
421 | 417 | slot); |
422 | 418 | |
423 | - op->irqs[i] = this_irq; | |
419 | + op->archdata.irqs[i] = this_irq; | |
424 | 420 | } |
425 | 421 | } |
426 | 422 |
arch/sparc/kernel/of_device_64.c
... | ... | @@ -344,6 +344,8 @@ |
344 | 344 | num_reg = PROMREG_MAX; |
345 | 345 | } |
346 | 346 | |
347 | + op->resource = op->archdata.resource; | |
348 | + op->num_resources = num_reg; | |
347 | 349 | for (index = 0; index < num_reg; index++) { |
348 | 350 | struct resource *r = &op->resource[index]; |
349 | 351 | u32 addr[OF_MAX_ADDR_CELLS]; |
350 | 352 | |
351 | 353 | |
352 | 354 | |
353 | 355 | |
354 | 356 | |
355 | 357 | |
... | ... | @@ -644,31 +646,25 @@ |
644 | 646 | |
645 | 647 | op->dev.of_node = dp; |
646 | 648 | |
647 | - op->clock_freq = of_getintprop_default(dp, "clock-frequency", | |
648 | - (25*1000*1000)); | |
649 | - op->portid = of_getintprop_default(dp, "upa-portid", -1); | |
650 | - if (op->portid == -1) | |
651 | - op->portid = of_getintprop_default(dp, "portid", -1); | |
652 | - | |
653 | 649 | irq = of_get_property(dp, "interrupts", &len); |
654 | 650 | if (irq) { |
655 | - op->num_irqs = len / 4; | |
651 | + op->archdata.num_irqs = len / 4; | |
656 | 652 | |
657 | 653 | /* Prevent overrunning the op->irqs[] array. */ |
658 | - if (op->num_irqs > PROMINTR_MAX) { | |
654 | + if (op->archdata.num_irqs > PROMINTR_MAX) { | |
659 | 655 | printk(KERN_WARNING "%s: Too many irqs (%d), " |
660 | 656 | "limiting to %d.\n", |
661 | - dp->full_name, op->num_irqs, PROMINTR_MAX); | |
662 | - op->num_irqs = PROMINTR_MAX; | |
657 | + dp->full_name, op->archdata.num_irqs, PROMINTR_MAX); | |
658 | + op->archdata.num_irqs = PROMINTR_MAX; | |
663 | 659 | } |
664 | - memcpy(op->irqs, irq, op->num_irqs * 4); | |
660 | + memcpy(op->archdata.irqs, irq, op->archdata.num_irqs * 4); | |
665 | 661 | } else { |
666 | - op->num_irqs = 0; | |
662 | + op->archdata.num_irqs = 0; | |
667 | 663 | } |
668 | 664 | |
669 | 665 | build_device_resources(op, parent); |
670 | - for (i = 0; i < op->num_irqs; i++) | |
671 | - op->irqs[i] = build_one_device_irq(op, parent, op->irqs[i]); | |
666 | + for (i = 0; i < op->archdata.num_irqs; i++) | |
667 | + op->archdata.irqs[i] = build_one_device_irq(op, parent, op->archdata.irqs[i]); | |
672 | 668 | |
673 | 669 | op->dev.parent = parent; |
674 | 670 | op->dev.bus = &of_platform_bus_type; |
arch/sparc/kernel/of_device_common.c
... | ... | @@ -35,10 +35,10 @@ |
35 | 35 | { |
36 | 36 | struct of_device *op = of_find_device_by_node(node); |
37 | 37 | |
38 | - if (!op || index >= op->num_irqs) | |
38 | + if (!op || index >= op->archdata.num_irqs) | |
39 | 39 | return 0; |
40 | 40 | |
41 | - return op->irqs[index]; | |
41 | + return op->archdata.irqs[index]; | |
42 | 42 | } |
43 | 43 | EXPORT_SYMBOL(irq_of_parse_and_map); |
44 | 44 |
arch/sparc/kernel/pci.c
arch/sparc/kernel/pci_psycho.c
... | ... | @@ -302,23 +302,23 @@ |
302 | 302 | * 5: POWER MANAGEMENT |
303 | 303 | */ |
304 | 304 | |
305 | - if (op->num_irqs < 6) | |
305 | + if (op->archdata.num_irqs < 6) | |
306 | 306 | return; |
307 | 307 | |
308 | 308 | /* We really mean to ignore the return result here. Two |
309 | 309 | * PCI controller share the same interrupt numbers and |
310 | 310 | * drive the same front-end hardware. |
311 | 311 | */ |
312 | - err = request_irq(op->irqs[1], psycho_ue_intr, IRQF_SHARED, | |
312 | + err = request_irq(op->archdata.irqs[1], psycho_ue_intr, IRQF_SHARED, | |
313 | 313 | "PSYCHO_UE", pbm); |
314 | - err = request_irq(op->irqs[2], psycho_ce_intr, IRQF_SHARED, | |
314 | + err = request_irq(op->archdata.irqs[2], psycho_ce_intr, IRQF_SHARED, | |
315 | 315 | "PSYCHO_CE", pbm); |
316 | 316 | |
317 | 317 | /* This one, however, ought not to fail. We can just warn |
318 | 318 | * about it since the system can still operate properly even |
319 | 319 | * if this fails. |
320 | 320 | */ |
321 | - err = request_irq(op->irqs[0], psycho_pcierr_intr, IRQF_SHARED, | |
321 | + err = request_irq(op->archdata.irqs[0], psycho_pcierr_intr, IRQF_SHARED, | |
322 | 322 | "PSYCHO_PCIERR", pbm); |
323 | 323 | if (err) |
324 | 324 | printk(KERN_WARNING "%s: Could not register PCIERR, " |
arch/sparc/kernel/pci_sabre.c
... | ... | @@ -329,7 +329,7 @@ |
329 | 329 | * 2: CE ERR |
330 | 330 | * 3: POWER FAIL |
331 | 331 | */ |
332 | - if (op->num_irqs < 4) | |
332 | + if (op->archdata.num_irqs < 4) | |
333 | 333 | return; |
334 | 334 | |
335 | 335 | /* We clear the error bits in the appropriate AFSR before |
... | ... | @@ -341,7 +341,7 @@ |
341 | 341 | SABRE_UEAFSR_SDTE | SABRE_UEAFSR_PDTE), |
342 | 342 | base + SABRE_UE_AFSR); |
343 | 343 | |
344 | - err = request_irq(op->irqs[1], sabre_ue_intr, 0, "SABRE_UE", pbm); | |
344 | + err = request_irq(op->archdata.irqs[1], sabre_ue_intr, 0, "SABRE_UE", pbm); | |
345 | 345 | if (err) |
346 | 346 | printk(KERN_WARNING "%s: Couldn't register UE, err=%d.\n", |
347 | 347 | pbm->name, err); |
348 | 348 | |
... | ... | @@ -351,11 +351,11 @@ |
351 | 351 | base + SABRE_CE_AFSR); |
352 | 352 | |
353 | 353 | |
354 | - err = request_irq(op->irqs[2], sabre_ce_intr, 0, "SABRE_CE", pbm); | |
354 | + err = request_irq(op->archdata.irqs[2], sabre_ce_intr, 0, "SABRE_CE", pbm); | |
355 | 355 | if (err) |
356 | 356 | printk(KERN_WARNING "%s: Couldn't register CE, err=%d.\n", |
357 | 357 | pbm->name, err); |
358 | - err = request_irq(op->irqs[0], psycho_pcierr_intr, 0, | |
358 | + err = request_irq(op->archdata.irqs[0], psycho_pcierr_intr, 0, | |
359 | 359 | "SABRE_PCIERR", pbm); |
360 | 360 | if (err) |
361 | 361 | printk(KERN_WARNING "%s: Couldn't register PCIERR, err=%d.\n", |
arch/sparc/kernel/pci_schizo.c
... | ... | @@ -857,14 +857,14 @@ |
857 | 857 | */ |
858 | 858 | |
859 | 859 | if (pbm_routes_this_ino(pbm, SCHIZO_UE_INO)) { |
860 | - err = request_irq(op->irqs[1], schizo_ue_intr, 0, | |
860 | + err = request_irq(op->archdata.irqs[1], schizo_ue_intr, 0, | |
861 | 861 | "TOMATILLO_UE", pbm); |
862 | 862 | if (err) |
863 | 863 | printk(KERN_WARNING "%s: Could not register UE, " |
864 | 864 | "err=%d\n", pbm->name, err); |
865 | 865 | } |
866 | 866 | if (pbm_routes_this_ino(pbm, SCHIZO_CE_INO)) { |
867 | - err = request_irq(op->irqs[2], schizo_ce_intr, 0, | |
867 | + err = request_irq(op->archdata.irqs[2], schizo_ce_intr, 0, | |
868 | 868 | "TOMATILLO_CE", pbm); |
869 | 869 | if (err) |
870 | 870 | printk(KERN_WARNING "%s: Could not register CE, " |
871 | 871 | |
... | ... | @@ -872,10 +872,10 @@ |
872 | 872 | } |
873 | 873 | err = 0; |
874 | 874 | if (pbm_routes_this_ino(pbm, SCHIZO_PCIERR_A_INO)) { |
875 | - err = request_irq(op->irqs[0], schizo_pcierr_intr, 0, | |
875 | + err = request_irq(op->archdata.irqs[0], schizo_pcierr_intr, 0, | |
876 | 876 | "TOMATILLO_PCIERR", pbm); |
877 | 877 | } else if (pbm_routes_this_ino(pbm, SCHIZO_PCIERR_B_INO)) { |
878 | - err = request_irq(op->irqs[0], schizo_pcierr_intr, 0, | |
878 | + err = request_irq(op->archdata.irqs[0], schizo_pcierr_intr, 0, | |
879 | 879 | "TOMATILLO_PCIERR", pbm); |
880 | 880 | } |
881 | 881 | if (err) |
... | ... | @@ -883,7 +883,7 @@ |
883 | 883 | "err=%d\n", pbm->name, err); |
884 | 884 | |
885 | 885 | if (pbm_routes_this_ino(pbm, SCHIZO_SERR_INO)) { |
886 | - err = request_irq(op->irqs[3], schizo_safarierr_intr, 0, | |
886 | + err = request_irq(op->archdata.irqs[3], schizo_safarierr_intr, 0, | |
887 | 887 | "TOMATILLO_SERR", pbm); |
888 | 888 | if (err) |
889 | 889 | printk(KERN_WARNING "%s: Could not register SERR, " |
890 | 890 | |
... | ... | @@ -952,14 +952,14 @@ |
952 | 952 | */ |
953 | 953 | |
954 | 954 | if (pbm_routes_this_ino(pbm, SCHIZO_UE_INO)) { |
955 | - err = request_irq(op->irqs[1], schizo_ue_intr, 0, | |
955 | + err = request_irq(op->archdata.irqs[1], schizo_ue_intr, 0, | |
956 | 956 | "SCHIZO_UE", pbm); |
957 | 957 | if (err) |
958 | 958 | printk(KERN_WARNING "%s: Could not register UE, " |
959 | 959 | "err=%d\n", pbm->name, err); |
960 | 960 | } |
961 | 961 | if (pbm_routes_this_ino(pbm, SCHIZO_CE_INO)) { |
962 | - err = request_irq(op->irqs[2], schizo_ce_intr, 0, | |
962 | + err = request_irq(op->archdata.irqs[2], schizo_ce_intr, 0, | |
963 | 963 | "SCHIZO_CE", pbm); |
964 | 964 | if (err) |
965 | 965 | printk(KERN_WARNING "%s: Could not register CE, " |
966 | 966 | |
... | ... | @@ -967,10 +967,10 @@ |
967 | 967 | } |
968 | 968 | err = 0; |
969 | 969 | if (pbm_routes_this_ino(pbm, SCHIZO_PCIERR_A_INO)) { |
970 | - err = request_irq(op->irqs[0], schizo_pcierr_intr, 0, | |
970 | + err = request_irq(op->archdata.irqs[0], schizo_pcierr_intr, 0, | |
971 | 971 | "SCHIZO_PCIERR", pbm); |
972 | 972 | } else if (pbm_routes_this_ino(pbm, SCHIZO_PCIERR_B_INO)) { |
973 | - err = request_irq(op->irqs[0], schizo_pcierr_intr, 0, | |
973 | + err = request_irq(op->archdata.irqs[0], schizo_pcierr_intr, 0, | |
974 | 974 | "SCHIZO_PCIERR", pbm); |
975 | 975 | } |
976 | 976 | if (err) |
... | ... | @@ -978,7 +978,7 @@ |
978 | 978 | "err=%d\n", pbm->name, err); |
979 | 979 | |
980 | 980 | if (pbm_routes_this_ino(pbm, SCHIZO_SERR_INO)) { |
981 | - err = request_irq(op->irqs[3], schizo_safarierr_intr, 0, | |
981 | + err = request_irq(op->archdata.irqs[3], schizo_safarierr_intr, 0, | |
982 | 982 | "SCHIZO_SERR", pbm); |
983 | 983 | if (err) |
984 | 984 | printk(KERN_WARNING "%s: Could not register SERR, " |
arch/sparc/kernel/power.c
... | ... | @@ -36,7 +36,7 @@ |
36 | 36 | static int __devinit power_probe(struct of_device *op, const struct of_device_id *match) |
37 | 37 | { |
38 | 38 | struct resource *res = &op->resource[0]; |
39 | - unsigned int irq= op->irqs[0]; | |
39 | + unsigned int irq = op->archdata.irqs[0]; | |
40 | 40 | |
41 | 41 | power_reg = of_ioremap(res, 0, 0x4, "power"); |
42 | 42 |
drivers/atm/fore200e.c
... | ... | @@ -2657,7 +2657,7 @@ |
2657 | 2657 | |
2658 | 2658 | fore200e->bus = bus; |
2659 | 2659 | fore200e->bus_dev = op; |
2660 | - fore200e->irq = op->irqs[0]; | |
2660 | + fore200e->irq = op->archdata.irqs[0]; | |
2661 | 2661 | fore200e->phys_base = op->resource[0].start; |
2662 | 2662 | |
2663 | 2663 | sprintf(fore200e->name, "%s-%d", bus->model_name, index); |
drivers/input/serio/i8042-sparcio.h
... | ... | @@ -58,9 +58,9 @@ |
58 | 58 | if (!strcmp(dp->name, OBP_PS2KBD_NAME1) || |
59 | 59 | !strcmp(dp->name, OBP_PS2KBD_NAME2)) { |
60 | 60 | struct of_device *kbd = of_find_device_by_node(dp); |
61 | - unsigned int irq = kbd->irqs[0]; | |
61 | + unsigned int irq = kbd->archdata.irqs[0]; | |
62 | 62 | if (irq == 0xffffffff) |
63 | - irq = op->irqs[0]; | |
63 | + irq = op->archdata.irqs[0]; | |
64 | 64 | i8042_kbd_irq = irq; |
65 | 65 | kbd_iobase = of_ioremap(&kbd->resource[0], |
66 | 66 | 0, 8, "kbd"); |
67 | 67 | |
... | ... | @@ -68,9 +68,9 @@ |
68 | 68 | } else if (!strcmp(dp->name, OBP_PS2MS_NAME1) || |
69 | 69 | !strcmp(dp->name, OBP_PS2MS_NAME2)) { |
70 | 70 | struct of_device *ms = of_find_device_by_node(dp); |
71 | - unsigned int irq = ms->irqs[0]; | |
71 | + unsigned int irq = ms->archdata.irqs[0]; | |
72 | 72 | if (irq == 0xffffffff) |
73 | - irq = op->irqs[0]; | |
73 | + irq = op->archdata.irqs[0]; | |
74 | 74 | i8042_aux_irq = irq; |
75 | 75 | } |
76 | 76 |
drivers/net/myri_sbus.c
drivers/net/niu.c
... | ... | @@ -9119,12 +9119,12 @@ |
9119 | 9119 | if (!int_prop) |
9120 | 9120 | return -ENODEV; |
9121 | 9121 | |
9122 | - for (i = 0; i < op->num_irqs; i++) { | |
9122 | + for (i = 0; i < op->archdata.num_irqs; i++) { | |
9123 | 9123 | ldg_num_map[i] = int_prop[i]; |
9124 | - np->ldg[i].irq = op->irqs[i]; | |
9124 | + np->ldg[i].irq = op->archdata.irqs[i]; | |
9125 | 9125 | } |
9126 | 9126 | |
9127 | - np->num_ldg = op->num_irqs; | |
9127 | + np->num_ldg = op->archdata.num_irqs; | |
9128 | 9128 | |
9129 | 9129 | return 0; |
9130 | 9130 | #else |
drivers/net/sunbmac.c
drivers/net/sunhme.c
... | ... | @@ -2561,7 +2561,7 @@ |
2561 | 2561 | if (skip) |
2562 | 2562 | continue; |
2563 | 2563 | |
2564 | - err = request_irq(op->irqs[0], | |
2564 | + err = request_irq(op->archdata.irqs[0], | |
2565 | 2565 | quattro_sbus_interrupt, |
2566 | 2566 | IRQF_SHARED, "Quattro", |
2567 | 2567 | qp); |
... | ... | @@ -2590,7 +2590,7 @@ |
2590 | 2590 | if (skip) |
2591 | 2591 | continue; |
2592 | 2592 | |
2593 | - free_irq(op->irqs[0], qp); | |
2593 | + free_irq(op->archdata.irqs[0], qp); | |
2594 | 2594 | } |
2595 | 2595 | } |
2596 | 2596 | #endif /* CONFIG_SBUS */ |
... | ... | @@ -2790,7 +2790,7 @@ |
2790 | 2790 | /* Happy Meal can do it all... */ |
2791 | 2791 | dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM; |
2792 | 2792 | |
2793 | - dev->irq = op->irqs[0]; | |
2793 | + dev->irq = op->archdata.irqs[0]; | |
2794 | 2794 | |
2795 | 2795 | #if defined(CONFIG_SBUS) && defined(CONFIG_PCI) |
2796 | 2796 | /* Hook up SBUS register/descriptor accessors. */ |
drivers/net/sunlance.c
... | ... | @@ -1474,7 +1474,7 @@ |
1474 | 1474 | dev->ethtool_ops = &sparc_lance_ethtool_ops; |
1475 | 1475 | dev->netdev_ops = &sparc_lance_ops; |
1476 | 1476 | |
1477 | - dev->irq = op->irqs[0]; | |
1477 | + dev->irq = op->archdata.irqs[0]; | |
1478 | 1478 | |
1479 | 1479 | /* We cannot sleep if the chip is busy during a |
1480 | 1480 | * multicast list update event, because such events |
drivers/net/sunqe.c
... | ... | @@ -803,7 +803,7 @@ |
803 | 803 | |
804 | 804 | qec_init_once(qecp, op); |
805 | 805 | |
806 | - if (request_irq(op->irqs[0], qec_interrupt, | |
806 | + if (request_irq(op->archdata.irqs[0], qec_interrupt, | |
807 | 807 | IRQF_SHARED, "qec", (void *) qecp)) { |
808 | 808 | printk(KERN_ERR "qec: Can't register irq.\n"); |
809 | 809 | goto fail; |
... | ... | @@ -901,7 +901,7 @@ |
901 | 901 | SET_NETDEV_DEV(dev, &op->dev); |
902 | 902 | |
903 | 903 | dev->watchdog_timeo = 5*HZ; |
904 | - dev->irq = op->irqs[0]; | |
904 | + dev->irq = op->archdata.irqs[0]; | |
905 | 905 | dev->dma = 0; |
906 | 906 | dev->ethtool_ops = &qe_ethtool_ops; |
907 | 907 | dev->netdev_ops = &qec_ops; |
... | ... | @@ -999,7 +999,7 @@ |
999 | 999 | struct sunqec *next = root_qec_dev->next_module; |
1000 | 1000 | struct of_device *op = root_qec_dev->op; |
1001 | 1001 | |
1002 | - free_irq(op->irqs[0], (void *) root_qec_dev); | |
1002 | + free_irq(op->archdata.irqs[0], (void *) root_qec_dev); | |
1003 | 1003 | of_iounmap(&op->resource[0], root_qec_dev->gregs, |
1004 | 1004 | GLOB_REG_SIZE); |
1005 | 1005 | kfree(root_qec_dev); |
drivers/parport/parport_sunbpp.c
drivers/sbus/char/bbc_i2c.c
... | ... | @@ -317,7 +317,7 @@ |
317 | 317 | |
318 | 318 | bp->waiting = 0; |
319 | 319 | init_waitqueue_head(&bp->wq); |
320 | - if (request_irq(op->irqs[0], bbc_i2c_interrupt, | |
320 | + if (request_irq(op->archdata.irqs[0], bbc_i2c_interrupt, | |
321 | 321 | IRQF_SHARED, "bbc_i2c", bp)) |
322 | 322 | goto fail; |
323 | 323 | |
... | ... | @@ -373,7 +373,7 @@ |
373 | 373 | |
374 | 374 | err = bbc_envctrl_init(bp); |
375 | 375 | if (err) { |
376 | - free_irq(op->irqs[0], bp); | |
376 | + free_irq(op->archdata.irqs[0], bp); | |
377 | 377 | if (bp->i2c_bussel_reg) |
378 | 378 | of_iounmap(&op->resource[0], bp->i2c_bussel_reg, 1); |
379 | 379 | if (bp->i2c_control_regs) |
... | ... | @@ -392,7 +392,7 @@ |
392 | 392 | |
393 | 393 | bbc_envctrl_cleanup(bp); |
394 | 394 | |
395 | - free_irq(op->irqs[0], bp); | |
395 | + free_irq(op->archdata.irqs[0], bp); | |
396 | 396 | |
397 | 397 | if (bp->i2c_bussel_reg) |
398 | 398 | of_iounmap(&op->resource[0], bp->i2c_bussel_reg, 1); |
drivers/sbus/char/uctrl.c
drivers/scsi/qlogicpti.c
... | ... | @@ -729,7 +729,7 @@ |
729 | 729 | { |
730 | 730 | struct of_device *op = qpti->op; |
731 | 731 | |
732 | - qpti->qhost->irq = qpti->irq = op->irqs[0]; | |
732 | + qpti->qhost->irq = qpti->irq = op->archdata.irqs[0]; | |
733 | 733 | |
734 | 734 | /* We used to try various overly-clever things to |
735 | 735 | * reduce the interrupt processing overhead on |
... | ... | @@ -1302,7 +1302,7 @@ |
1302 | 1302 | /* Sometimes Antares cards come up not completely |
1303 | 1303 | * setup, and we get a report of a zero IRQ. |
1304 | 1304 | */ |
1305 | - if (op->irqs[0] == 0) | |
1305 | + if (op->archdata.irqs[0] == 0) | |
1306 | 1306 | return -ENODEV; |
1307 | 1307 | |
1308 | 1308 | host = scsi_host_alloc(tpnt, sizeof(struct qlogicpti)); |
drivers/scsi/sun_esp.c
drivers/serial/sunhv.c
... | ... | @@ -525,7 +525,7 @@ |
525 | 525 | unsigned long minor; |
526 | 526 | int err; |
527 | 527 | |
528 | - if (op->irqs[0] == 0xffffffff) | |
528 | + if (op->archdata.irqs[0] == 0xffffffff) | |
529 | 529 | return -ENODEV; |
530 | 530 | |
531 | 531 | port = kzalloc(sizeof(struct uart_port), GFP_KERNEL); |
... | ... | @@ -557,7 +557,7 @@ |
557 | 557 | |
558 | 558 | port->membase = (unsigned char __iomem *) __pa(port); |
559 | 559 | |
560 | - port->irq = op->irqs[0]; | |
560 | + port->irq = op->archdata.irqs[0]; | |
561 | 561 | |
562 | 562 | port->dev = &op->dev; |
563 | 563 |
drivers/serial/sunsab.c
... | ... | @@ -969,7 +969,7 @@ |
969 | 969 | return -ENOMEM; |
970 | 970 | up->regs = (union sab82532_async_regs __iomem *) up->port.membase; |
971 | 971 | |
972 | - up->port.irq = op->irqs[0]; | |
972 | + up->port.irq = op->archdata.irqs[0]; | |
973 | 973 | |
974 | 974 | up->port.fifosize = SAB82532_XMIT_FIFO_SIZE; |
975 | 975 | up->port.iotype = UPIO_MEM; |
drivers/serial/sunsu.c
drivers/serial/sunzilog.c
... | ... | @@ -1426,7 +1426,7 @@ |
1426 | 1426 | rp = sunzilog_chip_regs[inst]; |
1427 | 1427 | |
1428 | 1428 | if (zilog_irq == -1) |
1429 | - zilog_irq = op->irqs[0]; | |
1429 | + zilog_irq = op->archdata.irqs[0]; | |
1430 | 1430 | |
1431 | 1431 | up = &sunzilog_port_table[inst * 2]; |
1432 | 1432 | |
... | ... | @@ -1434,7 +1434,7 @@ |
1434 | 1434 | up[0].port.mapbase = op->resource[0].start + 0x00; |
1435 | 1435 | up[0].port.membase = (void __iomem *) &rp->channelA; |
1436 | 1436 | up[0].port.iotype = UPIO_MEM; |
1437 | - up[0].port.irq = op->irqs[0]; | |
1437 | + up[0].port.irq = op->archdata.irqs[0]; | |
1438 | 1438 | up[0].port.uartclk = ZS_CLOCK; |
1439 | 1439 | up[0].port.fifosize = 1; |
1440 | 1440 | up[0].port.ops = &sunzilog_pops; |
... | ... | @@ -1451,7 +1451,7 @@ |
1451 | 1451 | up[1].port.mapbase = op->resource[0].start + 0x04; |
1452 | 1452 | up[1].port.membase = (void __iomem *) &rp->channelB; |
1453 | 1453 | up[1].port.iotype = UPIO_MEM; |
1454 | - up[1].port.irq = op->irqs[0]; | |
1454 | + up[1].port.irq = op->archdata.irqs[0]; | |
1455 | 1455 | up[1].port.uartclk = ZS_CLOCK; |
1456 | 1456 | up[1].port.fifosize = 1; |
1457 | 1457 | up[1].port.ops = &sunzilog_pops; |
1458 | 1458 | |
... | ... | @@ -1492,12 +1492,12 @@ |
1492 | 1492 | "is a %s\n", |
1493 | 1493 | dev_name(&op->dev), |
1494 | 1494 | (unsigned long long) up[0].port.mapbase, |
1495 | - op->irqs[0], sunzilog_type(&up[0].port)); | |
1495 | + op->archdata.irqs[0], sunzilog_type(&up[0].port)); | |
1496 | 1496 | printk(KERN_INFO "%s: Mouse at MMIO 0x%llx (irq = %d) " |
1497 | 1497 | "is a %s\n", |
1498 | 1498 | dev_name(&op->dev), |
1499 | 1499 | (unsigned long long) up[1].port.mapbase, |
1500 | - op->irqs[0], sunzilog_type(&up[1].port)); | |
1500 | + op->archdata.irqs[0], sunzilog_type(&up[1].port)); | |
1501 | 1501 | kbm_inst++; |
1502 | 1502 | } |
1503 | 1503 |
drivers/watchdog/cpwd.c
sound/sparc/amd7930.c
sound/sparc/cs4231.c
... | ... | @@ -1832,14 +1832,14 @@ |
1832 | 1832 | chip->c_dma.request = sbus_dma_request; |
1833 | 1833 | chip->c_dma.address = sbus_dma_addr; |
1834 | 1834 | |
1835 | - if (request_irq(op->irqs[0], snd_cs4231_sbus_interrupt, | |
1835 | + if (request_irq(op->archdata.irqs[0], snd_cs4231_sbus_interrupt, | |
1836 | 1836 | IRQF_SHARED, "cs4231", chip)) { |
1837 | 1837 | snd_printdd("cs4231-%d: Unable to grab SBUS IRQ %d\n", |
1838 | - dev, op->irqs[0]); | |
1838 | + dev, op->archdata.irqs[0]); | |
1839 | 1839 | snd_cs4231_sbus_free(chip); |
1840 | 1840 | return -EBUSY; |
1841 | 1841 | } |
1842 | - chip->irq[0] = op->irqs[0]; | |
1842 | + chip->irq[0] = op->archdata.irqs[0]; | |
1843 | 1843 | |
1844 | 1844 | if (snd_cs4231_probe(chip) < 0) { |
1845 | 1845 | snd_cs4231_sbus_free(chip); |
... | ... | @@ -1870,7 +1870,7 @@ |
1870 | 1870 | card->shortname, |
1871 | 1871 | rp->flags & 0xffL, |
1872 | 1872 | (unsigned long long)rp->start, |
1873 | - op->irqs[0]); | |
1873 | + op->archdata.irqs[0]); | |
1874 | 1874 | |
1875 | 1875 | err = snd_cs4231_sbus_create(card, op, dev); |
1876 | 1876 | if (err < 0) { |
1877 | 1877 | |
... | ... | @@ -1979,12 +1979,12 @@ |
1979 | 1979 | chip->c_dma.ebus_info.flags = EBUS_DMA_FLAG_USE_EBDMA_HANDLER; |
1980 | 1980 | chip->c_dma.ebus_info.callback = snd_cs4231_ebus_capture_callback; |
1981 | 1981 | chip->c_dma.ebus_info.client_cookie = chip; |
1982 | - chip->c_dma.ebus_info.irq = op->irqs[0]; | |
1982 | + chip->c_dma.ebus_info.irq = op->archdata.irqs[0]; | |
1983 | 1983 | strcpy(chip->p_dma.ebus_info.name, "cs4231(play)"); |
1984 | 1984 | chip->p_dma.ebus_info.flags = EBUS_DMA_FLAG_USE_EBDMA_HANDLER; |
1985 | 1985 | chip->p_dma.ebus_info.callback = snd_cs4231_ebus_play_callback; |
1986 | 1986 | chip->p_dma.ebus_info.client_cookie = chip; |
1987 | - chip->p_dma.ebus_info.irq = op->irqs[1]; | |
1987 | + chip->p_dma.ebus_info.irq = op->archdata.irqs[1]; | |
1988 | 1988 | |
1989 | 1989 | chip->p_dma.prepare = _ebus_dma_prepare; |
1990 | 1990 | chip->p_dma.enable = _ebus_dma_enable; |
... | ... | @@ -2060,7 +2060,7 @@ |
2060 | 2060 | sprintf(card->longname, "%s at 0x%llx, irq %d", |
2061 | 2061 | card->shortname, |
2062 | 2062 | op->resource[0].start, |
2063 | - op->irqs[0]); | |
2063 | + op->archdata.irqs[0]); | |
2064 | 2064 | |
2065 | 2065 | err = snd_cs4231_ebus_create(card, op, dev); |
2066 | 2066 | if (err < 0) { |