diff options
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r-- | arch/sparc/kernel/of_device.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c index aace71f7d6e5..8fdc1b3113b9 100644 --- a/arch/sparc/kernel/of_device.c +++ b/arch/sparc/kernel/of_device.c | |||
@@ -40,6 +40,28 @@ unsigned int irq_of_parse_and_map(struct device_node *node, int index) | |||
40 | } | 40 | } |
41 | EXPORT_SYMBOL(irq_of_parse_and_map); | 41 | EXPORT_SYMBOL(irq_of_parse_and_map); |
42 | 42 | ||
43 | /* Take the archdata values for IOMMU, STC, and HOSTDATA found in | ||
44 | * BUS and propagate to all child of_device objects. | ||
45 | */ | ||
46 | void of_propagate_archdata(struct of_device *bus) | ||
47 | { | ||
48 | struct dev_archdata *bus_sd = &bus->dev.archdata; | ||
49 | struct device_node *bus_dp = bus->node; | ||
50 | struct device_node *dp; | ||
51 | |||
52 | for (dp = bus_dp->child; dp; dp = dp->sibling) { | ||
53 | struct of_device *op = of_find_device_by_node(dp); | ||
54 | |||
55 | op->dev.archdata.iommu = bus_sd->iommu; | ||
56 | op->dev.archdata.stc = bus_sd->stc; | ||
57 | op->dev.archdata.host_controller = bus_sd->host_controller; | ||
58 | op->dev.archdata.numa_node = bus_sd->numa_node; | ||
59 | |||
60 | if (dp->child) | ||
61 | of_propagate_archdata(op); | ||
62 | } | ||
63 | } | ||
64 | |||
43 | #ifdef CONFIG_PCI | 65 | #ifdef CONFIG_PCI |
44 | struct bus_type ebus_bus_type; | 66 | struct bus_type ebus_bus_type; |
45 | EXPORT_SYMBOL(ebus_bus_type); | 67 | EXPORT_SYMBOL(ebus_bus_type); |