Commit c868078e authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Paul Mackerras

[POWERPC] Simplify vio_bus_init a little for legacy iSeries

iSeries_vio_dev was already statically initialised and we can remove
one set of #ifdef CONFIG_PPC_ISERIES guards.
Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent c5467262
...@@ -64,6 +64,12 @@ static void __init iommu_vio_init(void) ...@@ -64,6 +64,12 @@ static void __init iommu_vio_init(void)
printk("Virtual Bus VETH TCE table failed.\n"); printk("Virtual Bus VETH TCE table failed.\n");
if (!iommu_init_table(&vio_iommu_table, -1)) if (!iommu_init_table(&vio_iommu_table, -1))
printk("Virtual Bus VIO TCE table failed.\n"); printk("Virtual Bus VIO TCE table failed.\n");
vio_bus_device.dev.archdata.dma_ops = &dma_iommu_ops;
vio_bus_device.dev.archdata.dma_data = &vio_iommu_table;
}
#else
static void __init iommu_vio_init(void)
{
} }
#endif #endif
...@@ -282,14 +288,8 @@ static int __init vio_bus_init(void) ...@@ -282,14 +288,8 @@ static int __init vio_bus_init(void)
int err; int err;
struct device_node *node_vroot; struct device_node *node_vroot;
#ifdef CONFIG_PPC_ISERIES if (firmware_has_feature(FW_FEATURE_ISERIES))
if (firmware_has_feature(FW_FEATURE_ISERIES)) {
iommu_vio_init(); iommu_vio_init();
vio_bus_device.dev.archdata.dma_ops = &dma_iommu_ops;
vio_bus_device.dev.archdata.dma_data = &vio_iommu_table;
iSeries_vio_dev = &vio_bus_device.dev;
}
#endif /* CONFIG_PPC_ISERIES */
err = bus_register(&vio_bus_type); err = bus_register(&vio_bus_type);
if (err) { if (err) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment