aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/vio.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-30 11:10:12 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-30 11:10:12 -0400
commit24a77daf3d80bddcece044e6dc3675e427eef3f3 (patch)
tree2c5e0b0bea394d6fe62c5d5857c252e83e48ac48 /arch/powerpc/kernel/vio.c
parente389f9aec689209724105ae80a6c91fd2e747bc9 (diff)
parentf900e9777fc9b65140cb9570438597bc8fae56ab (diff)
Merge branch 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (255 commits) [POWERPC] Remove dev_dbg redefinition in drivers/ps3/vuart.c [POWERPC] remove kernel module option for booke wdt [POWERPC] Avoid putting cpu node twice [POWERPC] Spinlock initializer cleanup [POWERPC] ppc4xx_sgdma needs dma-mapping.h [POWERPC] arch/powerpc/sysdev/timer.c build fix [POWERPC] get_property cleanups [POWERPC] Remove the unused HTDMSOUND driver [POWERPC] cell: cbe_cpufreq cleanup and crash fix [POWERPC] Declare enable_kernel_spe in a header [POWERPC] Add dt_xlate_addr() to bootwrapper [POWERPC] bootwrapper: CONFIG_ -> CONFIG_DEVICE_TREE [POWERPC] Don't define a custom bd_t for Xilixn Virtex based boards. [POWERPC] Add sane defaults for Xilinx EDK generated xparameters files [POWERPC] Add uartlite boot console driver for the zImage wrapper [POWERPC] Stop using ppc_sys for Xilinx Virtex boards [POWERPC] New registration for common Xilinx Virtex ppc405 platform devices [POWERPC] Merge common virtex header files [POWERPC] Rework Kconfig dependancies for Xilinx Virtex ppc405 platform [POWERPC] Clean up cpufreq Kconfig dependencies ...
Diffstat (limited to 'arch/powerpc/kernel/vio.c')
-rw-r--r--arch/powerpc/kernel/vio.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index 2968ffeafdb6..9eaefac5053f 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -81,7 +81,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)
81 struct iommu_table *tbl; 81 struct iommu_table *tbl;
82 unsigned long offset, size; 82 unsigned long offset, size;
83 83
84 dma_window = get_property(dev->dev.archdata.of_node, 84 dma_window = of_get_property(dev->dev.archdata.of_node,
85 "ibm,my-dma-window", NULL); 85 "ibm,my-dma-window", NULL);
86 if (!dma_window) 86 if (!dma_window)
87 return NULL; 87 return NULL;
@@ -226,7 +226,7 @@ struct vio_dev * __devinit vio_register_device_node(struct device_node *of_node)
226 return NULL; 226 return NULL;
227 } 227 }
228 228
229 unit_address = get_property(of_node, "reg", NULL); 229 unit_address = of_get_property(of_node, "reg", NULL);
230 if (unit_address == NULL) { 230 if (unit_address == NULL) {
231 printk(KERN_WARNING "%s: node %s missing 'reg'\n", 231 printk(KERN_WARNING "%s: node %s missing 'reg'\n",
232 __FUNCTION__, 232 __FUNCTION__,
@@ -246,7 +246,7 @@ struct vio_dev * __devinit vio_register_device_node(struct device_node *of_node)
246 viodev->type = of_node->type; 246 viodev->type = of_node->type;
247 viodev->unit_address = *unit_address; 247 viodev->unit_address = *unit_address;
248 if (firmware_has_feature(FW_FEATURE_ISERIES)) { 248 if (firmware_has_feature(FW_FEATURE_ISERIES)) {
249 unit_address = get_property(of_node, 249 unit_address = of_get_property(of_node,
250 "linux,unit_address", NULL); 250 "linux,unit_address", NULL);
251 if (unit_address != NULL) 251 if (unit_address != NULL)
252 viodev->unit_address = *unit_address; 252 viodev->unit_address = *unit_address;
@@ -308,7 +308,7 @@ static int __init vio_bus_init(void)
308 return err; 308 return err;
309 } 309 }
310 310
311 node_vroot = find_devices("vdevice"); 311 node_vroot = of_find_node_by_name(NULL, "vdevice");
312 if (node_vroot) { 312 if (node_vroot) {
313 struct device_node *of_node; 313 struct device_node *of_node;
314 314
@@ -322,6 +322,7 @@ static int __init vio_bus_init(void)
322 __FUNCTION__, of_node); 322 __FUNCTION__, of_node);
323 vio_register_device_node(of_node); 323 vio_register_device_node(of_node);
324 } 324 }
325 of_node_put(node_vroot);
325 } 326 }
326 327
327 return 0; 328 return 0;
@@ -377,7 +378,7 @@ static int vio_hotplug(struct device *dev, char **envp, int num_envp,
377 dn = dev->archdata.of_node; 378 dn = dev->archdata.of_node;
378 if (!dn) 379 if (!dn)
379 return -ENODEV; 380 return -ENODEV;
380 cp = get_property(dn, "compatible", &length); 381 cp = of_get_property(dn, "compatible", &length);
381 if (!cp) 382 if (!cp)
382 return -ENODEV; 383 return -ENODEV;
383 384
@@ -406,12 +407,12 @@ struct bus_type vio_bus_type = {
406 * @which: The property/attribute to be extracted. 407 * @which: The property/attribute to be extracted.
407 * @length: Pointer to length of returned data size (unused if NULL). 408 * @length: Pointer to length of returned data size (unused if NULL).
408 * 409 *
409 * Calls prom.c's get_property() to return the value of the 410 * Calls prom.c's of_get_property() to return the value of the
410 * attribute specified by @which 411 * attribute specified by @which
411*/ 412*/
412const void *vio_get_attribute(struct vio_dev *vdev, char *which, int *length) 413const void *vio_get_attribute(struct vio_dev *vdev, char *which, int *length)
413{ 414{
414 return get_property(vdev->dev.archdata.of_node, which, length); 415 return of_get_property(vdev->dev.archdata.of_node, which, length);
415} 416}
416EXPORT_SYMBOL(vio_get_attribute); 417EXPORT_SYMBOL(vio_get_attribute);
417 418
@@ -443,7 +444,7 @@ struct vio_dev *vio_find_node(struct device_node *vnode)
443 char kobj_name[BUS_ID_SIZE]; 444 char kobj_name[BUS_ID_SIZE];
444 445
445 /* construct the kobject name from the device node */ 446 /* construct the kobject name from the device node */
446 unit_address = get_property(vnode, "reg", NULL); 447 unit_address = of_get_property(vnode, "reg", NULL);
447 if (!unit_address) 448 if (!unit_address)
448 return NULL; 449 return NULL;
449 snprintf(kobj_name, BUS_ID_SIZE, "%x", *unit_address); 450 snprintf(kobj_name, BUS_ID_SIZE, "%x", *unit_address);