aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-06-18 13:09:58 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-06-28 15:41:33 -0400
commit1636f8ac2b08410df4766449f7c86b912443cd99 (patch)
tree9c923c017e956779f237d4ffa51d49beb3de6d3e /arch/sparc
parent2b07be2493681220cac4d185494a4edb0b8efd1e (diff)
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>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/include/asm/device.h5
-rw-r--r--arch/sparc/include/asm/floppy_64.h4
-rw-r--r--arch/sparc/include/asm/of_device.h11
-rw-r--r--arch/sparc/include/asm/parport.h4
-rw-r--r--arch/sparc/kernel/of_device_32.c28
-rw-r--r--arch/sparc/kernel/of_device_64.c24
-rw-r--r--arch/sparc/kernel/of_device_common.c4
-rw-r--r--arch/sparc/kernel/pci.c2
-rw-r--r--arch/sparc/kernel/pci_psycho.c8
-rw-r--r--arch/sparc/kernel/pci_sabre.c8
-rw-r--r--arch/sparc/kernel/pci_schizo.c20
-rw-r--r--arch/sparc/kernel/power.c2
12 files changed, 56 insertions, 64 deletions
diff --git a/arch/sparc/include/asm/device.h b/arch/sparc/include/asm/device.h
index d4c452147412..f9740d065fe7 100644
--- a/arch/sparc/include/asm/device.h
+++ b/arch/sparc/include/asm/device.h
@@ -6,6 +6,8 @@
6#ifndef _ASM_SPARC_DEVICE_H 6#ifndef _ASM_SPARC_DEVICE_H
7#define _ASM_SPARC_DEVICE_H 7#define _ASM_SPARC_DEVICE_H
8 8
9#include <asm/openprom.h>
10
9struct device_node; 11struct device_node;
10struct of_device; 12struct of_device;
11 13
@@ -18,6 +20,9 @@ struct dev_archdata {
18}; 20};
19 21
20struct pdev_archdata { 22struct pdev_archdata {
23 struct resource resource[PROMREG_MAX];
24 unsigned int irqs[PROMINTR_MAX];
25 int num_irqs;
21}; 26};
22 27
23#endif /* _ASM_SPARC_DEVICE_H */ 28#endif /* _ASM_SPARC_DEVICE_H */
diff --git a/arch/sparc/include/asm/floppy_64.h b/arch/sparc/include/asm/floppy_64.h
index 8fac3ab22f36..4f5bde638f72 100644
--- a/arch/sparc/include/asm/floppy_64.h
+++ b/arch/sparc/include/asm/floppy_64.h
@@ -567,7 +567,7 @@ static unsigned long __init sun_floppy_init(void)
567 } 567 }
568 if (op) { 568 if (op) {
569 floppy_op = op; 569 floppy_op = op;
570 FLOPPY_IRQ = op->irqs[0]; 570 FLOPPY_IRQ = op->archdata.irqs[0];
571 } else { 571 } else {
572 struct device_node *ebus_dp; 572 struct device_node *ebus_dp;
573 void __iomem *auxio_reg; 573 void __iomem *auxio_reg;
@@ -593,7 +593,7 @@ static unsigned long __init sun_floppy_init(void)
593 if (state_prop && !strncmp(state_prop, "disabled", 8)) 593 if (state_prop && !strncmp(state_prop, "disabled", 8))
594 return 0; 594 return 0;
595 595
596 FLOPPY_IRQ = op->irqs[0]; 596 FLOPPY_IRQ = op->archdata.irqs[0];
597 597
598 /* Make sure the high density bit is set, some systems 598 /* Make sure the high density bit is set, some systems
599 * (most notably Ultra5/Ultra10) come up with it clear. 599 * (most notably Ultra5/Ultra10) come up with it clear.
diff --git a/arch/sparc/include/asm/of_device.h b/arch/sparc/include/asm/of_device.h
index f320246a0586..6d1844a547b4 100644
--- a/arch/sparc/include/asm/of_device.h
+++ b/arch/sparc/include/asm/of_device.h
@@ -15,15 +15,10 @@
15struct of_device 15struct of_device
16{ 16{
17 struct device dev; 17 struct device dev;
18 struct resource resource[PROMREG_MAX]; 18 u32 num_resources;
19 unsigned int irqs[PROMINTR_MAX]; 19 struct resource *resource;
20 int num_irqs;
21 20
22 void *sysdata; 21 struct pdev_archdata archdata;
23
24 int slot;
25 int portid;
26 int clock_freq;
27}; 22};
28 23
29extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name); 24extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name);
diff --git a/arch/sparc/include/asm/parport.h b/arch/sparc/include/asm/parport.h
index c333b8d0949b..0c34a8792fc7 100644
--- a/arch/sparc/include/asm/parport.h
+++ b/arch/sparc/include/asm/parport.h
@@ -116,7 +116,7 @@ static int __devinit ecpp_probe(struct of_device *op, const struct of_device_id
116 parent = op->dev.of_node->parent; 116 parent = op->dev.of_node->parent;
117 if (!strcmp(parent->name, "dma")) { 117 if (!strcmp(parent->name, "dma")) {
118 p = parport_pc_probe_port(base, base + 0x400, 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 op->dev.parent->parent, 0); 120 op->dev.parent->parent, 0);
121 if (!p) 121 if (!p)
122 return -ENOMEM; 122 return -ENOMEM;
@@ -166,7 +166,7 @@ static int __devinit ecpp_probe(struct of_device *op, const struct of_device_id
166 0, PTR_LPT_REG_DIR); 166 0, PTR_LPT_REG_DIR);
167 167
168 p = parport_pc_probe_port(base, base + 0x400, 168 p = parport_pc_probe_port(base, base + 0x400,
169 op->irqs[0], 169 op->archdata.irqs[0],
170 slot, 170 slot,
171 op->dev.parent, 171 op->dev.parent,
172 0); 172 0);
diff --git a/arch/sparc/kernel/of_device_32.c b/arch/sparc/kernel/of_device_32.c
index 47e63f1e719c..331de91ad2bc 100644
--- a/arch/sparc/kernel/of_device_32.c
+++ b/arch/sparc/kernel/of_device_32.c
@@ -267,6 +267,8 @@ static void __init build_device_resources(struct of_device *op,
267 /* Conver to num-entries. */ 267 /* Conver to num-entries. */
268 num_reg /= na + ns; 268 num_reg /= na + ns;
269 269
270 op->resource = op->archdata.resource;
271 op->num_resources = num_reg;
270 for (index = 0; index < num_reg; index++) { 272 for (index = 0; index < num_reg; index++) {
271 struct resource *r = &op->resource[index]; 273 struct resource *r = &op->resource[index];
272 u32 addr[OF_MAX_ADDR_CELLS]; 274 u32 addr[OF_MAX_ADDR_CELLS];
@@ -349,27 +351,21 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
349 351
350 op->dev.of_node = dp; 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 intr = of_get_property(dp, "intr", &len); 354 intr = of_get_property(dp, "intr", &len);
359 if (intr) { 355 if (intr) {
360 op->num_irqs = len / sizeof(struct linux_prom_irqs); 356 op->archdata.num_irqs = len / sizeof(struct linux_prom_irqs);
361 for (i = 0; i < op->num_irqs; i++) 357 for (i = 0; i < op->archdata.num_irqs; i++)
362 op->irqs[i] = intr[i].pri; 358 op->archdata.irqs[i] = intr[i].pri;
363 } else { 359 } else {
364 const unsigned int *irq = 360 const unsigned int *irq =
365 of_get_property(dp, "interrupts", &len); 361 of_get_property(dp, "interrupts", &len);
366 362
367 if (irq) { 363 if (irq) {
368 op->num_irqs = len / sizeof(unsigned int); 364 op->archdata.num_irqs = len / sizeof(unsigned int);
369 for (i = 0; i < op->num_irqs; i++) 365 for (i = 0; i < op->archdata.num_irqs; i++)
370 op->irqs[i] = irq[i]; 366 op->archdata.irqs[i] = irq[i];
371 } else { 367 } else {
372 op->num_irqs = 0; 368 op->archdata.num_irqs = 0;
373 } 369 }
374 } 370 }
375 if (sparc_cpu_model == sun4d) { 371 if (sparc_cpu_model == sun4d) {
@@ -411,8 +407,8 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
411 goto build_resources; 407 goto build_resources;
412 } 408 }
413 409
414 for (i = 0; i < op->num_irqs; i++) { 410 for (i = 0; i < op->archdata.num_irqs; i++) {
415 int this_irq = op->irqs[i]; 411 int this_irq = op->archdata.irqs[i];
416 int sbusl = pil_to_sbus[this_irq]; 412 int sbusl = pil_to_sbus[this_irq];
417 413
418 if (sbusl) 414 if (sbusl)
@@ -420,7 +416,7 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
420 (sbusl << 2) + 416 (sbusl << 2) +
421 slot); 417 slot);
422 418
423 op->irqs[i] = this_irq; 419 op->archdata.irqs[i] = this_irq;
424 } 420 }
425 } 421 }
426 422
diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c
index 1dae8079f728..5e8cbb942d3d 100644
--- a/arch/sparc/kernel/of_device_64.c
+++ b/arch/sparc/kernel/of_device_64.c
@@ -344,6 +344,8 @@ static void __init build_device_resources(struct of_device *op,
344 num_reg = PROMREG_MAX; 344 num_reg = PROMREG_MAX;
345 } 345 }
346 346
347 op->resource = op->archdata.resource;
348 op->num_resources = num_reg;
347 for (index = 0; index < num_reg; index++) { 349 for (index = 0; index < num_reg; index++) {
348 struct resource *r = &op->resource[index]; 350 struct resource *r = &op->resource[index];
349 u32 addr[OF_MAX_ADDR_CELLS]; 351 u32 addr[OF_MAX_ADDR_CELLS];
@@ -644,31 +646,25 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
644 646
645 op->dev.of_node = dp; 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 irq = of_get_property(dp, "interrupts", &len); 649 irq = of_get_property(dp, "interrupts", &len);
654 if (irq) { 650 if (irq) {
655 op->num_irqs = len / 4; 651 op->archdata.num_irqs = len / 4;
656 652
657 /* Prevent overrunning the op->irqs[] array. */ 653 /* Prevent overrunning the op->irqs[] array. */
658 if (op->num_irqs > PROMINTR_MAX) { 654 if (op->archdata.num_irqs > PROMINTR_MAX) {
659 printk(KERN_WARNING "%s: Too many irqs (%d), " 655 printk(KERN_WARNING "%s: Too many irqs (%d), "
660 "limiting to %d.\n", 656 "limiting to %d.\n",
661 dp->full_name, op->num_irqs, PROMINTR_MAX); 657 dp->full_name, op->archdata.num_irqs, PROMINTR_MAX);
662 op->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 } else { 661 } else {
666 op->num_irqs = 0; 662 op->archdata.num_irqs = 0;
667 } 663 }
668 664
669 build_device_resources(op, parent); 665 build_device_resources(op, parent);
670 for (i = 0; i < op->num_irqs; i++) 666 for (i = 0; i < op->archdata.num_irqs; i++)
671 op->irqs[i] = build_one_device_irq(op, parent, op->irqs[i]); 667 op->archdata.irqs[i] = build_one_device_irq(op, parent, op->archdata.irqs[i]);
672 668
673 op->dev.parent = parent; 669 op->dev.parent = parent;
674 op->dev.bus = &of_platform_bus_type; 670 op->dev.bus = &of_platform_bus_type;
diff --git a/arch/sparc/kernel/of_device_common.c b/arch/sparc/kernel/of_device_common.c
index 10c6c36a6e75..016c947d4cae 100644
--- a/arch/sparc/kernel/of_device_common.c
+++ b/arch/sparc/kernel/of_device_common.c
@@ -35,10 +35,10 @@ unsigned int irq_of_parse_and_map(struct device_node *node, int index)
35{ 35{
36 struct of_device *op = of_find_device_by_node(node); 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 return 0; 39 return 0;
40 40
41 return op->irqs[index]; 41 return op->archdata.irqs[index];
42} 42}
43EXPORT_SYMBOL(irq_of_parse_and_map); 43EXPORT_SYMBOL(irq_of_parse_and_map);
44 44
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index 8a8363adb8bd..1523290db0a1 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -340,7 +340,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
340 dev->hdr_type = PCI_HEADER_TYPE_NORMAL; 340 dev->hdr_type = PCI_HEADER_TYPE_NORMAL;
341 dev->rom_base_reg = PCI_ROM_ADDRESS; 341 dev->rom_base_reg = PCI_ROM_ADDRESS;
342 342
343 dev->irq = sd->op->irqs[0]; 343 dev->irq = sd->op->archdata.irqs[0];
344 if (dev->irq == 0xffffffff) 344 if (dev->irq == 0xffffffff)
345 dev->irq = PCI_IRQ_NONE; 345 dev->irq = PCI_IRQ_NONE;
346 } 346 }
diff --git a/arch/sparc/kernel/pci_psycho.c b/arch/sparc/kernel/pci_psycho.c
index 558a70512824..93011e6e7ddc 100644
--- a/arch/sparc/kernel/pci_psycho.c
+++ b/arch/sparc/kernel/pci_psycho.c
@@ -302,23 +302,23 @@ static void psycho_register_error_handlers(struct pci_pbm_info *pbm)
302 * 5: POWER MANAGEMENT 302 * 5: POWER MANAGEMENT
303 */ 303 */
304 304
305 if (op->num_irqs < 6) 305 if (op->archdata.num_irqs < 6)
306 return; 306 return;
307 307
308 /* We really mean to ignore the return result here. Two 308 /* We really mean to ignore the return result here. Two
309 * PCI controller share the same interrupt numbers and 309 * PCI controller share the same interrupt numbers and
310 * drive the same front-end hardware. 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 "PSYCHO_UE", pbm); 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 "PSYCHO_CE", pbm); 315 "PSYCHO_CE", pbm);
316 316
317 /* This one, however, ought not to fail. We can just warn 317 /* This one, however, ought not to fail. We can just warn
318 * about it since the system can still operate properly even 318 * about it since the system can still operate properly even
319 * if this fails. 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 "PSYCHO_PCIERR", pbm); 322 "PSYCHO_PCIERR", pbm);
323 if (err) 323 if (err)
324 printk(KERN_WARNING "%s: Could not register PCIERR, " 324 printk(KERN_WARNING "%s: Could not register PCIERR, "
diff --git a/arch/sparc/kernel/pci_sabre.c b/arch/sparc/kernel/pci_sabre.c
index 6dad8e3b7506..99c6dba7d4fd 100644
--- a/arch/sparc/kernel/pci_sabre.c
+++ b/arch/sparc/kernel/pci_sabre.c
@@ -329,7 +329,7 @@ static void sabre_register_error_handlers(struct pci_pbm_info *pbm)
329 * 2: CE ERR 329 * 2: CE ERR
330 * 3: POWER FAIL 330 * 3: POWER FAIL
331 */ 331 */
332 if (op->num_irqs < 4) 332 if (op->archdata.num_irqs < 4)
333 return; 333 return;
334 334
335 /* We clear the error bits in the appropriate AFSR before 335 /* We clear the error bits in the appropriate AFSR before
@@ -341,7 +341,7 @@ static void sabre_register_error_handlers(struct pci_pbm_info *pbm)
341 SABRE_UEAFSR_SDTE | SABRE_UEAFSR_PDTE), 341 SABRE_UEAFSR_SDTE | SABRE_UEAFSR_PDTE),
342 base + SABRE_UE_AFSR); 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 if (err) 345 if (err)
346 printk(KERN_WARNING "%s: Couldn't register UE, err=%d.\n", 346 printk(KERN_WARNING "%s: Couldn't register UE, err=%d.\n",
347 pbm->name, err); 347 pbm->name, err);
@@ -351,11 +351,11 @@ static void sabre_register_error_handlers(struct pci_pbm_info *pbm)
351 base + SABRE_CE_AFSR); 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 if (err) 355 if (err)
356 printk(KERN_WARNING "%s: Couldn't register CE, err=%d.\n", 356 printk(KERN_WARNING "%s: Couldn't register CE, err=%d.\n",
357 pbm->name, err); 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 "SABRE_PCIERR", pbm); 359 "SABRE_PCIERR", pbm);
360 if (err) 360 if (err)
361 printk(KERN_WARNING "%s: Couldn't register PCIERR, err=%d.\n", 361 printk(KERN_WARNING "%s: Couldn't register PCIERR, err=%d.\n",
diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c
index 97a1ae2e1c02..9041dae7aaca 100644
--- a/arch/sparc/kernel/pci_schizo.c
+++ b/arch/sparc/kernel/pci_schizo.c
@@ -857,14 +857,14 @@ static void tomatillo_register_error_handlers(struct pci_pbm_info *pbm)
857 */ 857 */
858 858
859 if (pbm_routes_this_ino(pbm, SCHIZO_UE_INO)) { 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 "TOMATILLO_UE", pbm); 861 "TOMATILLO_UE", pbm);
862 if (err) 862 if (err)
863 printk(KERN_WARNING "%s: Could not register UE, " 863 printk(KERN_WARNING "%s: Could not register UE, "
864 "err=%d\n", pbm->name, err); 864 "err=%d\n", pbm->name, err);
865 } 865 }
866 if (pbm_routes_this_ino(pbm, SCHIZO_CE_INO)) { 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 "TOMATILLO_CE", pbm); 868 "TOMATILLO_CE", pbm);
869 if (err) 869 if (err)
870 printk(KERN_WARNING "%s: Could not register CE, " 870 printk(KERN_WARNING "%s: Could not register CE, "
@@ -872,10 +872,10 @@ static void tomatillo_register_error_handlers(struct pci_pbm_info *pbm)
872 } 872 }
873 err = 0; 873 err = 0;
874 if (pbm_routes_this_ino(pbm, SCHIZO_PCIERR_A_INO)) { 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 "TOMATILLO_PCIERR", pbm); 876 "TOMATILLO_PCIERR", pbm);
877 } else if (pbm_routes_this_ino(pbm, SCHIZO_PCIERR_B_INO)) { 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 "TOMATILLO_PCIERR", pbm); 879 "TOMATILLO_PCIERR", pbm);
880 } 880 }
881 if (err) 881 if (err)
@@ -883,7 +883,7 @@ static void tomatillo_register_error_handlers(struct pci_pbm_info *pbm)
883 "err=%d\n", pbm->name, err); 883 "err=%d\n", pbm->name, err);
884 884
885 if (pbm_routes_this_ino(pbm, SCHIZO_SERR_INO)) { 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 "TOMATILLO_SERR", pbm); 887 "TOMATILLO_SERR", pbm);
888 if (err) 888 if (err)
889 printk(KERN_WARNING "%s: Could not register SERR, " 889 printk(KERN_WARNING "%s: Could not register SERR, "
@@ -952,14 +952,14 @@ static void schizo_register_error_handlers(struct pci_pbm_info *pbm)
952 */ 952 */
953 953
954 if (pbm_routes_this_ino(pbm, SCHIZO_UE_INO)) { 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 "SCHIZO_UE", pbm); 956 "SCHIZO_UE", pbm);
957 if (err) 957 if (err)
958 printk(KERN_WARNING "%s: Could not register UE, " 958 printk(KERN_WARNING "%s: Could not register UE, "
959 "err=%d\n", pbm->name, err); 959 "err=%d\n", pbm->name, err);
960 } 960 }
961 if (pbm_routes_this_ino(pbm, SCHIZO_CE_INO)) { 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 "SCHIZO_CE", pbm); 963 "SCHIZO_CE", pbm);
964 if (err) 964 if (err)
965 printk(KERN_WARNING "%s: Could not register CE, " 965 printk(KERN_WARNING "%s: Could not register CE, "
@@ -967,10 +967,10 @@ static void schizo_register_error_handlers(struct pci_pbm_info *pbm)
967 } 967 }
968 err = 0; 968 err = 0;
969 if (pbm_routes_this_ino(pbm, SCHIZO_PCIERR_A_INO)) { 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 "SCHIZO_PCIERR", pbm); 971 "SCHIZO_PCIERR", pbm);
972 } else if (pbm_routes_this_ino(pbm, SCHIZO_PCIERR_B_INO)) { 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 "SCHIZO_PCIERR", pbm); 974 "SCHIZO_PCIERR", pbm);
975 } 975 }
976 if (err) 976 if (err)
@@ -978,7 +978,7 @@ static void schizo_register_error_handlers(struct pci_pbm_info *pbm)
978 "err=%d\n", pbm->name, err); 978 "err=%d\n", pbm->name, err);
979 979
980 if (pbm_routes_this_ino(pbm, SCHIZO_SERR_INO)) { 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 "SCHIZO_SERR", pbm); 982 "SCHIZO_SERR", pbm);
983 if (err) 983 if (err)
984 printk(KERN_WARNING "%s: Could not register SERR, " 984 printk(KERN_WARNING "%s: Could not register SERR, "
diff --git a/arch/sparc/kernel/power.c b/arch/sparc/kernel/power.c
index 168d4cb63f5b..1cfee577f6b5 100644
--- a/arch/sparc/kernel/power.c
+++ b/arch/sparc/kernel/power.c
@@ -36,7 +36,7 @@ static int __devinit has_button_interrupt(unsigned int irq, struct device_node *
36static int __devinit power_probe(struct of_device *op, const struct of_device_id *match) 36static int __devinit power_probe(struct of_device *op, const struct of_device_id *match)
37{ 37{
38 struct resource *res = &op->resource[0]; 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 power_reg = of_ioremap(res, 0, 0x4, "power"); 41 power_reg = of_ioremap(res, 0, 0x4, "power");
42 42