From e10fa77368dff31140451fac04d78d9f51f0f3ac Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Thu, 27 Apr 2006 17:18:21 +1000 Subject: [PATCH] powerpc: use the device tree for the iSeries vio bus probe As an added bonus, since every vio_dev now has a device_node associated with it, hotplug now works. Signed-off-by: Stephen Rothwell Signed-off-by: Paul Mackerras --- include/asm-powerpc/vio.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'include/asm-powerpc/vio.h') diff --git a/include/asm-powerpc/vio.h b/include/asm-powerpc/vio.h index 0544ece5176..0055d8e6102 100644 --- a/include/asm-powerpc/vio.h +++ b/include/asm-powerpc/vio.h @@ -66,8 +66,7 @@ struct vio_driver { struct vio_bus_ops { int (*match)(const struct vio_device_id *id, const struct vio_dev *dev); - void (*unregister_device)(struct vio_dev *); - void (*release_device)(struct device *); + struct iommu_table *(*build_iommu_table)(struct vio_dev *dev); }; extern struct dma_mapping_ops vio_dma_ops; @@ -82,14 +81,14 @@ extern void __devinit vio_unregister_device(struct vio_dev *dev); extern int vio_bus_init(struct vio_bus_ops *); -#ifdef CONFIG_PPC_PSERIES struct device_node; extern struct vio_dev * __devinit vio_register_device_node( struct device_node *node_vdev); -extern struct vio_dev *vio_find_node(struct device_node *vnode); -extern const void *vio_get_attribute(struct vio_dev *vdev, void *which, +extern const void *vio_get_attribute(struct vio_dev *vdev, char *which, int *length); +#ifdef CONFIG_PPC_PSERIES +extern struct vio_dev *vio_find_node(struct device_node *vnode); extern int vio_enable_interrupts(struct vio_dev *dev); extern int vio_disable_interrupts(struct vio_dev *dev); #endif -- cgit v1.2.3 From dd721ffd95d5e1516380da0b254ef737582a258f Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Thu, 27 Apr 2006 17:21:46 +1000 Subject: [PATCH] powerpc: use a common vio_match_device routine This requires the compatible properties having vaules that are empty strings instead of just being empty properties. Signed-off-by: Stephen Rothwell Signed-off-by: Paul Mackerras --- include/asm-powerpc/vio.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/asm-powerpc/vio.h') diff --git a/include/asm-powerpc/vio.h b/include/asm-powerpc/vio.h index 0055d8e6102..9c09a8ffa12 100644 --- a/include/asm-powerpc/vio.h +++ b/include/asm-powerpc/vio.h @@ -65,7 +65,6 @@ struct vio_driver { }; struct vio_bus_ops { - int (*match)(const struct vio_device_id *id, const struct vio_dev *dev); struct iommu_table *(*build_iommu_table)(struct vio_dev *dev); }; -- cgit v1.2.3 From c7f0e8cb5654a50986c6097b3c0cca972e406899 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Thu, 27 Apr 2006 17:23:32 +1000 Subject: [PATCH] powerpc: merge the rest of the vio code Signed-off-by: Stephen Rothwell Signed-off-by: Paul Mackerras --- include/asm-powerpc/vio.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'include/asm-powerpc/vio.h') diff --git a/include/asm-powerpc/vio.h b/include/asm-powerpc/vio.h index 9c09a8ffa12..10da7f3af93 100644 --- a/include/asm-powerpc/vio.h +++ b/include/asm-powerpc/vio.h @@ -64,22 +64,14 @@ struct vio_driver { struct device_driver driver; }; -struct vio_bus_ops { - struct iommu_table *(*build_iommu_table)(struct vio_dev *dev); -}; - extern struct dma_mapping_ops vio_dma_ops; extern struct bus_type vio_bus_type; -extern struct vio_dev vio_bus_device; extern int vio_register_driver(struct vio_driver *drv); extern void vio_unregister_driver(struct vio_driver *drv); -extern struct vio_dev * __devinit vio_register_device(struct vio_dev *viodev); extern void __devinit vio_unregister_device(struct vio_dev *dev); -extern int vio_bus_init(struct vio_bus_ops *); - struct device_node; extern struct vio_dev * __devinit vio_register_device_node( -- cgit v1.2.3