aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/ebus.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-06-23 04:44:10 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-06-24 02:15:43 -0400
commita2bd4fd17926d715a470fbe0ebe05128ba410984 (patch)
tree3e39a2f6aaf3a628b955067ef3668cae3456de03 /arch/sparc64/kernel/ebus.c
parent8cd24ed4f8031636fb5dacb04adee9e02556ecd5 (diff)
[SPARC64]: Add of_device layer and make ebus/isa use it.
Sparcspkr and power drivers are converted, to make sure it works. Eventually the SBUS device layer will use this as a sub-class. I really cannot cut loose on that bit until sparc32 is given the same infrastructure. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/ebus.c')
-rw-r--r--arch/sparc64/kernel/ebus.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c
index 33d79e10c653..b390a2f3a15e 100644
--- a/arch/sparc64/kernel/ebus.c
+++ b/arch/sparc64/kernel/ebus.c
@@ -475,6 +475,16 @@ probe_interrupts:
475 } 475 }
476 } 476 }
477 477
478 dev->ofdev.node = dp;
479 dev->ofdev.dev.parent = &dev->bus->ofdev.dev;
480 dev->ofdev.dev.bus = &ebus_bus_type;
481 strcpy(dev->ofdev.dev.bus_id, dp->path_component_name);
482
483 /* Register with core */
484 if (of_device_register(&dev->ofdev) != 0)
485 printk(KERN_DEBUG "ebus: device registration error for %s!\n",
486 dev->ofdev.dev.bus_id);
487
478 dp = dp->child; 488 dp = dp->child;
479 if (dp) { 489 if (dp) {
480 printk(" ->"); 490 printk(" ->");
@@ -570,6 +580,17 @@ void __init ebus_init(void)
570 ebus->self = pdev; 580 ebus->self = pdev;
571 ebus->parent = pbm = cookie->pbm; 581 ebus->parent = pbm = cookie->pbm;
572 582
583 ebus->ofdev.node = dp;
584 ebus->ofdev.dev.parent = &pdev->dev;
585 ebus->ofdev.dev.bus = &ebus_bus_type;
586 strcpy(ebus->ofdev.dev.bus_id, dp->path_component_name);
587
588 /* Register with core */
589 if (of_device_register(&ebus->ofdev) != 0)
590 printk(KERN_DEBUG "ebus: device registration error for %s!\n",
591 ebus->ofdev.dev.bus_id);
592
593
573 child = dp->child; 594 child = dp->child;
574 if (!child) 595 if (!child)
575 goto next_ebus; 596 goto next_ebus;