diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-06-23 10:44:10 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-24 08:15:43 +0200 |
commit | a2bd4fd17926d715a470fbe0ebe05128ba410984 (patch) | |
tree | 3e39a2f6aaf3a628b955067ef3668cae3456de03 /arch/sparc64/kernel/ebus.c | |
parent | [SPARC64]: Expand of_*() interfaces some more. (diff) | |
download | linux-a2bd4fd17926d715a470fbe0ebe05128ba410984.tar.xz linux-a2bd4fd17926d715a470fbe0ebe05128ba410984.zip |
[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.c | 21 |
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: } } + dev->ofdev.node = dp; + dev->ofdev.dev.parent = &dev->bus->ofdev.dev; + dev->ofdev.dev.bus = &ebus_bus_type; + strcpy(dev->ofdev.dev.bus_id, dp->path_component_name); + + /* Register with core */ + if (of_device_register(&dev->ofdev) != 0) + printk(KERN_DEBUG "ebus: device registration error for %s!\n", + dev->ofdev.dev.bus_id); + dp = dp->child; if (dp) { printk(" ->"); @@ -570,6 +580,17 @@ void __init ebus_init(void) ebus->self = pdev; ebus->parent = pbm = cookie->pbm; + ebus->ofdev.node = dp; + ebus->ofdev.dev.parent = &pdev->dev; + ebus->ofdev.dev.bus = &ebus_bus_type; + strcpy(ebus->ofdev.dev.bus_id, dp->path_component_name); + + /* Register with core */ + if (of_device_register(&ebus->ofdev) != 0) + printk(KERN_DEBUG "ebus: device registration error for %s!\n", + ebus->ofdev.dev.bus_id); + + child = dp->child; if (!child) goto next_ebus; |