diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-04-13 19:12:29 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-05-18 18:10:44 -0400 |
commit | 61c7a080a5a061c976988fd4b844dfb468dda255 (patch) | |
tree | 8cb492b73f2755c38a6164d770da34d5af6486a0 /arch/sparc | |
parent | d12d42f744f805a9ccc33cd76f04b237cd83ce56 (diff) |
of: Always use 'struct device.of_node' to get device node pointer.
The following structure elements duplicate the information in
'struct device.of_node' and so are being eliminated. This patch
makes all readers of these elements use device.of_node instead.
(struct of_device *)->node
(struct dev_archdata *)->prom_node (sparc)
(struct dev_archdata *)->of_node (powerpc & microblaze)
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/include/asm/fb.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/floppy_64.h | 4 | ||||
-rw-r--r-- | arch/sparc/include/asm/parport.h | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/auxio_64.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/central.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/chmc.c | 10 | ||||
-rw-r--r-- | arch/sparc/kernel/ioport.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/of_device_32.c | 14 | ||||
-rw-r--r-- | arch/sparc/kernel/of_device_64.c | 26 | ||||
-rw-r--r-- | arch/sparc/kernel/of_device_common.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/pci.c | 12 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_common.c | 9 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_fire.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_msi.c | 18 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_psycho.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_sabre.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_schizo.c | 14 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_sun4v.c | 8 | ||||
-rw-r--r-- | arch/sparc/kernel/power.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/psycho_common.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/sbus.c | 16 | ||||
-rw-r--r-- | arch/sparc/kernel/time_32.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/time_64.c | 6 |
23 files changed, 86 insertions, 87 deletions
diff --git a/arch/sparc/include/asm/fb.h b/arch/sparc/include/asm/fb.h index b83e44729655..e834880be204 100644 --- a/arch/sparc/include/asm/fb.h +++ b/arch/sparc/include/asm/fb.h | |||
@@ -18,7 +18,7 @@ static inline int fb_is_primary_device(struct fb_info *info) | |||
18 | struct device *dev = info->device; | 18 | struct device *dev = info->device; |
19 | struct device_node *node; | 19 | struct device_node *node; |
20 | 20 | ||
21 | node = dev->archdata.prom_node; | 21 | node = dev->of_node; |
22 | if (node && | 22 | if (node && |
23 | node == of_console_device) | 23 | node == of_console_device) |
24 | return 1; | 24 | return 1; |
diff --git a/arch/sparc/include/asm/floppy_64.h b/arch/sparc/include/asm/floppy_64.h index 36439d67ad71..8fac3ab22f36 100644 --- a/arch/sparc/include/asm/floppy_64.h +++ b/arch/sparc/include/asm/floppy_64.h | |||
@@ -589,7 +589,7 @@ static unsigned long __init sun_floppy_init(void) | |||
589 | if (!op) | 589 | if (!op) |
590 | return 0; | 590 | return 0; |
591 | 591 | ||
592 | state_prop = of_get_property(op->node, "status", NULL); | 592 | state_prop = of_get_property(op->dev.of_node, "status", NULL); |
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 | ||
@@ -716,7 +716,7 @@ static unsigned long __init sun_floppy_init(void) | |||
716 | 716 | ||
717 | return sun_floppy_types[0]; | 717 | return sun_floppy_types[0]; |
718 | } | 718 | } |
719 | prop = of_get_property(op->node, "status", NULL); | 719 | prop = of_get_property(op->dev.of_node, "status", NULL); |
720 | if (prop && !strncmp(state, "disabled", 8)) | 720 | if (prop && !strncmp(state, "disabled", 8)) |
721 | return 0; | 721 | return 0; |
722 | 722 | ||
diff --git a/arch/sparc/include/asm/parport.h b/arch/sparc/include/asm/parport.h index ff9ead640c4a..1bb6a41b00f2 100644 --- a/arch/sparc/include/asm/parport.h +++ b/arch/sparc/include/asm/parport.h | |||
@@ -113,7 +113,7 @@ static int __devinit ecpp_probe(struct of_device *op, const struct of_device_id | |||
113 | struct parport *p; | 113 | struct parport *p; |
114 | int slot, err; | 114 | int slot, err; |
115 | 115 | ||
116 | parent = op->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->irqs[0], PARPORT_DMA_NOFIFO, |
diff --git a/arch/sparc/kernel/auxio_64.c b/arch/sparc/kernel/auxio_64.c index 9f52db2d441c..bd8421a26856 100644 --- a/arch/sparc/kernel/auxio_64.c +++ b/arch/sparc/kernel/auxio_64.c | |||
@@ -104,7 +104,7 @@ MODULE_DEVICE_TABLE(of, auxio_match); | |||
104 | 104 | ||
105 | static int __devinit auxio_probe(struct of_device *dev, const struct of_device_id *match) | 105 | static int __devinit auxio_probe(struct of_device *dev, const struct of_device_id *match) |
106 | { | 106 | { |
107 | struct device_node *dp = dev->node; | 107 | struct device_node *dp = dev->dev.of_node; |
108 | unsigned long size; | 108 | unsigned long size; |
109 | 109 | ||
110 | if (!strcmp(dp->parent->name, "ebus")) { | 110 | if (!strcmp(dp->parent->name, "ebus")) { |
diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c index 415c86d5a8da..d533f3d5d484 100644 --- a/arch/sparc/kernel/central.c +++ b/arch/sparc/kernel/central.c | |||
@@ -168,7 +168,7 @@ static int __devinit fhc_probe(struct of_device *op, | |||
168 | goto out; | 168 | goto out; |
169 | } | 169 | } |
170 | 170 | ||
171 | if (!strcmp(op->node->parent->name, "central")) | 171 | if (!strcmp(op->dev.of_node->parent->name, "central")) |
172 | p->central = true; | 172 | p->central = true; |
173 | 173 | ||
174 | p->pregs = of_ioremap(&op->resource[0], 0, | 174 | p->pregs = of_ioremap(&op->resource[0], 0, |
@@ -183,7 +183,7 @@ static int __devinit fhc_probe(struct of_device *op, | |||
183 | reg = upa_readl(p->pregs + FHC_PREGS_BSR); | 183 | reg = upa_readl(p->pregs + FHC_PREGS_BSR); |
184 | p->board_num = ((reg >> 16) & 1) | ((reg >> 12) & 0x0e); | 184 | p->board_num = ((reg >> 16) & 1) | ((reg >> 12) & 0x0e); |
185 | } else { | 185 | } else { |
186 | p->board_num = of_getintprop_default(op->node, "board#", -1); | 186 | p->board_num = of_getintprop_default(op->dev.of_node, "board#", -1); |
187 | if (p->board_num == -1) { | 187 | if (p->board_num == -1) { |
188 | printk(KERN_ERR "fhc: No board# property\n"); | 188 | printk(KERN_ERR "fhc: No board# property\n"); |
189 | goto out_unmap_pregs; | 189 | goto out_unmap_pregs; |
diff --git a/arch/sparc/kernel/chmc.c b/arch/sparc/kernel/chmc.c index e1a9598e2a4d..936879639eb6 100644 --- a/arch/sparc/kernel/chmc.c +++ b/arch/sparc/kernel/chmc.c | |||
@@ -425,7 +425,7 @@ static int __devinit jbusmc_probe(struct of_device *op, | |||
425 | INIT_LIST_HEAD(&p->list); | 425 | INIT_LIST_HEAD(&p->list); |
426 | 426 | ||
427 | err = -ENODEV; | 427 | err = -ENODEV; |
428 | prop = of_get_property(op->node, "portid", &len); | 428 | prop = of_get_property(op->dev.of_node, "portid", &len); |
429 | if (!prop || len != 4) { | 429 | if (!prop || len != 4) { |
430 | printk(KERN_ERR PFX "Cannot find portid.\n"); | 430 | printk(KERN_ERR PFX "Cannot find portid.\n"); |
431 | goto out_free; | 431 | goto out_free; |
@@ -433,7 +433,7 @@ static int __devinit jbusmc_probe(struct of_device *op, | |||
433 | 433 | ||
434 | p->portid = *prop; | 434 | p->portid = *prop; |
435 | 435 | ||
436 | prop = of_get_property(op->node, "memory-control-register-1", &len); | 436 | prop = of_get_property(op->dev.of_node, "memory-control-register-1", &len); |
437 | if (!prop || len != 8) { | 437 | if (!prop || len != 8) { |
438 | printk(KERN_ERR PFX "Cannot get memory control register 1.\n"); | 438 | printk(KERN_ERR PFX "Cannot get memory control register 1.\n"); |
439 | goto out_free; | 439 | goto out_free; |
@@ -449,7 +449,7 @@ static int __devinit jbusmc_probe(struct of_device *op, | |||
449 | } | 449 | } |
450 | 450 | ||
451 | err = -ENODEV; | 451 | err = -ENODEV; |
452 | ml = of_get_property(op->node, "memory-layout", &p->layout_len); | 452 | ml = of_get_property(op->dev.of_node, "memory-layout", &p->layout_len); |
453 | if (!ml) { | 453 | if (!ml) { |
454 | printk(KERN_ERR PFX "Cannot get memory layout property.\n"); | 454 | printk(KERN_ERR PFX "Cannot get memory layout property.\n"); |
455 | goto out_iounmap; | 455 | goto out_iounmap; |
@@ -466,7 +466,7 @@ static int __devinit jbusmc_probe(struct of_device *op, | |||
466 | mc_list_add(&p->list); | 466 | mc_list_add(&p->list); |
467 | 467 | ||
468 | printk(KERN_INFO PFX "UltraSPARC-IIIi memory controller at %s\n", | 468 | printk(KERN_INFO PFX "UltraSPARC-IIIi memory controller at %s\n", |
469 | op->node->full_name); | 469 | op->dev.of_node->full_name); |
470 | 470 | ||
471 | dev_set_drvdata(&op->dev, p); | 471 | dev_set_drvdata(&op->dev, p); |
472 | 472 | ||
@@ -693,7 +693,7 @@ static void chmc_fetch_decode_regs(struct chmc *p) | |||
693 | static int __devinit chmc_probe(struct of_device *op, | 693 | static int __devinit chmc_probe(struct of_device *op, |
694 | const struct of_device_id *match) | 694 | const struct of_device_id *match) |
695 | { | 695 | { |
696 | struct device_node *dp = op->node; | 696 | struct device_node *dp = op->dev.of_node; |
697 | unsigned long ver; | 697 | unsigned long ver; |
698 | const void *pval; | 698 | const void *pval; |
699 | int len, portid; | 699 | int len, portid; |
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index 84e5386714cd..703e4aa9bc38 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -290,7 +290,7 @@ static void *sbus_alloc_coherent(struct device *dev, size_t len, | |||
290 | if (mmu_map_dma_area(dev, dma_addrp, va, res->start, len_total) != 0) | 290 | if (mmu_map_dma_area(dev, dma_addrp, va, res->start, len_total) != 0) |
291 | goto err_noiommu; | 291 | goto err_noiommu; |
292 | 292 | ||
293 | res->name = op->node->name; | 293 | res->name = op->dev.of_node->name; |
294 | 294 | ||
295 | return (void *)(unsigned long)res->start; | 295 | return (void *)(unsigned long)res->start; |
296 | 296 | ||
diff --git a/arch/sparc/kernel/of_device_32.c b/arch/sparc/kernel/of_device_32.c index 4926c1babd84..707311716142 100644 --- a/arch/sparc/kernel/of_device_32.c +++ b/arch/sparc/kernel/of_device_32.c | |||
@@ -254,10 +254,10 @@ static void __init build_device_resources(struct of_device *op, | |||
254 | return; | 254 | return; |
255 | 255 | ||
256 | p_op = to_of_device(parent); | 256 | p_op = to_of_device(parent); |
257 | bus = of_match_bus(p_op->node); | 257 | bus = of_match_bus(p_op->dev.of_node); |
258 | bus->count_cells(op->node, &na, &ns); | 258 | bus->count_cells(op->dev.of_node, &na, &ns); |
259 | 259 | ||
260 | preg = of_get_property(op->node, bus->addr_prop_name, &num_reg); | 260 | preg = of_get_property(op->dev.of_node, bus->addr_prop_name, &num_reg); |
261 | if (!preg || num_reg == 0) | 261 | if (!preg || num_reg == 0) |
262 | return; | 262 | return; |
263 | 263 | ||
@@ -271,8 +271,8 @@ static void __init build_device_resources(struct of_device *op, | |||
271 | struct resource *r = &op->resource[index]; | 271 | struct resource *r = &op->resource[index]; |
272 | u32 addr[OF_MAX_ADDR_CELLS]; | 272 | u32 addr[OF_MAX_ADDR_CELLS]; |
273 | const u32 *reg = (preg + (index * ((na + ns) * 4))); | 273 | const u32 *reg = (preg + (index * ((na + ns) * 4))); |
274 | struct device_node *dp = op->node; | 274 | struct device_node *dp = op->dev.of_node; |
275 | struct device_node *pp = p_op->node; | 275 | struct device_node *pp = p_op->dev.of_node; |
276 | struct of_bus *pbus, *dbus; | 276 | struct of_bus *pbus, *dbus; |
277 | u64 size, result = OF_BAD_ADDR; | 277 | u64 size, result = OF_BAD_ADDR; |
278 | unsigned long flags; | 278 | unsigned long flags; |
@@ -321,7 +321,7 @@ static void __init build_device_resources(struct of_device *op, | |||
321 | 321 | ||
322 | if (of_resource_verbose) | 322 | if (of_resource_verbose) |
323 | printk("%s reg[%d] -> %llx\n", | 323 | printk("%s reg[%d] -> %llx\n", |
324 | op->node->full_name, index, | 324 | op->dev.of_node->full_name, index, |
325 | result); | 325 | result); |
326 | 326 | ||
327 | if (result != OF_BAD_ADDR) { | 327 | if (result != OF_BAD_ADDR) { |
@@ -329,7 +329,7 @@ static void __init build_device_resources(struct of_device *op, | |||
329 | r->end = result + size - 1; | 329 | r->end = result + size - 1; |
330 | r->flags = flags | ((result >> 32ULL) & 0xffUL); | 330 | r->flags = flags | ((result >> 32ULL) & 0xffUL); |
331 | } | 331 | } |
332 | r->name = op->node->name; | 332 | r->name = op->dev.of_node->name; |
333 | } | 333 | } |
334 | } | 334 | } |
335 | 335 | ||
diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c index 5bc74161667c..c8e352e0a098 100644 --- a/arch/sparc/kernel/of_device_64.c +++ b/arch/sparc/kernel/of_device_64.c | |||
@@ -323,10 +323,10 @@ static void __init build_device_resources(struct of_device *op, | |||
323 | return; | 323 | return; |
324 | 324 | ||
325 | p_op = to_of_device(parent); | 325 | p_op = to_of_device(parent); |
326 | bus = of_match_bus(p_op->node); | 326 | bus = of_match_bus(p_op->dev.of_node); |
327 | bus->count_cells(op->node, &na, &ns); | 327 | bus->count_cells(op->dev.of_node, &na, &ns); |
328 | 328 | ||
329 | preg = of_get_property(op->node, bus->addr_prop_name, &num_reg); | 329 | preg = of_get_property(op->dev.of_node, bus->addr_prop_name, &num_reg); |
330 | if (!preg || num_reg == 0) | 330 | if (!preg || num_reg == 0) |
331 | return; | 331 | return; |
332 | 332 | ||
@@ -340,7 +340,7 @@ static void __init build_device_resources(struct of_device *op, | |||
340 | if (num_reg > PROMREG_MAX) { | 340 | if (num_reg > PROMREG_MAX) { |
341 | printk(KERN_WARNING "%s: Too many regs (%d), " | 341 | printk(KERN_WARNING "%s: Too many regs (%d), " |
342 | "limiting to %d.\n", | 342 | "limiting to %d.\n", |
343 | op->node->full_name, num_reg, PROMREG_MAX); | 343 | op->dev.of_node->full_name, num_reg, PROMREG_MAX); |
344 | num_reg = PROMREG_MAX; | 344 | num_reg = PROMREG_MAX; |
345 | } | 345 | } |
346 | 346 | ||
@@ -348,8 +348,8 @@ static void __init build_device_resources(struct of_device *op, | |||
348 | struct resource *r = &op->resource[index]; | 348 | struct resource *r = &op->resource[index]; |
349 | u32 addr[OF_MAX_ADDR_CELLS]; | 349 | u32 addr[OF_MAX_ADDR_CELLS]; |
350 | const u32 *reg = (preg + (index * ((na + ns) * 4))); | 350 | const u32 *reg = (preg + (index * ((na + ns) * 4))); |
351 | struct device_node *dp = op->node; | 351 | struct device_node *dp = op->dev.of_node; |
352 | struct device_node *pp = p_op->node; | 352 | struct device_node *pp = p_op->dev.of_node; |
353 | struct of_bus *pbus, *dbus; | 353 | struct of_bus *pbus, *dbus; |
354 | u64 size, result = OF_BAD_ADDR; | 354 | u64 size, result = OF_BAD_ADDR; |
355 | unsigned long flags; | 355 | unsigned long flags; |
@@ -397,7 +397,7 @@ static void __init build_device_resources(struct of_device *op, | |||
397 | 397 | ||
398 | if (of_resource_verbose) | 398 | if (of_resource_verbose) |
399 | printk("%s reg[%d] -> %llx\n", | 399 | printk("%s reg[%d] -> %llx\n", |
400 | op->node->full_name, index, | 400 | op->dev.of_node->full_name, index, |
401 | result); | 401 | result); |
402 | 402 | ||
403 | if (result != OF_BAD_ADDR) { | 403 | if (result != OF_BAD_ADDR) { |
@@ -408,7 +408,7 @@ static void __init build_device_resources(struct of_device *op, | |||
408 | r->end = result + size - 1; | 408 | r->end = result + size - 1; |
409 | r->flags = flags; | 409 | r->flags = flags; |
410 | } | 410 | } |
411 | r->name = op->node->name; | 411 | r->name = op->dev.of_node->name; |
412 | } | 412 | } |
413 | } | 413 | } |
414 | 414 | ||
@@ -530,7 +530,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op, | |||
530 | struct device *parent, | 530 | struct device *parent, |
531 | unsigned int irq) | 531 | unsigned int irq) |
532 | { | 532 | { |
533 | struct device_node *dp = op->node; | 533 | struct device_node *dp = op->dev.of_node; |
534 | struct device_node *pp, *ip; | 534 | struct device_node *pp, *ip; |
535 | unsigned int orig_irq = irq; | 535 | unsigned int orig_irq = irq; |
536 | int nid; | 536 | int nid; |
@@ -575,7 +575,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op, | |||
575 | 575 | ||
576 | if (of_irq_verbose) | 576 | if (of_irq_verbose) |
577 | printk("%s: Apply [%s:%x] imap --> [%s:%x]\n", | 577 | printk("%s: Apply [%s:%x] imap --> [%s:%x]\n", |
578 | op->node->full_name, | 578 | op->dev.of_node->full_name, |
579 | pp->full_name, this_orig_irq, | 579 | pp->full_name, this_orig_irq, |
580 | (iret ? iret->full_name : "NULL"), irq); | 580 | (iret ? iret->full_name : "NULL"), irq); |
581 | 581 | ||
@@ -594,7 +594,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op, | |||
594 | if (of_irq_verbose) | 594 | if (of_irq_verbose) |
595 | printk("%s: PCI swizzle [%s] " | 595 | printk("%s: PCI swizzle [%s] " |
596 | "%x --> %x\n", | 596 | "%x --> %x\n", |
597 | op->node->full_name, | 597 | op->dev.of_node->full_name, |
598 | pp->full_name, this_orig_irq, | 598 | pp->full_name, this_orig_irq, |
599 | irq); | 599 | irq); |
600 | 600 | ||
@@ -611,11 +611,11 @@ static unsigned int __init build_one_device_irq(struct of_device *op, | |||
611 | if (!ip) | 611 | if (!ip) |
612 | return orig_irq; | 612 | return orig_irq; |
613 | 613 | ||
614 | irq = ip->irq_trans->irq_build(op->node, irq, | 614 | irq = ip->irq_trans->irq_build(op->dev.of_node, irq, |
615 | ip->irq_trans->data); | 615 | ip->irq_trans->data); |
616 | if (of_irq_verbose) | 616 | if (of_irq_verbose) |
617 | printk("%s: Apply IRQ trans [%s] %x --> %x\n", | 617 | printk("%s: Apply IRQ trans [%s] %x --> %x\n", |
618 | op->node->full_name, ip->full_name, orig_irq, irq); | 618 | op->dev.of_node->full_name, ip->full_name, orig_irq, irq); |
619 | 619 | ||
620 | out: | 620 | out: |
621 | nid = of_node_to_nid(dp); | 621 | nid = of_node_to_nid(dp); |
diff --git a/arch/sparc/kernel/of_device_common.c b/arch/sparc/kernel/of_device_common.c index 0247e68210b3..10c6c36a6e75 100644 --- a/arch/sparc/kernel/of_device_common.c +++ b/arch/sparc/kernel/of_device_common.c | |||
@@ -16,7 +16,7 @@ static int node_match(struct device *dev, void *data) | |||
16 | struct of_device *op = to_of_device(dev); | 16 | struct of_device *op = to_of_device(dev); |
17 | struct device_node *dp = data; | 17 | struct device_node *dp = data; |
18 | 18 | ||
19 | return (op->node == dp); | 19 | return (op->dev.of_node == dp); |
20 | } | 20 | } |
21 | 21 | ||
22 | struct of_device *of_find_device_by_node(struct device_node *dp) | 22 | struct of_device *of_find_device_by_node(struct device_node *dp) |
@@ -48,7 +48,7 @@ EXPORT_SYMBOL(irq_of_parse_and_map); | |||
48 | void of_propagate_archdata(struct of_device *bus) | 48 | void of_propagate_archdata(struct of_device *bus) |
49 | { | 49 | { |
50 | struct dev_archdata *bus_sd = &bus->dev.archdata; | 50 | struct dev_archdata *bus_sd = &bus->dev.archdata; |
51 | struct device_node *bus_dp = bus->node; | 51 | struct device_node *bus_dp = bus->dev.of_node; |
52 | struct device_node *dp; | 52 | struct device_node *dp; |
53 | 53 | ||
54 | for (dp = bus_dp->child; dp; dp = dp->sibling) { | 54 | for (dp = bus_dp->child; dp; dp = dp->sibling) { |
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index 0c920147b4ef..c7a214ec5aff 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c | |||
@@ -654,7 +654,7 @@ show_pciobppath_attr(struct device * dev, struct device_attribute * attr, char * | |||
654 | struct device_node *dp; | 654 | struct device_node *dp; |
655 | 655 | ||
656 | pdev = to_pci_dev(dev); | 656 | pdev = to_pci_dev(dev); |
657 | dp = pdev->dev.archdata.prom_node; | 657 | dp = pdev->dev.of_node; |
658 | 658 | ||
659 | return snprintf (buf, PAGE_SIZE, "%s\n", dp->full_name); | 659 | return snprintf (buf, PAGE_SIZE, "%s\n", dp->full_name); |
660 | } | 660 | } |
@@ -684,7 +684,7 @@ static void __devinit pci_bus_register_of_sysfs(struct pci_bus *bus) | |||
684 | struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm, | 684 | struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm, |
685 | struct device *parent) | 685 | struct device *parent) |
686 | { | 686 | { |
687 | struct device_node *node = pbm->op->node; | 687 | struct device_node *node = pbm->op->dev.of_node; |
688 | struct pci_bus *bus; | 688 | struct pci_bus *bus; |
689 | 689 | ||
690 | printk("PCI: Scanning PBM %s\n", node->full_name); | 690 | printk("PCI: Scanning PBM %s\n", node->full_name); |
@@ -1023,7 +1023,7 @@ void arch_teardown_msi_irq(unsigned int virt_irq) | |||
1023 | 1023 | ||
1024 | struct device_node *pci_device_to_OF_node(struct pci_dev *pdev) | 1024 | struct device_node *pci_device_to_OF_node(struct pci_dev *pdev) |
1025 | { | 1025 | { |
1026 | return pdev->dev.archdata.prom_node; | 1026 | return pdev->dev.of_node; |
1027 | } | 1027 | } |
1028 | EXPORT_SYMBOL(pci_device_to_OF_node); | 1028 | EXPORT_SYMBOL(pci_device_to_OF_node); |
1029 | 1029 | ||
@@ -1152,15 +1152,13 @@ static int __init of_pci_slot_init(void) | |||
1152 | struct device_node *node; | 1152 | struct device_node *node; |
1153 | 1153 | ||
1154 | if (pbus->self) { | 1154 | if (pbus->self) { |
1155 | struct dev_archdata *sd = pbus->self->sysdata; | ||
1156 | |||
1157 | /* PCI->PCI bridge */ | 1155 | /* PCI->PCI bridge */ |
1158 | node = sd->prom_node; | 1156 | node = pbus->self->dev.of_node; |
1159 | } else { | 1157 | } else { |
1160 | struct pci_pbm_info *pbm = pbus->sysdata; | 1158 | struct pci_pbm_info *pbm = pbus->sysdata; |
1161 | 1159 | ||
1162 | /* Host PCI controller */ | 1160 | /* Host PCI controller */ |
1163 | node = pbm->op->node; | 1161 | node = pbm->op->dev.of_node; |
1164 | } | 1162 | } |
1165 | 1163 | ||
1166 | pci_bus_slot_names(node, pbus); | 1164 | pci_bus_slot_names(node, pbus); |
diff --git a/arch/sparc/kernel/pci_common.c b/arch/sparc/kernel/pci_common.c index 8a000583b5cf..6c7a33af3ba6 100644 --- a/arch/sparc/kernel/pci_common.c +++ b/arch/sparc/kernel/pci_common.c | |||
@@ -314,12 +314,12 @@ struct pci_ops sun4v_pci_ops = { | |||
314 | 314 | ||
315 | void pci_get_pbm_props(struct pci_pbm_info *pbm) | 315 | void pci_get_pbm_props(struct pci_pbm_info *pbm) |
316 | { | 316 | { |
317 | const u32 *val = of_get_property(pbm->op->node, "bus-range", NULL); | 317 | const u32 *val = of_get_property(pbm->op->dev.of_node, "bus-range", NULL); |
318 | 318 | ||
319 | pbm->pci_first_busno = val[0]; | 319 | pbm->pci_first_busno = val[0]; |
320 | pbm->pci_last_busno = val[1]; | 320 | pbm->pci_last_busno = val[1]; |
321 | 321 | ||
322 | val = of_get_property(pbm->op->node, "ino-bitmap", NULL); | 322 | val = of_get_property(pbm->op->dev.of_node, "ino-bitmap", NULL); |
323 | if (val) { | 323 | if (val) { |
324 | pbm->ino_bitmap = (((u64)val[1] << 32UL) | | 324 | pbm->ino_bitmap = (((u64)val[1] << 32UL) | |
325 | ((u64)val[0] << 0UL)); | 325 | ((u64)val[0] << 0UL)); |
@@ -365,7 +365,8 @@ static void pci_register_legacy_regions(struct resource *io_res, | |||
365 | 365 | ||
366 | static void pci_register_iommu_region(struct pci_pbm_info *pbm) | 366 | static void pci_register_iommu_region(struct pci_pbm_info *pbm) |
367 | { | 367 | { |
368 | const u32 *vdma = of_get_property(pbm->op->node, "virtual-dma", NULL); | 368 | const u32 *vdma = of_get_property(pbm->op->dev.of_node, "virtual-dma", |
369 | NULL); | ||
369 | 370 | ||
370 | if (vdma) { | 371 | if (vdma) { |
371 | struct resource *rp = kzalloc(sizeof(*rp), GFP_KERNEL); | 372 | struct resource *rp = kzalloc(sizeof(*rp), GFP_KERNEL); |
@@ -394,7 +395,7 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm) | |||
394 | int num_pbm_ranges; | 395 | int num_pbm_ranges; |
395 | 396 | ||
396 | saw_mem = saw_io = 0; | 397 | saw_mem = saw_io = 0; |
397 | pbm_ranges = of_get_property(pbm->op->node, "ranges", &i); | 398 | pbm_ranges = of_get_property(pbm->op->dev.of_node, "ranges", &i); |
398 | if (!pbm_ranges) { | 399 | if (!pbm_ranges) { |
399 | prom_printf("PCI: Fatal error, missing PBM ranges property " | 400 | prom_printf("PCI: Fatal error, missing PBM ranges property " |
400 | " for %s\n", | 401 | " for %s\n", |
diff --git a/arch/sparc/kernel/pci_fire.c b/arch/sparc/kernel/pci_fire.c index d53f45bc7dda..ff844baa28e6 100644 --- a/arch/sparc/kernel/pci_fire.c +++ b/arch/sparc/kernel/pci_fire.c | |||
@@ -413,7 +413,7 @@ static int __devinit pci_fire_pbm_init(struct pci_pbm_info *pbm, | |||
413 | struct of_device *op, u32 portid) | 413 | struct of_device *op, u32 portid) |
414 | { | 414 | { |
415 | const struct linux_prom64_registers *regs; | 415 | const struct linux_prom64_registers *regs; |
416 | struct device_node *dp = op->node; | 416 | struct device_node *dp = op->dev.of_node; |
417 | int err; | 417 | int err; |
418 | 418 | ||
419 | pbm->numa_node = -1; | 419 | pbm->numa_node = -1; |
@@ -458,7 +458,7 @@ static int __devinit pci_fire_pbm_init(struct pci_pbm_info *pbm, | |||
458 | static int __devinit fire_probe(struct of_device *op, | 458 | static int __devinit fire_probe(struct of_device *op, |
459 | const struct of_device_id *match) | 459 | const struct of_device_id *match) |
460 | { | 460 | { |
461 | struct device_node *dp = op->node; | 461 | struct device_node *dp = op->dev.of_node; |
462 | struct pci_pbm_info *pbm; | 462 | struct pci_pbm_info *pbm; |
463 | struct iommu *iommu; | 463 | struct iommu *iommu; |
464 | u32 portid; | 464 | u32 portid; |
diff --git a/arch/sparc/kernel/pci_msi.c b/arch/sparc/kernel/pci_msi.c index e0ef847219c3..548b8ca9c210 100644 --- a/arch/sparc/kernel/pci_msi.c +++ b/arch/sparc/kernel/pci_msi.c | |||
@@ -324,7 +324,7 @@ void sparc64_pbm_msi_init(struct pci_pbm_info *pbm, | |||
324 | const u32 *val; | 324 | const u32 *val; |
325 | int len; | 325 | int len; |
326 | 326 | ||
327 | val = of_get_property(pbm->op->node, "#msi-eqs", &len); | 327 | val = of_get_property(pbm->op->dev.of_node, "#msi-eqs", &len); |
328 | if (!val || len != 4) | 328 | if (!val || len != 4) |
329 | goto no_msi; | 329 | goto no_msi; |
330 | pbm->msiq_num = *val; | 330 | pbm->msiq_num = *val; |
@@ -347,16 +347,16 @@ void sparc64_pbm_msi_init(struct pci_pbm_info *pbm, | |||
347 | u32 msi64_len; | 347 | u32 msi64_len; |
348 | } *arng; | 348 | } *arng; |
349 | 349 | ||
350 | val = of_get_property(pbm->op->node, "msi-eq-size", &len); | 350 | val = of_get_property(pbm->op->dev.of_node, "msi-eq-size", &len); |
351 | if (!val || len != 4) | 351 | if (!val || len != 4) |
352 | goto no_msi; | 352 | goto no_msi; |
353 | 353 | ||
354 | pbm->msiq_ent_count = *val; | 354 | pbm->msiq_ent_count = *val; |
355 | 355 | ||
356 | mqp = of_get_property(pbm->op->node, | 356 | mqp = of_get_property(pbm->op->dev.of_node, |
357 | "msi-eq-to-devino", &len); | 357 | "msi-eq-to-devino", &len); |
358 | if (!mqp) | 358 | if (!mqp) |
359 | mqp = of_get_property(pbm->op->node, | 359 | mqp = of_get_property(pbm->op->dev.of_node, |
360 | "msi-eq-devino", &len); | 360 | "msi-eq-devino", &len); |
361 | if (!mqp || len != sizeof(struct msiq_prop)) | 361 | if (!mqp || len != sizeof(struct msiq_prop)) |
362 | goto no_msi; | 362 | goto no_msi; |
@@ -364,27 +364,27 @@ void sparc64_pbm_msi_init(struct pci_pbm_info *pbm, | |||
364 | pbm->msiq_first = mqp->first_msiq; | 364 | pbm->msiq_first = mqp->first_msiq; |
365 | pbm->msiq_first_devino = mqp->first_devino; | 365 | pbm->msiq_first_devino = mqp->first_devino; |
366 | 366 | ||
367 | val = of_get_property(pbm->op->node, "#msi", &len); | 367 | val = of_get_property(pbm->op->dev.of_node, "#msi", &len); |
368 | if (!val || len != 4) | 368 | if (!val || len != 4) |
369 | goto no_msi; | 369 | goto no_msi; |
370 | pbm->msi_num = *val; | 370 | pbm->msi_num = *val; |
371 | 371 | ||
372 | mrng = of_get_property(pbm->op->node, "msi-ranges", &len); | 372 | mrng = of_get_property(pbm->op->dev.of_node, "msi-ranges", &len); |
373 | if (!mrng || len != sizeof(struct msi_range_prop)) | 373 | if (!mrng || len != sizeof(struct msi_range_prop)) |
374 | goto no_msi; | 374 | goto no_msi; |
375 | pbm->msi_first = mrng->first_msi; | 375 | pbm->msi_first = mrng->first_msi; |
376 | 376 | ||
377 | val = of_get_property(pbm->op->node, "msi-data-mask", &len); | 377 | val = of_get_property(pbm->op->dev.of_node, "msi-data-mask", &len); |
378 | if (!val || len != 4) | 378 | if (!val || len != 4) |
379 | goto no_msi; | 379 | goto no_msi; |
380 | pbm->msi_data_mask = *val; | 380 | pbm->msi_data_mask = *val; |
381 | 381 | ||
382 | val = of_get_property(pbm->op->node, "msix-data-width", &len); | 382 | val = of_get_property(pbm->op->dev.of_node, "msix-data-width", &len); |
383 | if (!val || len != 4) | 383 | if (!val || len != 4) |
384 | goto no_msi; | 384 | goto no_msi; |
385 | pbm->msix_data_width = *val; | 385 | pbm->msix_data_width = *val; |
386 | 386 | ||
387 | arng = of_get_property(pbm->op->node, "msi-address-ranges", | 387 | arng = of_get_property(pbm->op->dev.of_node, "msi-address-ranges", |
388 | &len); | 388 | &len); |
389 | if (!arng || len != sizeof(struct addr_range_prop)) | 389 | if (!arng || len != sizeof(struct addr_range_prop)) |
390 | goto no_msi; | 390 | goto no_msi; |
diff --git a/arch/sparc/kernel/pci_psycho.c b/arch/sparc/kernel/pci_psycho.c index 142b9d6984a8..e675e21c6df6 100644 --- a/arch/sparc/kernel/pci_psycho.c +++ b/arch/sparc/kernel/pci_psycho.c | |||
@@ -285,7 +285,7 @@ static irqreturn_t psycho_ce_intr(int irq, void *dev_id) | |||
285 | #define PSYCHO_ECCCTRL_CE 0x2000000000000000UL /* Enable CE INterrupts */ | 285 | #define PSYCHO_ECCCTRL_CE 0x2000000000000000UL /* Enable CE INterrupts */ |
286 | static void psycho_register_error_handlers(struct pci_pbm_info *pbm) | 286 | static void psycho_register_error_handlers(struct pci_pbm_info *pbm) |
287 | { | 287 | { |
288 | struct of_device *op = of_find_device_by_node(pbm->op->node); | 288 | struct of_device *op = of_find_device_by_node(pbm->op->dev.of_node); |
289 | unsigned long base = pbm->controller_regs; | 289 | unsigned long base = pbm->controller_regs; |
290 | u64 tmp; | 290 | u64 tmp; |
291 | int err; | 291 | int err; |
@@ -507,7 +507,7 @@ static int __devinit psycho_probe(struct of_device *op, | |||
507 | const struct of_device_id *match) | 507 | const struct of_device_id *match) |
508 | { | 508 | { |
509 | const struct linux_prom64_registers *pr_regs; | 509 | const struct linux_prom64_registers *pr_regs; |
510 | struct device_node *dp = op->node; | 510 | struct device_node *dp = op->dev.of_node; |
511 | struct pci_pbm_info *pbm; | 511 | struct pci_pbm_info *pbm; |
512 | struct iommu *iommu; | 512 | struct iommu *iommu; |
513 | int is_pbm_a, err; | 513 | int is_pbm_a, err; |
diff --git a/arch/sparc/kernel/pci_sabre.c b/arch/sparc/kernel/pci_sabre.c index ba6fbeba3e2c..5048498daade 100644 --- a/arch/sparc/kernel/pci_sabre.c +++ b/arch/sparc/kernel/pci_sabre.c | |||
@@ -310,7 +310,7 @@ static irqreturn_t sabre_ce_intr(int irq, void *dev_id) | |||
310 | 310 | ||
311 | static void sabre_register_error_handlers(struct pci_pbm_info *pbm) | 311 | static void sabre_register_error_handlers(struct pci_pbm_info *pbm) |
312 | { | 312 | { |
313 | struct device_node *dp = pbm->op->node; | 313 | struct device_node *dp = pbm->op->dev.of_node; |
314 | struct of_device *op; | 314 | struct of_device *op; |
315 | unsigned long base = pbm->controller_regs; | 315 | unsigned long base = pbm->controller_regs; |
316 | u64 tmp; | 316 | u64 tmp; |
@@ -456,7 +456,7 @@ static int __devinit sabre_probe(struct of_device *op, | |||
456 | const struct of_device_id *match) | 456 | const struct of_device_id *match) |
457 | { | 457 | { |
458 | const struct linux_prom64_registers *pr_regs; | 458 | const struct linux_prom64_registers *pr_regs; |
459 | struct device_node *dp = op->node; | 459 | struct device_node *dp = op->dev.of_node; |
460 | struct pci_pbm_info *pbm; | 460 | struct pci_pbm_info *pbm; |
461 | u32 upa_portid, dma_mask; | 461 | u32 upa_portid, dma_mask; |
462 | struct iommu *iommu; | 462 | struct iommu *iommu; |
diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c index 2b5cdde77af7..2f3f9212b063 100644 --- a/arch/sparc/kernel/pci_schizo.c +++ b/arch/sparc/kernel/pci_schizo.c | |||
@@ -844,7 +844,7 @@ static int pbm_routes_this_ino(struct pci_pbm_info *pbm, u32 ino) | |||
844 | */ | 844 | */ |
845 | static void tomatillo_register_error_handlers(struct pci_pbm_info *pbm) | 845 | static void tomatillo_register_error_handlers(struct pci_pbm_info *pbm) |
846 | { | 846 | { |
847 | struct of_device *op = of_find_device_by_node(pbm->op->node); | 847 | struct of_device *op = of_find_device_by_node(pbm->op->dev.of_node); |
848 | u64 tmp, err_mask, err_no_mask; | 848 | u64 tmp, err_mask, err_no_mask; |
849 | int err; | 849 | int err; |
850 | 850 | ||
@@ -939,7 +939,7 @@ static void tomatillo_register_error_handlers(struct pci_pbm_info *pbm) | |||
939 | 939 | ||
940 | static void schizo_register_error_handlers(struct pci_pbm_info *pbm) | 940 | static void schizo_register_error_handlers(struct pci_pbm_info *pbm) |
941 | { | 941 | { |
942 | struct of_device *op = of_find_device_by_node(pbm->op->node); | 942 | struct of_device *op = of_find_device_by_node(pbm->op->dev.of_node); |
943 | u64 tmp, err_mask, err_no_mask; | 943 | u64 tmp, err_mask, err_no_mask; |
944 | int err; | 944 | int err; |
945 | 945 | ||
@@ -1068,7 +1068,7 @@ static void __devinit schizo_scan_bus(struct pci_pbm_info *pbm, | |||
1068 | { | 1068 | { |
1069 | pbm_config_busmastering(pbm); | 1069 | pbm_config_busmastering(pbm); |
1070 | pbm->is_66mhz_capable = | 1070 | pbm->is_66mhz_capable = |
1071 | (of_find_property(pbm->op->node, "66mhz-capable", NULL) | 1071 | (of_find_property(pbm->op->dev.of_node, "66mhz-capable", NULL) |
1072 | != NULL); | 1072 | != NULL); |
1073 | 1073 | ||
1074 | pbm->pci_bus = pci_scan_one_pbm(pbm, parent); | 1074 | pbm->pci_bus = pci_scan_one_pbm(pbm, parent); |
@@ -1138,7 +1138,7 @@ static int schizo_pbm_iommu_init(struct pci_pbm_info *pbm) | |||
1138 | u32 dma_mask; | 1138 | u32 dma_mask; |
1139 | u64 control; | 1139 | u64 control; |
1140 | 1140 | ||
1141 | vdma = of_get_property(pbm->op->node, "virtual-dma", NULL); | 1141 | vdma = of_get_property(pbm->op->dev.of_node, "virtual-dma", NULL); |
1142 | if (!vdma) | 1142 | if (!vdma) |
1143 | vdma = vdma_default; | 1143 | vdma = vdma_default; |
1144 | 1144 | ||
@@ -1268,7 +1268,7 @@ static void schizo_pbm_hw_init(struct pci_pbm_info *pbm) | |||
1268 | pbm->chip_version >= 0x2) | 1268 | pbm->chip_version >= 0x2) |
1269 | tmp |= 0x3UL << SCHIZO_PCICTRL_PTO_SHIFT; | 1269 | tmp |= 0x3UL << SCHIZO_PCICTRL_PTO_SHIFT; |
1270 | 1270 | ||
1271 | if (!of_find_property(pbm->op->node, "no-bus-parking", NULL)) | 1271 | if (!of_find_property(pbm->op->dev.of_node, "no-bus-parking", NULL)) |
1272 | tmp |= SCHIZO_PCICTRL_PARK; | 1272 | tmp |= SCHIZO_PCICTRL_PARK; |
1273 | else | 1273 | else |
1274 | tmp &= ~SCHIZO_PCICTRL_PARK; | 1274 | tmp &= ~SCHIZO_PCICTRL_PARK; |
@@ -1311,7 +1311,7 @@ static int __devinit schizo_pbm_init(struct pci_pbm_info *pbm, | |||
1311 | int chip_type) | 1311 | int chip_type) |
1312 | { | 1312 | { |
1313 | const struct linux_prom64_registers *regs; | 1313 | const struct linux_prom64_registers *regs; |
1314 | struct device_node *dp = op->node; | 1314 | struct device_node *dp = op->dev.of_node; |
1315 | const char *chipset_name; | 1315 | const char *chipset_name; |
1316 | int is_pbm_a, err; | 1316 | int is_pbm_a, err; |
1317 | 1317 | ||
@@ -1415,7 +1415,7 @@ static struct pci_pbm_info * __devinit schizo_find_sibling(u32 portid, | |||
1415 | 1415 | ||
1416 | static int __devinit __schizo_init(struct of_device *op, unsigned long chip_type) | 1416 | static int __devinit __schizo_init(struct of_device *op, unsigned long chip_type) |
1417 | { | 1417 | { |
1418 | struct device_node *dp = op->node; | 1418 | struct device_node *dp = op->dev.of_node; |
1419 | struct pci_pbm_info *pbm; | 1419 | struct pci_pbm_info *pbm; |
1420 | struct iommu *iommu; | 1420 | struct iommu *iommu; |
1421 | u32 portid; | 1421 | u32 portid; |
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c index 23c33ff9c31e..5c11f56cedf8 100644 --- a/arch/sparc/kernel/pci_sun4v.c +++ b/arch/sparc/kernel/pci_sun4v.c | |||
@@ -540,7 +540,7 @@ static void __devinit pci_sun4v_scan_bus(struct pci_pbm_info *pbm, | |||
540 | struct property *prop; | 540 | struct property *prop; |
541 | struct device_node *dp; | 541 | struct device_node *dp; |
542 | 542 | ||
543 | dp = pbm->op->node; | 543 | dp = pbm->op->dev.of_node; |
544 | prop = of_find_property(dp, "66mhz-capable", NULL); | 544 | prop = of_find_property(dp, "66mhz-capable", NULL); |
545 | pbm->is_66mhz_capable = (prop != NULL); | 545 | pbm->is_66mhz_capable = (prop != NULL); |
546 | pbm->pci_bus = pci_scan_one_pbm(pbm, parent); | 546 | pbm->pci_bus = pci_scan_one_pbm(pbm, parent); |
@@ -584,7 +584,7 @@ static int __devinit pci_sun4v_iommu_init(struct pci_pbm_info *pbm) | |||
584 | u32 dma_mask, dma_offset; | 584 | u32 dma_mask, dma_offset; |
585 | const u32 *vdma; | 585 | const u32 *vdma; |
586 | 586 | ||
587 | vdma = of_get_property(pbm->op->node, "virtual-dma", NULL); | 587 | vdma = of_get_property(pbm->op->dev.of_node, "virtual-dma", NULL); |
588 | if (!vdma) | 588 | if (!vdma) |
589 | vdma = vdma_default; | 589 | vdma = vdma_default; |
590 | 590 | ||
@@ -881,7 +881,7 @@ static void pci_sun4v_msi_init(struct pci_pbm_info *pbm) | |||
881 | static int __devinit pci_sun4v_pbm_init(struct pci_pbm_info *pbm, | 881 | static int __devinit pci_sun4v_pbm_init(struct pci_pbm_info *pbm, |
882 | struct of_device *op, u32 devhandle) | 882 | struct of_device *op, u32 devhandle) |
883 | { | 883 | { |
884 | struct device_node *dp = op->node; | 884 | struct device_node *dp = op->dev.of_node; |
885 | int err; | 885 | int err; |
886 | 886 | ||
887 | pbm->numa_node = of_node_to_nid(dp); | 887 | pbm->numa_node = of_node_to_nid(dp); |
@@ -929,7 +929,7 @@ static int __devinit pci_sun4v_probe(struct of_device *op, | |||
929 | u32 devhandle; | 929 | u32 devhandle; |
930 | int i, err; | 930 | int i, err; |
931 | 931 | ||
932 | dp = op->node; | 932 | dp = op->dev.of_node; |
933 | 933 | ||
934 | if (!hvapi_negotiated++) { | 934 | if (!hvapi_negotiated++) { |
935 | err = sun4v_hvapi_register(HV_GRP_PCI, | 935 | err = sun4v_hvapi_register(HV_GRP_PCI, |
diff --git a/arch/sparc/kernel/power.c b/arch/sparc/kernel/power.c index e2a045c235a1..e3f806a7423b 100644 --- a/arch/sparc/kernel/power.c +++ b/arch/sparc/kernel/power.c | |||
@@ -41,9 +41,9 @@ static int __devinit power_probe(struct of_device *op, const struct of_device_id | |||
41 | power_reg = of_ioremap(res, 0, 0x4, "power"); | 41 | power_reg = of_ioremap(res, 0, 0x4, "power"); |
42 | 42 | ||
43 | printk(KERN_INFO "%s: Control reg at %llx\n", | 43 | printk(KERN_INFO "%s: Control reg at %llx\n", |
44 | op->node->name, res->start); | 44 | op->dev.of_node->name, res->start); |
45 | 45 | ||
46 | if (has_button_interrupt(irq, op->node)) { | 46 | if (has_button_interrupt(irq, op->dev.of_node)) { |
47 | if (request_irq(irq, | 47 | if (request_irq(irq, |
48 | power_handler, 0, "power", NULL) < 0) | 48 | power_handler, 0, "power", NULL) < 0) |
49 | printk(KERN_ERR "power: Cannot setup IRQ handler.\n"); | 49 | printk(KERN_ERR "power: Cannot setup IRQ handler.\n"); |
diff --git a/arch/sparc/kernel/psycho_common.c b/arch/sparc/kernel/psycho_common.c index 8f1478475421..3f34ac853931 100644 --- a/arch/sparc/kernel/psycho_common.c +++ b/arch/sparc/kernel/psycho_common.c | |||
@@ -450,7 +450,7 @@ int psycho_iommu_init(struct pci_pbm_info *pbm, int tsbsize, | |||
450 | void psycho_pbm_init_common(struct pci_pbm_info *pbm, struct of_device *op, | 450 | void psycho_pbm_init_common(struct pci_pbm_info *pbm, struct of_device *op, |
451 | const char *chip_name, int chip_type) | 451 | const char *chip_name, int chip_type) |
452 | { | 452 | { |
453 | struct device_node *dp = op->node; | 453 | struct device_node *dp = op->dev.of_node; |
454 | 454 | ||
455 | pbm->name = dp->full_name; | 455 | pbm->name = dp->full_name; |
456 | pbm->numa_node = -1; | 456 | pbm->numa_node = -1; |
diff --git a/arch/sparc/kernel/sbus.c b/arch/sparc/kernel/sbus.c index 406e0872504e..cfeaf04b9cdf 100644 --- a/arch/sparc/kernel/sbus.c +++ b/arch/sparc/kernel/sbus.c | |||
@@ -63,10 +63,10 @@ void sbus_set_sbus64(struct device *dev, int bursts) | |||
63 | int slot; | 63 | int slot; |
64 | u64 val; | 64 | u64 val; |
65 | 65 | ||
66 | regs = of_get_property(op->node, "reg", NULL); | 66 | regs = of_get_property(op->dev.of_node, "reg", NULL); |
67 | if (!regs) { | 67 | if (!regs) { |
68 | printk(KERN_ERR "sbus_set_sbus64: Cannot find regs for %s\n", | 68 | printk(KERN_ERR "sbus_set_sbus64: Cannot find regs for %s\n", |
69 | op->node->full_name); | 69 | op->dev.of_node->full_name); |
70 | return; | 70 | return; |
71 | } | 71 | } |
72 | slot = regs->which_io; | 72 | slot = regs->which_io; |
@@ -287,7 +287,7 @@ static irqreturn_t sysio_ue_handler(int irq, void *dev_id) | |||
287 | SYSIO_UEAFSR_SPIO | SYSIO_UEAFSR_SDRD | SYSIO_UEAFSR_SDWR); | 287 | SYSIO_UEAFSR_SPIO | SYSIO_UEAFSR_SDRD | SYSIO_UEAFSR_SDWR); |
288 | upa_writeq(error_bits, afsr_reg); | 288 | upa_writeq(error_bits, afsr_reg); |
289 | 289 | ||
290 | portid = of_getintprop_default(op->node, "portid", -1); | 290 | portid = of_getintprop_default(op->dev.of_node, "portid", -1); |
291 | 291 | ||
292 | /* Log the error. */ | 292 | /* Log the error. */ |
293 | printk("SYSIO[%x]: Uncorrectable ECC Error, primary error type[%s]\n", | 293 | printk("SYSIO[%x]: Uncorrectable ECC Error, primary error type[%s]\n", |
@@ -361,7 +361,7 @@ static irqreturn_t sysio_ce_handler(int irq, void *dev_id) | |||
361 | SYSIO_CEAFSR_SPIO | SYSIO_CEAFSR_SDRD | SYSIO_CEAFSR_SDWR); | 361 | SYSIO_CEAFSR_SPIO | SYSIO_CEAFSR_SDRD | SYSIO_CEAFSR_SDWR); |
362 | upa_writeq(error_bits, afsr_reg); | 362 | upa_writeq(error_bits, afsr_reg); |
363 | 363 | ||
364 | portid = of_getintprop_default(op->node, "portid", -1); | 364 | portid = of_getintprop_default(op->dev.of_node, "portid", -1); |
365 | 365 | ||
366 | printk("SYSIO[%x]: Correctable ECC Error, primary error type[%s]\n", | 366 | printk("SYSIO[%x]: Correctable ECC Error, primary error type[%s]\n", |
367 | portid, | 367 | portid, |
@@ -439,7 +439,7 @@ static irqreturn_t sysio_sbus_error_handler(int irq, void *dev_id) | |||
439 | SYSIO_SBAFSR_SLE | SYSIO_SBAFSR_STO | SYSIO_SBAFSR_SBERR); | 439 | SYSIO_SBAFSR_SLE | SYSIO_SBAFSR_STO | SYSIO_SBAFSR_SBERR); |
440 | upa_writeq(error_bits, afsr_reg); | 440 | upa_writeq(error_bits, afsr_reg); |
441 | 441 | ||
442 | portid = of_getintprop_default(op->node, "portid", -1); | 442 | portid = of_getintprop_default(op->dev.of_node, "portid", -1); |
443 | 443 | ||
444 | /* Log the error. */ | 444 | /* Log the error. */ |
445 | printk("SYSIO[%x]: SBUS Error, primary error type[%s] read(%d)\n", | 445 | printk("SYSIO[%x]: SBUS Error, primary error type[%s] read(%d)\n", |
@@ -496,7 +496,7 @@ static void __init sysio_register_error_handlers(struct of_device *op) | |||
496 | u64 control; | 496 | u64 control; |
497 | int portid; | 497 | int portid; |
498 | 498 | ||
499 | portid = of_getintprop_default(op->node, "portid", -1); | 499 | portid = of_getintprop_default(op->dev.of_node, "portid", -1); |
500 | 500 | ||
501 | irq = sbus_build_irq(op, SYSIO_UE_INO); | 501 | irq = sbus_build_irq(op, SYSIO_UE_INO); |
502 | if (request_irq(irq, sysio_ue_handler, 0, | 502 | if (request_irq(irq, sysio_ue_handler, 0, |
@@ -537,7 +537,7 @@ static void __init sysio_register_error_handlers(struct of_device *op) | |||
537 | static void __init sbus_iommu_init(struct of_device *op) | 537 | static void __init sbus_iommu_init(struct of_device *op) |
538 | { | 538 | { |
539 | const struct linux_prom64_registers *pr; | 539 | const struct linux_prom64_registers *pr; |
540 | struct device_node *dp = op->node; | 540 | struct device_node *dp = op->dev.of_node; |
541 | struct iommu *iommu; | 541 | struct iommu *iommu; |
542 | struct strbuf *strbuf; | 542 | struct strbuf *strbuf; |
543 | unsigned long regs, reg_base; | 543 | unsigned long regs, reg_base; |
@@ -589,7 +589,7 @@ static void __init sbus_iommu_init(struct of_device *op) | |||
589 | */ | 589 | */ |
590 | iommu->write_complete_reg = regs + 0x2000UL; | 590 | iommu->write_complete_reg = regs + 0x2000UL; |
591 | 591 | ||
592 | portid = of_getintprop_default(op->node, "portid", -1); | 592 | portid = of_getintprop_default(op->dev.of_node, "portid", -1); |
593 | printk(KERN_INFO "SYSIO: UPA portID %x, at %016lx\n", | 593 | printk(KERN_INFO "SYSIO: UPA portID %x, at %016lx\n", |
594 | portid, regs); | 594 | portid, regs); |
595 | 595 | ||
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c index 0d4c09b15efc..e0dbed9503d4 100644 --- a/arch/sparc/kernel/time_32.c +++ b/arch/sparc/kernel/time_32.c | |||
@@ -152,7 +152,7 @@ static struct platform_device m48t59_rtc = { | |||
152 | 152 | ||
153 | static int __devinit clock_probe(struct of_device *op, const struct of_device_id *match) | 153 | static int __devinit clock_probe(struct of_device *op, const struct of_device_id *match) |
154 | { | 154 | { |
155 | struct device_node *dp = op->node; | 155 | struct device_node *dp = op->dev.of_node; |
156 | const char *model = of_get_property(dp, "model", NULL); | 156 | const char *model = of_get_property(dp, "model", NULL); |
157 | 157 | ||
158 | if (!model) | 158 | if (!model) |
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c index c7bbe6cf7b85..9099ca095641 100644 --- a/arch/sparc/kernel/time_64.c +++ b/arch/sparc/kernel/time_64.c | |||
@@ -424,7 +424,7 @@ static int __devinit rtc_probe(struct of_device *op, const struct of_device_id * | |||
424 | struct resource *r; | 424 | struct resource *r; |
425 | 425 | ||
426 | printk(KERN_INFO "%s: RTC regs at 0x%llx\n", | 426 | printk(KERN_INFO "%s: RTC regs at 0x%llx\n", |
427 | op->node->full_name, op->resource[0].start); | 427 | op->dev.of_node->full_name, op->resource[0].start); |
428 | 428 | ||
429 | /* The CMOS RTC driver only accepts IORESOURCE_IO, so cons | 429 | /* The CMOS RTC driver only accepts IORESOURCE_IO, so cons |
430 | * up a fake resource so that the probe works for all cases. | 430 | * up a fake resource so that the probe works for all cases. |
@@ -480,7 +480,7 @@ static int __devinit bq4802_probe(struct of_device *op, const struct of_device_i | |||
480 | { | 480 | { |
481 | 481 | ||
482 | printk(KERN_INFO "%s: BQ4802 regs at 0x%llx\n", | 482 | printk(KERN_INFO "%s: BQ4802 regs at 0x%llx\n", |
483 | op->node->full_name, op->resource[0].start); | 483 | op->dev.of_node->full_name, op->resource[0].start); |
484 | 484 | ||
485 | rtc_bq4802_device.resource = &op->resource[0]; | 485 | rtc_bq4802_device.resource = &op->resource[0]; |
486 | return platform_device_register(&rtc_bq4802_device); | 486 | return platform_device_register(&rtc_bq4802_device); |
@@ -534,7 +534,7 @@ static struct platform_device m48t59_rtc = { | |||
534 | 534 | ||
535 | static int __devinit mostek_probe(struct of_device *op, const struct of_device_id *match) | 535 | static int __devinit mostek_probe(struct of_device *op, const struct of_device_id *match) |
536 | { | 536 | { |
537 | struct device_node *dp = op->node; | 537 | struct device_node *dp = op->dev.of_node; |
538 | 538 | ||
539 | /* On an Enterprise system there can be multiple mostek clocks. | 539 | /* On an Enterprise system there can be multiple mostek clocks. |
540 | * We should only match the one that is on the central FHC bus. | 540 | * We should only match the one that is on the central FHC bus. |