aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-04-03 08:26:41 -0400
committerPaul Mackerras <paulus@samba.org>2007-04-12 13:55:19 -0400
commite2eb63927bfcb54232163bfec32440246fd44457 (patch)
tree596656edeb2332b5134d8236fa50b87f2c0ece29 /arch/powerpc/platforms
parentceef87782a9452eeeca774e65d7f4e06455780a3 (diff)
[POWERPC] Rename get_property to of_get_property: arch/powerpc
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/52xx/efika.c15
-rw-r--r--arch/powerpc/platforms/52xx/lite5200.c6
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_common.c2
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pci.c2
-rw-r--r--arch/powerpc/platforms/82xx/mpc82xx.c6
-rw-r--r--arch/powerpc/platforms/82xx/mpc82xx_ads.c12
-rw-r--r--arch/powerpc/platforms/83xx/pci.c2
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ads.c2
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_cds.c2
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_mds.c2
-rw-r--r--arch/powerpc/platforms/85xx/pci.c2
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx_hpcn.c4
-rw-r--r--arch/powerpc/platforms/86xx/pci.c2
-rw-r--r--arch/powerpc/platforms/8xx/m8xx_setup.c8
-rw-r--r--arch/powerpc/platforms/8xx/mpc86xads_setup.c4
-rw-r--r--arch/powerpc/platforms/8xx/mpc885ads_setup.c4
-rw-r--r--arch/powerpc/platforms/cell/cbe_regs.c7
-rw-r--r--arch/powerpc/platforms/cell/cbe_thermal.c4
-rw-r--r--arch/powerpc/platforms/cell/interrupt.c4
-rw-r--r--arch/powerpc/platforms/cell/io-workarounds.c2
-rw-r--r--arch/powerpc/platforms/cell/iommu.c8
-rw-r--r--arch/powerpc/platforms/cell/setup.c2
-rw-r--r--arch/powerpc/platforms/cell/spider-pic.c8
-rw-r--r--arch/powerpc/platforms/cell/spu_manage.c18
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c2
-rw-r--r--arch/powerpc/platforms/celleb/iommu.c2
-rw-r--r--arch/powerpc/platforms/celleb/pci.c18
-rw-r--r--arch/powerpc/platforms/celleb/setup.c2
-rw-r--r--arch/powerpc/platforms/chrp/nvram.c2
-rw-r--r--arch/powerpc/platforms/chrp/pci.c11
-rw-r--r--arch/powerpc/platforms/chrp/setup.c17
-rw-r--r--arch/powerpc/platforms/embedded6xx/linkstation.c8
-rw-r--r--arch/powerpc/platforms/embedded6xx/ls_uart.c4
-rw-r--r--arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c4
-rw-r--r--arch/powerpc/platforms/iseries/iommu.c2
-rw-r--r--arch/powerpc/platforms/iseries/pci.c4
-rw-r--r--arch/powerpc/platforms/iseries/viopath.c2
-rw-r--r--arch/powerpc/platforms/maple/pci.c6
-rw-r--r--arch/powerpc/platforms/maple/setup.c12
-rw-r--r--arch/powerpc/platforms/pasemi/iommu.c2
-rw-r--r--arch/powerpc/platforms/pasemi/setup.c2
-rw-r--r--arch/powerpc/platforms/powermac/backlight.c2
-rw-r--r--arch/powerpc/platforms/powermac/cpufreq_32.c21
-rw-r--r--arch/powerpc/platforms/powermac/cpufreq_64.c16
-rw-r--r--arch/powerpc/platforms/powermac/feature.c24
-rw-r--r--arch/powerpc/platforms/powermac/low_i2c.c15
-rw-r--r--arch/powerpc/platforms/powermac/pci.c16
-rw-r--r--arch/powerpc/platforms/powermac/pfunc_base.c2
-rw-r--r--arch/powerpc/platforms/powermac/pfunc_core.c2
-rw-r--r--arch/powerpc/platforms/powermac/pic.c6
-rw-r--r--arch/powerpc/platforms/powermac/setup.c20
-rw-r--r--arch/powerpc/platforms/powermac/smp.c6
-rw-r--r--arch/powerpc/platforms/powermac/udbg_scc.c6
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c10
-rw-r--r--arch/powerpc/platforms/pseries/eeh_driver.c4
-rw-r--r--arch/powerpc/platforms/pseries/eeh_event.c2
-rw-r--r--arch/powerpc/platforms/pseries/firmware.c2
-rw-r--r--arch/powerpc/platforms/pseries/hotplug-cpu.c4
-rw-r--r--arch/powerpc/platforms/pseries/iommu.c12
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c6
-rw-r--r--arch/powerpc/platforms/pseries/nvram.c2
-rw-r--r--arch/powerpc/platforms/pseries/pci.c2
-rw-r--r--arch/powerpc/platforms/pseries/ras.c2
-rw-r--r--arch/powerpc/platforms/pseries/rtasd.c2
-rw-r--r--arch/powerpc/platforms/pseries/setup.c8
-rw-r--r--arch/powerpc/platforms/pseries/xics.c15
66 files changed, 220 insertions, 215 deletions
diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c
index 31a2a8ca1de7..042008486969 100644
--- a/arch/powerpc/platforms/52xx/efika.c
+++ b/arch/powerpc/platforms/52xx/efika.c
@@ -113,7 +113,7 @@ void __init efika_pcisetup(void)
113 return; 113 return;
114 } 114 }
115 115
116 bus_range = get_property(pcictrl, "bus-range", &len); 116 bus_range = of_get_property(pcictrl, "bus-range", &len);
117 if (bus_range == NULL || len < 2 * sizeof(int)) { 117 if (bus_range == NULL || len < 2 * sizeof(int)) {
118 printk(KERN_WARNING EFIKA_PLATFORM_NAME 118 printk(KERN_WARNING EFIKA_PLATFORM_NAME
119 ": Can't get bus-range for %s\n", pcictrl->full_name); 119 ": Can't get bus-range for %s\n", pcictrl->full_name);
@@ -159,18 +159,17 @@ void __init efika_pcisetup(void)
159static void efika_show_cpuinfo(struct seq_file *m) 159static void efika_show_cpuinfo(struct seq_file *m)
160{ 160{
161 struct device_node *root; 161 struct device_node *root;
162 const char *revision = NULL; 162 const char *revision;
163 const char *codegendescription = NULL; 163 const char *codegendescription;
164 const char *codegenvendor = NULL; 164 const char *codegenvendor;
165 165
166 root = of_find_node_by_path("/"); 166 root = of_find_node_by_path("/");
167 if (!root) 167 if (!root)
168 return; 168 return;
169 169
170 revision = get_property(root, "revision", NULL); 170 revision = of_get_property(root, "revision", NULL);
171 codegendescription = 171 codegendescription = of_get_property(root, "CODEGEN,description", NULL);
172 get_property(root, "CODEGEN,description", NULL); 172 codegenvendor = of_get_property(root, "CODEGEN,vendor", NULL);
173 codegenvendor = get_property(root, "CODEGEN,vendor", NULL);
174 173
175 if (codegendescription) 174 if (codegendescription)
176 seq_printf(m, "machine\t\t: %s\n", codegendescription); 175 seq_printf(m, "machine\t\t: %s\n", codegendescription);
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c
index cc3b40de21dd..4f5ebaadcb50 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -94,8 +94,8 @@ static void __init lite5200_setup_arch(void)
94 94
95 np = of_find_node_by_type(NULL, "cpu"); 95 np = of_find_node_by_type(NULL, "cpu");
96 if (np) { 96 if (np) {
97 unsigned int *fp = 97 const unsigned int *fp =
98 (int *)get_property(np, "clock-frequency", NULL); 98 of_get_property(np, "clock-frequency", NULL);
99 if (fp != 0) 99 if (fp != 0)
100 loops_per_jiffy = *fp / HZ; 100 loops_per_jiffy = *fp / HZ;
101 else 101 else
@@ -132,7 +132,7 @@ void lite5200_show_cpuinfo(struct seq_file *m)
132 const char *model = NULL; 132 const char *model = NULL;
133 133
134 if (np) 134 if (np)
135 model = get_property(np, "model", NULL); 135 model = of_get_property(np, "model", NULL);
136 136
137 seq_printf(m, "vendor\t\t: Freescale Semiconductor\n"); 137 seq_printf(m, "vendor\t\t: Freescale Semiconductor\n");
138 seq_printf(m, "machine\t\t: %s\n", model ? model : "unknown"); 138 seq_printf(m, "machine\t\t: %s\n", model ? model : "unknown");
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index ed0cb694aea8..2dd415ff55a9 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -60,7 +60,7 @@ mpc52xx_find_ipb_freq(struct device_node *node)
60 60
61 of_node_get(node); 61 of_node_get(node);
62 while (node) { 62 while (node) {
63 p_ipb_freq = get_property(node, "bus-frequency", NULL); 63 p_ipb_freq = of_get_property(node, "bus-frequency", NULL);
64 if (p_ipb_freq) 64 if (p_ipb_freq)
65 break; 65 break;
66 66
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
index faf161bdbc1c..34d34a26d305 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
@@ -370,7 +370,7 @@ mpc52xx_add_bridge(struct device_node *node)
370 return -EINVAL; 370 return -EINVAL;
371 } 371 }
372 372
373 bus_range = get_property(node, "bus-range", &len); 373 bus_range = of_get_property(node, "bus-range", &len);
374 if (bus_range == NULL || len < 2 * sizeof(int)) { 374 if (bus_range == NULL || len < 2 * sizeof(int)) {
375 printk(KERN_WARNING "Can't get %s bus-range, assume bus 0\n", 375 printk(KERN_WARNING "Can't get %s bus-range, assume bus 0\n",
376 node->full_name); 376 node->full_name);
diff --git a/arch/powerpc/platforms/82xx/mpc82xx.c b/arch/powerpc/platforms/82xx/mpc82xx.c
index 74e7892cdfcf..cc9900d2e5ee 100644
--- a/arch/powerpc/platforms/82xx/mpc82xx.c
+++ b/arch/powerpc/platforms/82xx/mpc82xx.c
@@ -55,17 +55,17 @@
55static int __init get_freq(char *name, unsigned long *val) 55static int __init get_freq(char *name, unsigned long *val)
56{ 56{
57 struct device_node *cpu; 57 struct device_node *cpu;
58 unsigned int *fp; 58 const unsigned int *fp;
59 int found = 0; 59 int found = 0;
60 60
61 /* The cpu node should have timebase and clock frequency properties */ 61 /* The cpu node should have timebase and clock frequency properties */
62 cpu = of_find_node_by_type(NULL, "cpu"); 62 cpu = of_find_node_by_type(NULL, "cpu");
63 63
64 if (cpu) { 64 if (cpu) {
65 fp = (unsigned int *)get_property(cpu, name, NULL); 65 fp = of_get_property(cpu, name, NULL);
66 if (fp) { 66 if (fp) {
67 found = 1; 67 found = 1;
68 *val = *fp++; 68 *val = *fp;
69 } 69 }
70 70
71 of_node_put(cpu); 71 of_node_put(cpu);
diff --git a/arch/powerpc/platforms/82xx/mpc82xx_ads.c b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
index 7334c1a15b90..47cb09f08052 100644
--- a/arch/powerpc/platforms/82xx/mpc82xx_ads.c
+++ b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
@@ -456,7 +456,7 @@ void m82xx_pci_init_irq(void)
456 iounmap(immap); 456 iounmap(immap);
457 return; 457 return;
458 } 458 }
459 irq_map = get_property(np, "interrupt-map", &size); 459 irq_map = of_get_property(np, "interrupt-map", &size);
460 if ((!irq_map) || (size <= 7)) { 460 if ((!irq_map) || (size <= 7)) {
461 printk(KERN_INFO "No interrupt-map property of pci node\n"); 461 printk(KERN_INFO "No interrupt-map property of pci node\n");
462 iounmap(immap); 462 iounmap(immap);
@@ -481,7 +481,7 @@ void m82xx_pci_init_irq(void)
481 } 481 }
482 pci_pic_node = of_node_get(np); 482 pci_pic_node = of_node_get(np);
483 /* PCI interrupt controller registers: status and mask */ 483 /* PCI interrupt controller registers: status and mask */
484 regs = get_property(np, "reg", &size); 484 regs = of_get_property(np, "reg", &size);
485 if ((!regs) || (size <= 2)) { 485 if ((!regs) || (size <= 2)) {
486 printk(KERN_INFO "No reg property in pci pic node\n"); 486 printk(KERN_INFO "No reg property in pci pic node\n");
487 iounmap(immap); 487 iounmap(immap);
@@ -521,20 +521,20 @@ void __init add_bridge(struct device_node *np)
521 struct pci_controller *hose; 521 struct pci_controller *hose;
522 struct resource r; 522 struct resource r;
523 const int *bus_range; 523 const int *bus_range;
524 const void *ptr; 524 const uint *ptr;
525 525
526 memset(&r, 0, sizeof(r)); 526 memset(&r, 0, sizeof(r));
527 if (of_address_to_resource(np, 0, &r)) { 527 if (of_address_to_resource(np, 0, &r)) {
528 printk(KERN_INFO "No PCI reg property in device tree\n"); 528 printk(KERN_INFO "No PCI reg property in device tree\n");
529 return; 529 return;
530 } 530 }
531 if (!(ptr = get_property(np, "clock-frequency", NULL))) { 531 if (!(ptr = of_get_property(np, "clock-frequency", NULL))) {
532 printk(KERN_INFO "No clock-frequency property in PCI node"); 532 printk(KERN_INFO "No clock-frequency property in PCI node");
533 return; 533 return;
534 } 534 }
535 pci_clk_frq = *(uint *) ptr; 535 pci_clk_frq = *ptr;
536 of_node_put(np); 536 of_node_put(np);
537 bus_range = get_property(np, "bus-range", &len); 537 bus_range = of_get_property(np, "bus-range", &len);
538 if (bus_range == NULL || len < 2 * sizeof(int)) { 538 if (bus_range == NULL || len < 2 * sizeof(int)) {
539 printk(KERN_WARNING "Can't get bus-range for %s, assume" 539 printk(KERN_WARNING "Can't get bus-range for %s, assume"
540 " bus 0\n", np->full_name); 540 " bus 0\n", np->full_name);
diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c
index 9c3650555144..774457d09e94 100644
--- a/arch/powerpc/platforms/83xx/pci.c
+++ b/arch/powerpc/platforms/83xx/pci.c
@@ -60,7 +60,7 @@ int __init add_bridge(struct device_node *dev)
60 has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); 60 has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
61 61
62 /* Get bus range if any */ 62 /* Get bus range if any */
63 bus_range = get_property(dev, "bus-range", &len); 63 bus_range = of_get_property(dev, "bus-range", &len);
64 if (bus_range == NULL || len < 2 * sizeof(int)) { 64 if (bus_range == NULL || len < 2 * sizeof(int)) {
65 printk(KERN_WARNING "Can't get bus-range for %s, assume" 65 printk(KERN_WARNING "Can't get bus-range for %s, assume"
66 " bus 0\n", dev->full_name); 66 " bus 0\n", dev->full_name);
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index 8ed034aeca5f..5d27621f0927 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -227,7 +227,7 @@ static void __init mpc85xx_ads_setup_arch(void)
227 if (cpu != 0) { 227 if (cpu != 0) {
228 const unsigned int *fp; 228 const unsigned int *fp;
229 229
230 fp = get_property(cpu, "clock-frequency", NULL); 230 fp = of_get_property(cpu, "clock-frequency", NULL);
231 if (fp != 0) 231 if (fp != 0)
232 loops_per_jiffy = *fp / HZ; 232 loops_per_jiffy = *fp / HZ;
233 else 233 else
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index 4232686be441..7e71636f9098 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -237,7 +237,7 @@ static void __init mpc85xx_cds_setup_arch(void)
237 if (cpu != 0) { 237 if (cpu != 0) {
238 const unsigned int *fp; 238 const unsigned int *fp;
239 239
240 fp = get_property(cpu, "clock-frequency", NULL); 240 fp = of_get_property(cpu, "clock-frequency", NULL);
241 if (fp != 0) 241 if (fp != 0)
242 loops_per_jiffy = *fp / HZ; 242 loops_per_jiffy = *fp / HZ;
243 else 243 else
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index 81144d2ae455..54db41689954 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -80,7 +80,7 @@ static void __init mpc85xx_mds_setup_arch(void)
80 np = of_find_node_by_type(NULL, "cpu"); 80 np = of_find_node_by_type(NULL, "cpu");
81 if (np != NULL) { 81 if (np != NULL) {
82 const unsigned int *fp = 82 const unsigned int *fp =
83 get_property(np, "clock-frequency", NULL); 83 of_get_property(np, "clock-frequency", NULL);
84 if (fp != NULL) 84 if (fp != NULL)
85 loops_per_jiffy = *fp / HZ; 85 loops_per_jiffy = *fp / HZ;
86 else 86 else
diff --git a/arch/powerpc/platforms/85xx/pci.c b/arch/powerpc/platforms/85xx/pci.c
index 05930eeb6e7f..48f17e23d771 100644
--- a/arch/powerpc/platforms/85xx/pci.c
+++ b/arch/powerpc/platforms/85xx/pci.c
@@ -51,7 +51,7 @@ int __init add_bridge(struct device_node *dev)
51 has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); 51 has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
52 52
53 /* Get bus range if any */ 53 /* Get bus range if any */
54 bus_range = get_property(dev, "bus-range", &len); 54 bus_range = of_get_property(dev, "bus-range", &len);
55 if (bus_range == NULL || len < 2 * sizeof(int)) { 55 if (bus_range == NULL || len < 2 * sizeof(int)) {
56 printk(KERN_WARNING "Can't get bus-range for %s, assume" 56 printk(KERN_WARNING "Can't get bus-range for %s, assume"
57 " bus 0\n", dev->full_name); 57 " bus 0\n", dev->full_name);
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index f42f801cf84e..3d3d98f5bd4a 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -349,7 +349,7 @@ mpc86xx_hpcn_setup_arch(void)
349 if (np != 0) { 349 if (np != 0) {
350 const unsigned int *fp; 350 const unsigned int *fp;
351 351
352 fp = get_property(np, "clock-frequency", NULL); 352 fp = of_get_property(np, "clock-frequency", NULL);
353 if (fp != 0) 353 if (fp != 0)
354 loops_per_jiffy = *fp / HZ; 354 loops_per_jiffy = *fp / HZ;
355 else 355 else
@@ -384,7 +384,7 @@ mpc86xx_hpcn_show_cpuinfo(struct seq_file *m)
384 384
385 root = of_find_node_by_path("/"); 385 root = of_find_node_by_path("/");
386 if (root) 386 if (root)
387 model = get_property(root, "model", NULL); 387 model = of_get_property(root, "model", NULL);
388 seq_printf(m, "Machine\t\t: %s\n", model); 388 seq_printf(m, "Machine\t\t: %s\n", model);
389 of_node_put(root); 389 of_node_put(root);
390 390
diff --git a/arch/powerpc/platforms/86xx/pci.c b/arch/powerpc/platforms/86xx/pci.c
index ba86c48f446b..8235c562661f 100644
--- a/arch/powerpc/platforms/86xx/pci.c
+++ b/arch/powerpc/platforms/86xx/pci.c
@@ -163,7 +163,7 @@ int __init add_bridge(struct device_node *dev)
163 has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); 163 has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
164 164
165 /* Get bus range if any */ 165 /* Get bus range if any */
166 bus_range = get_property(dev, "bus-range", &len); 166 bus_range = of_get_property(dev, "bus-range", &len);
167 if (bus_range == NULL || len < 2 * sizeof(int)) 167 if (bus_range == NULL || len < 2 * sizeof(int))
168 printk(KERN_WARNING "Can't get bus-range for %s, assume" 168 printk(KERN_WARNING "Can't get bus-range for %s, assume"
169 " bus 0\n", dev->full_name); 169 " bus 0\n", dev->full_name);
diff --git a/arch/powerpc/platforms/8xx/m8xx_setup.c b/arch/powerpc/platforms/8xx/m8xx_setup.c
index 9ed7125f0150..0901dbada350 100644
--- a/arch/powerpc/platforms/8xx/m8xx_setup.c
+++ b/arch/powerpc/platforms/8xx/m8xx_setup.c
@@ -85,17 +85,17 @@ init_internal_rtc(void)
85static int __init get_freq(char *name, unsigned long *val) 85static int __init get_freq(char *name, unsigned long *val)
86{ 86{
87 struct device_node *cpu; 87 struct device_node *cpu;
88 unsigned int *fp; 88 const unsigned int *fp;
89 int found = 0; 89 int found = 0;
90 90
91 /* The cpu node should have timebase and clock frequency properties */ 91 /* The cpu node should have timebase and clock frequency properties */
92 cpu = of_find_node_by_type(NULL, "cpu"); 92 cpu = of_find_node_by_type(NULL, "cpu");
93 93
94 if (cpu) { 94 if (cpu) {
95 fp = (unsigned int *)get_property(cpu, name, NULL); 95 fp = of_get_property(cpu, name, NULL);
96 if (fp) { 96 if (fp) {
97 found = 1; 97 found = 1;
98 *val = *fp++; 98 *val = *fp;
99 } 99 }
100 100
101 of_node_put(cpu); 101 of_node_put(cpu);
@@ -262,7 +262,7 @@ void mpc8xx_show_cpuinfo(struct seq_file *m)
262 262
263 root = of_find_node_by_path("/"); 263 root = of_find_node_by_path("/");
264 if (root) 264 if (root)
265 model = get_property(root, "model", NULL); 265 model = of_get_property(root, "model", NULL);
266 seq_printf(m, "Machine\t\t: %s\n", model); 266 seq_printf(m, "Machine\t\t: %s\n", model);
267 of_node_put(root); 267 of_node_put(root);
268 268
diff --git a/arch/powerpc/platforms/8xx/mpc86xads_setup.c b/arch/powerpc/platforms/8xx/mpc86xads_setup.c
index ef52ce701b0e..a35315af5c53 100644
--- a/arch/powerpc/platforms/8xx/mpc86xads_setup.c
+++ b/arch/powerpc/platforms/8xx/mpc86xads_setup.c
@@ -247,7 +247,7 @@ void init_smc_ioports(struct fs_uart_platform_info *data)
247 } 247 }
248} 248}
249 249
250int platform_device_skip(char *model, int id) 250int platform_device_skip(const char *model, int id)
251{ 251{
252 return 0; 252 return 0;
253} 253}
@@ -260,7 +260,7 @@ static void __init mpc86xads_setup_arch(void)
260 if (cpu != 0) { 260 if (cpu != 0) {
261 const unsigned int *fp; 261 const unsigned int *fp;
262 262
263 fp = get_property(cpu, "clock-frequency", NULL); 263 fp = of_get_property(cpu, "clock-frequency", NULL);
264 if (fp != 0) 264 if (fp != 0)
265 loops_per_jiffy = *fp / HZ; 265 loops_per_jiffy = *fp / HZ;
266 else 266 else
diff --git a/arch/powerpc/platforms/8xx/mpc885ads_setup.c b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
index c5fefdf66c0a..a57b57785acd 100644
--- a/arch/powerpc/platforms/8xx/mpc885ads_setup.c
+++ b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
@@ -322,7 +322,7 @@ void init_smc_ioports(struct fs_uart_platform_info *data)
322 } 322 }
323} 323}
324 324
325int platform_device_skip(char *model, int id) 325int platform_device_skip(const char *model, int id)
326{ 326{
327#ifdef CONFIG_MPC8xx_SECOND_ETH_SCC3 327#ifdef CONFIG_MPC8xx_SECOND_ETH_SCC3
328 const char *dev = "FEC"; 328 const char *dev = "FEC";
@@ -346,7 +346,7 @@ static void __init mpc885ads_setup_arch(void)
346 if (cpu != 0) { 346 if (cpu != 0) {
347 const unsigned int *fp; 347 const unsigned int *fp;
348 348
349 fp = get_property(cpu, "clock-frequency", NULL); 349 fp = of_get_property(cpu, "clock-frequency", NULL);
350 if (fp != 0) 350 if (fp != 0)
351 loops_per_jiffy = *fp / HZ; 351 loops_per_jiffy = *fp / HZ;
352 else 352 else
diff --git a/arch/powerpc/platforms/cell/cbe_regs.c b/arch/powerpc/platforms/cell/cbe_regs.c
index 9a0ee62691d5..7c94af4ac439 100644
--- a/arch/powerpc/platforms/cell/cbe_regs.c
+++ b/arch/powerpc/platforms/cell/cbe_regs.c
@@ -174,16 +174,15 @@ void __init cbe_regs_init(void)
174 if (cbe_thread_map[i].cpu_node == cpu) 174 if (cbe_thread_map[i].cpu_node == cpu)
175 cbe_thread_map[i].regs = map; 175 cbe_thread_map[i].regs = map;
176 176
177 prop = get_property(cpu, "pervasive", NULL); 177 prop = of_get_property(cpu, "pervasive", NULL);
178 if (prop != NULL) 178 if (prop != NULL)
179 map->pmd_regs = ioremap(prop->address, prop->len); 179 map->pmd_regs = ioremap(prop->address, prop->len);
180 180
181 prop = get_property(cpu, "iic", NULL); 181 prop = of_get_property(cpu, "iic", NULL);
182 if (prop != NULL) 182 if (prop != NULL)
183 map->iic_regs = ioremap(prop->address, prop->len); 183 map->iic_regs = ioremap(prop->address, prop->len);
184 184
185 prop = (struct address_prop *)get_property(cpu, "mic-tm", 185 prop = of_get_property(cpu, "mic-tm", NULL);
186 NULL);
187 if (prop != NULL) 186 if (prop != NULL)
188 map->mic_tm_regs = ioremap(prop->address, prop->len); 187 map->mic_tm_regs = ioremap(prop->address, prop->len);
189 } 188 }
diff --git a/arch/powerpc/platforms/cell/cbe_thermal.c b/arch/powerpc/platforms/cell/cbe_thermal.c
index 70e0d968d30f..e8bcd2a767ce 100644
--- a/arch/powerpc/platforms/cell/cbe_thermal.c
+++ b/arch/powerpc/platforms/cell/cbe_thermal.c
@@ -43,14 +43,14 @@ static struct cbe_pmd_regs __iomem *get_pmd_regs(struct sys_device *sysdev)
43/* returns the value for a given spu in a given register */ 43/* returns the value for a given spu in a given register */
44static u8 spu_read_register_value(struct sys_device *sysdev, union spe_reg __iomem *reg) 44static u8 spu_read_register_value(struct sys_device *sysdev, union spe_reg __iomem *reg)
45{ 45{
46 unsigned int *id; 46 const unsigned int *id;
47 union spe_reg value; 47 union spe_reg value;
48 struct spu *spu; 48 struct spu *spu;
49 49
50 /* getting the id from the reg attribute will not work on future device-tree layouts 50 /* getting the id from the reg attribute will not work on future device-tree layouts
51 * in future we should store the id to the spu struct and use it here */ 51 * in future we should store the id to the spu struct and use it here */
52 spu = container_of(sysdev, struct spu, sysdev); 52 spu = container_of(sysdev, struct spu, sysdev);
53 id = (unsigned int *)get_property(spu_devnode(spu), "reg", NULL); 53 id = of_get_property(spu_devnode(spu), "reg", NULL);
54 value.val = in_be64(&reg->val); 54 value.val = in_be64(&reg->val);
55 55
56 return value.spe[*id]; 56 return value.spe[*id];
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c
index 6666d037eb44..4fc4e92775d0 100644
--- a/arch/powerpc/platforms/cell/interrupt.c
+++ b/arch/powerpc/platforms/cell/interrupt.c
@@ -261,7 +261,7 @@ static int iic_host_xlate(struct irq_host *h, struct device_node *ct,
261 return -ENODEV; 261 return -ENODEV;
262 if (intsize != 1) 262 if (intsize != 1)
263 return -ENODEV; 263 return -ENODEV;
264 val = get_property(ct, "#interrupt-cells", NULL); 264 val = of_get_property(ct, "#interrupt-cells", NULL);
265 if (val == NULL || *val != 1) 265 if (val == NULL || *val != 1)
266 return -ENODEV; 266 return -ENODEV;
267 267
@@ -327,7 +327,7 @@ static int __init setup_iic(void)
327 if (!device_is_compatible(dn, 327 if (!device_is_compatible(dn,
328 "IBM,CBEA-Internal-Interrupt-Controller")) 328 "IBM,CBEA-Internal-Interrupt-Controller"))
329 continue; 329 continue;
330 np = get_property(dn, "ibm,interrupt-server-ranges", NULL); 330 np = of_get_property(dn, "ibm,interrupt-server-ranges", NULL);
331 if (np == NULL) { 331 if (np == NULL) {
332 printk(KERN_WARNING "IIC: CPU association not found\n"); 332 printk(KERN_WARNING "IIC: CPU association not found\n");
333 of_node_put(dn); 333 of_node_put(dn);
diff --git a/arch/powerpc/platforms/cell/io-workarounds.c b/arch/powerpc/platforms/cell/io-workarounds.c
index 7c73128305ec..d68d920eb2c4 100644
--- a/arch/powerpc/platforms/cell/io-workarounds.c
+++ b/arch/powerpc/platforms/cell/io-workarounds.c
@@ -318,7 +318,7 @@ static int __init spider_pci_workaround_init(void)
318 */ 318 */
319 list_for_each_entry(phb, &hose_list, list_node) { 319 list_for_each_entry(phb, &hose_list, list_node) {
320 struct device_node *np = phb->arch_data; 320 struct device_node *np = phb->arch_data;
321 const char *model = get_property(np, "model", NULL); 321 const char *model = of_get_property(np, "model", NULL);
322 322
323 /* If no model property or name isn't exactly "pci", skip */ 323 /* If no model property or name isn't exactly "pci", skip */
324 if (model == NULL || strcmp(np->name, "pci")) 324 if (model == NULL || strcmp(np->name, "pci"))
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index 7c953cc022f6..760caa76841a 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -291,9 +291,9 @@ static int cell_iommu_find_ioc(int nid, unsigned long *base)
291 const unsigned int *nidp; 291 const unsigned int *nidp;
292 const unsigned long *tmp; 292 const unsigned long *tmp;
293 293
294 nidp = get_property(np, "node-id", NULL); 294 nidp = of_get_property(np, "node-id", NULL);
295 if (nidp && *nidp == nid) { 295 if (nidp && *nidp == nid) {
296 tmp = get_property(np, "ioc-translation", NULL); 296 tmp = of_get_property(np, "ioc-translation", NULL);
297 if (tmp) { 297 if (tmp) {
298 *base = *tmp; 298 *base = *tmp;
299 of_node_put(np); 299 of_node_put(np);
@@ -430,7 +430,7 @@ cell_iommu_setup_window(struct cbe_iommu *iommu, struct device_node *np,
430 struct iommu_window *window; 430 struct iommu_window *window;
431 const unsigned int *ioid; 431 const unsigned int *ioid;
432 432
433 ioid = get_property(np, "ioid", NULL); 433 ioid = of_get_property(np, "ioid", NULL);
434 if (ioid == NULL) 434 if (ioid == NULL)
435 printk(KERN_WARNING "iommu: missing ioid for %s using 0\n", 435 printk(KERN_WARNING "iommu: missing ioid for %s using 0\n",
436 np->full_name); 436 np->full_name);
@@ -549,7 +549,7 @@ static int __init cell_iommu_get_window(struct device_node *np,
549 unsigned long index; 549 unsigned long index;
550 550
551 /* Use ibm,dma-window if available, else, hard code ! */ 551 /* Use ibm,dma-window if available, else, hard code ! */
552 dma_window = get_property(np, "ibm,dma-window", NULL); 552 dma_window = of_get_property(np, "ibm,dma-window", NULL);
553 if (dma_window == NULL) { 553 if (dma_window == NULL) {
554 *base = 0; 554 *base = 0;
555 *size = 0x80000000u; 555 *size = 0x80000000u;
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index 36989c2eee66..5c5fa34e59ee 100644
--- a/arch/powerpc/platforms/cell/setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -71,7 +71,7 @@ static void cell_show_cpuinfo(struct seq_file *m)
71 71
72 root = of_find_node_by_path("/"); 72 root = of_find_node_by_path("/");
73 if (root) 73 if (root)
74 model = get_property(root, "model", NULL); 74 model = of_get_property(root, "model", NULL);
75 seq_printf(m, "machine\t\t: CHRP %s\n", model); 75 seq_printf(m, "machine\t\t: CHRP %s\n", model);
76 of_node_put(root); 76 of_node_put(root);
77} 77}
diff --git a/arch/powerpc/platforms/cell/spider-pic.c b/arch/powerpc/platforms/cell/spider-pic.c
index 21a9ebd4978e..fb1f15797bbb 100644
--- a/arch/powerpc/platforms/cell/spider-pic.c
+++ b/arch/powerpc/platforms/cell/spider-pic.c
@@ -254,25 +254,25 @@ static unsigned int __init spider_find_cascade_and_node(struct spider_pic *pic)
254 } 254 }
255 255
256 /* Now do the horrible hacks */ 256 /* Now do the horrible hacks */
257 tmp = get_property(pic->of_node, "#interrupt-cells", NULL); 257 tmp = of_get_property(pic->of_node, "#interrupt-cells", NULL);
258 if (tmp == NULL) 258 if (tmp == NULL)
259 return NO_IRQ; 259 return NO_IRQ;
260 intsize = *tmp; 260 intsize = *tmp;
261 imap = get_property(pic->of_node, "interrupt-map", &imaplen); 261 imap = of_get_property(pic->of_node, "interrupt-map", &imaplen);
262 if (imap == NULL || imaplen < (intsize + 1)) 262 if (imap == NULL || imaplen < (intsize + 1))
263 return NO_IRQ; 263 return NO_IRQ;
264 iic = of_find_node_by_phandle(imap[intsize]); 264 iic = of_find_node_by_phandle(imap[intsize]);
265 if (iic == NULL) 265 if (iic == NULL)
266 return NO_IRQ; 266 return NO_IRQ;
267 imap += intsize + 1; 267 imap += intsize + 1;
268 tmp = get_property(iic, "#interrupt-cells", NULL); 268 tmp = of_get_property(iic, "#interrupt-cells", NULL);
269 if (tmp == NULL) 269 if (tmp == NULL)
270 return NO_IRQ; 270 return NO_IRQ;
271 intsize = *tmp; 271 intsize = *tmp;
272 /* Assume unit is last entry of interrupt specifier */ 272 /* Assume unit is last entry of interrupt specifier */
273 unit = imap[intsize - 1]; 273 unit = imap[intsize - 1];
274 /* Ok, we have a unit, now let's try to get the node */ 274 /* Ok, we have a unit, now let's try to get the node */
275 tmp = get_property(iic, "ibm,interrupt-server-ranges", NULL); 275 tmp = of_get_property(iic, "ibm,interrupt-server-ranges", NULL);
276 if (tmp == NULL) { 276 if (tmp == NULL) {
277 of_node_put(iic); 277 of_node_put(iic);
278 return NO_IRQ; 278 return NO_IRQ;
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c
index e34599f53d28..1d4562ae463d 100644
--- a/arch/powerpc/platforms/cell/spu_manage.c
+++ b/arch/powerpc/platforms/cell/spu_manage.c
@@ -48,11 +48,11 @@ static u64 __init find_spu_unit_number(struct device_node *spe)
48{ 48{
49 const unsigned int *prop; 49 const unsigned int *prop;
50 int proplen; 50 int proplen;
51 prop = get_property(spe, "unit-id", &proplen); 51 prop = of_get_property(spe, "unit-id", &proplen);
52 if (proplen == 4) 52 if (proplen == 4)
53 return (u64)*prop; 53 return (u64)*prop;
54 54
55 prop = get_property(spe, "reg", &proplen); 55 prop = of_get_property(spe, "reg", &proplen);
56 if (proplen == 4) 56 if (proplen == 4)
57 return (u64)*prop; 57 return (u64)*prop;
58 58
@@ -76,12 +76,12 @@ static int __init spu_map_interrupts_old(struct spu *spu,
76 int nid; 76 int nid;
77 77
78 /* Get the interrupt source unit from the device-tree */ 78 /* Get the interrupt source unit from the device-tree */
79 tmp = get_property(np, "isrc", NULL); 79 tmp = of_get_property(np, "isrc", NULL);
80 if (!tmp) 80 if (!tmp)
81 return -ENODEV; 81 return -ENODEV;
82 isrc = tmp[0]; 82 isrc = tmp[0];
83 83
84 tmp = get_property(np->parent->parent, "node-id", NULL); 84 tmp = of_get_property(np->parent->parent, "node-id", NULL);
85 if (!tmp) { 85 if (!tmp) {
86 printk(KERN_WARNING "%s: can't find node-id\n", __FUNCTION__); 86 printk(KERN_WARNING "%s: can't find node-id\n", __FUNCTION__);
87 nid = spu->node; 87 nid = spu->node;
@@ -110,7 +110,7 @@ static void __iomem * __init spu_map_prop_old(struct spu *spu,
110 } __attribute__((packed)) *prop; 110 } __attribute__((packed)) *prop;
111 int proplen; 111 int proplen;
112 112
113 prop = get_property(n, name, &proplen); 113 prop = of_get_property(n, name, &proplen);
114 if (prop == NULL || proplen != sizeof (struct address_prop)) 114 if (prop == NULL || proplen != sizeof (struct address_prop))
115 return NULL; 115 return NULL;
116 116
@@ -124,11 +124,11 @@ static int __init spu_map_device_old(struct spu *spu)
124 int ret; 124 int ret;
125 125
126 ret = -ENODEV; 126 ret = -ENODEV;
127 spu->name = get_property(node, "name", NULL); 127 spu->name = of_get_property(node, "name", NULL);
128 if (!spu->name) 128 if (!spu->name)
129 goto out; 129 goto out;
130 130
131 prop = get_property(node, "local-store", NULL); 131 prop = of_get_property(node, "local-store", NULL);
132 if (!prop) 132 if (!prop)
133 goto out; 133 goto out;
134 spu->local_store_phys = *(unsigned long *)prop; 134 spu->local_store_phys = *(unsigned long *)prop;
@@ -139,7 +139,7 @@ static int __init spu_map_device_old(struct spu *spu)
139 if (!spu->local_store) 139 if (!spu->local_store)
140 goto out; 140 goto out;
141 141
142 prop = get_property(node, "problem", NULL); 142 prop = of_get_property(node, "problem", NULL);
143 if (!prop) 143 if (!prop)
144 goto out_unmap; 144 goto out_unmap;
145 spu->problem_phys = *(unsigned long *)prop; 145 spu->problem_phys = *(unsigned long *)prop;
@@ -226,7 +226,7 @@ static int __init spu_map_device(struct spu *spu)
226 struct device_node *np = spu->devnode; 226 struct device_node *np = spu->devnode;
227 int ret = -ENODEV; 227 int ret = -ENODEV;
228 228
229 spu->name = get_property(np, "name", NULL); 229 spu->name = of_get_property(np, "name", NULL);
230 if (!spu->name) 230 if (!spu->name)
231 goto out; 231 goto out;
232 232
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index 8079983ef94f..e3f4ee97c913 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -571,7 +571,7 @@ spufs_init_isolated_loader(void)
571 if (!dn) 571 if (!dn)
572 return; 572 return;
573 573
574 loader = get_property(dn, "loader", &size); 574 loader = of_get_property(dn, "loader", &size);
575 if (!loader) 575 if (!loader)
576 return; 576 return;
577 577
diff --git a/arch/powerpc/platforms/celleb/iommu.c b/arch/powerpc/platforms/celleb/iommu.c
index e94de6a24622..755d869d8553 100644
--- a/arch/powerpc/platforms/celleb/iommu.c
+++ b/arch/powerpc/platforms/celleb/iommu.c
@@ -37,7 +37,7 @@ static int __init find_dma_window(u64 *io_space_id, u64 *ioid,
37 const unsigned long *dma_window; 37 const unsigned long *dma_window;
38 38
39 for_each_node_by_type(dn, "ioif") { 39 for_each_node_by_type(dn, "ioif") {
40 dma_window = get_property(dn, "toshiba,dma-window", NULL); 40 dma_window = of_get_property(dn, "toshiba,dma-window", NULL);
41 if (dma_window) { 41 if (dma_window) {
42 *io_space_id = (dma_window[0] >> 32) & 0xffffffffUL; 42 *io_space_id = (dma_window[0] >> 32) & 0xffffffffUL;
43 *ioid = dma_window[0] & 0x7ffUL; 43 *ioid = dma_window[0] & 0x7ffUL;
diff --git a/arch/powerpc/platforms/celleb/pci.c b/arch/powerpc/platforms/celleb/pci.c
index 98de836dfed3..d1adf34cd5e8 100644
--- a/arch/powerpc/platforms/celleb/pci.c
+++ b/arch/powerpc/platforms/celleb/pci.c
@@ -309,13 +309,13 @@ static int __devinit celleb_setup_fake_pci_device(struct device_node *node,
309 goto error; 309 goto error;
310 } 310 }
311 311
312 name = get_property(node, "model", &rlen); 312 name = of_get_property(node, "model", &rlen);
313 if (!name) { 313 if (!name) {
314 printk(KERN_ERR "PCI: model property not found.\n"); 314 printk(KERN_ERR "PCI: model property not found.\n");
315 goto error; 315 goto error;
316 } 316 }
317 317
318 wi4 = get_property(node, "reg", &rlen); 318 wi4 = of_get_property(node, "reg", &rlen);
319 if (wi4 == NULL) 319 if (wi4 == NULL)
320 goto error; 320 goto error;
321 321
@@ -352,10 +352,10 @@ static int __devinit celleb_setup_fake_pci_device(struct device_node *node,
352 } 352 }
353 pr_debug("PCI: res assigned 0x%016lx\n", (unsigned long)*res); 353 pr_debug("PCI: res assigned 0x%016lx\n", (unsigned long)*res);
354 354
355 wi0 = get_property(node, "device-id", NULL); 355 wi0 = of_get_property(node, "device-id", NULL);
356 wi1 = get_property(node, "vendor-id", NULL); 356 wi1 = of_get_property(node, "vendor-id", NULL);
357 wi2 = get_property(node, "class-code", NULL); 357 wi2 = of_get_property(node, "class-code", NULL);
358 wi3 = get_property(node, "revision-id", NULL); 358 wi3 = of_get_property(node, "revision-id", NULL);
359 359
360 celleb_config_write_fake(*config, PCI_DEVICE_ID, 2, wi0[0] & 0xffff); 360 celleb_config_write_fake(*config, PCI_DEVICE_ID, 2, wi0[0] & 0xffff);
361 celleb_config_write_fake(*config, PCI_VENDOR_ID, 2, wi1[0] & 0xffff); 361 celleb_config_write_fake(*config, PCI_VENDOR_ID, 2, wi1[0] & 0xffff);
@@ -376,7 +376,7 @@ static int __devinit celleb_setup_fake_pci_device(struct device_node *node,
376 376
377 celleb_setup_pci_base_addrs(hose, devno, fn, num_base_addr); 377 celleb_setup_pci_base_addrs(hose, devno, fn, num_base_addr);
378 378
379 li = get_property(node, "interrupts", &rlen); 379 li = of_get_property(node, "interrupts", &rlen);
380 val = li[0]; 380 val = li[0];
381 celleb_config_write_fake(*config, PCI_INTERRUPT_PIN, 1, 1); 381 celleb_config_write_fake(*config, PCI_INTERRUPT_PIN, 1, 1);
382 celleb_config_write_fake(*config, PCI_INTERRUPT_LINE, 1, val); 382 celleb_config_write_fake(*config, PCI_INTERRUPT_LINE, 1, val);
@@ -424,7 +424,7 @@ static int __devinit phb_set_bus_ranges(struct device_node *dev,
424 const int *bus_range; 424 const int *bus_range;
425 unsigned int len; 425 unsigned int len;
426 426
427 bus_range = get_property(dev, "bus-range", &len); 427 bus_range = of_get_property(dev, "bus-range", &len);
428 if (bus_range == NULL || len < 2 * sizeof(int)) 428 if (bus_range == NULL || len < 2 * sizeof(int))
429 return 1; 429 return 1;
430 430
@@ -451,7 +451,7 @@ int __devinit celleb_setup_phb(struct pci_controller *phb)
451 struct device_node *node; 451 struct device_node *node;
452 unsigned int rlen; 452 unsigned int rlen;
453 453
454 name = get_property(dev, "name", &rlen); 454 name = of_get_property(dev, "name", &rlen);
455 if (!name) 455 if (!name)
456 return 1; 456 return 1;
457 457
diff --git a/arch/powerpc/platforms/celleb/setup.c b/arch/powerpc/platforms/celleb/setup.c
index 5f4d0d933238..ab1db9dd1aa1 100644
--- a/arch/powerpc/platforms/celleb/setup.c
+++ b/arch/powerpc/platforms/celleb/setup.c
@@ -67,7 +67,7 @@ static void celleb_show_cpuinfo(struct seq_file *m)
67 67
68 root = of_find_node_by_path("/"); 68 root = of_find_node_by_path("/");
69 if (root) 69 if (root)
70 model = get_property(root, "model", NULL); 70 model = of_get_property(root, "model", NULL);
71 /* using "CHRP" is to trick anaconda into installing FCx into Celleb */ 71 /* using "CHRP" is to trick anaconda into installing FCx into Celleb */
72 seq_printf(m, "machine\t\t: %s %s\n", celleb_machine_type, model); 72 seq_printf(m, "machine\t\t: %s %s\n", celleb_machine_type, model);
73 of_node_put(root); 73 of_node_put(root);
diff --git a/arch/powerpc/platforms/chrp/nvram.c b/arch/powerpc/platforms/chrp/nvram.c
index 0dd4a64757d9..8efd4244701c 100644
--- a/arch/powerpc/platforms/chrp/nvram.c
+++ b/arch/powerpc/platforms/chrp/nvram.c
@@ -74,7 +74,7 @@ void __init chrp_nvram_init(void)
74 if (nvram == NULL) 74 if (nvram == NULL)
75 return; 75 return;
76 76
77 nbytes_p = get_property(nvram, "#bytes", &proplen); 77 nbytes_p = of_get_property(nvram, "#bytes", &proplen);
78 if (nbytes_p == NULL || proplen != sizeof(unsigned int)) 78 if (nbytes_p == NULL || proplen != sizeof(unsigned int))
79 return; 79 return;
80 80
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c
index e2f870800e58..b23e39796a0b 100644
--- a/arch/powerpc/platforms/chrp/pci.c
+++ b/arch/powerpc/platforms/chrp/pci.c
@@ -217,7 +217,7 @@ chrp_find_bridges(void)
217 * properties to adequately identify them, so we have to 217 * properties to adequately identify them, so we have to
218 * look at what sort of machine this is as well. 218 * look at what sort of machine this is as well.
219 */ 219 */
220 machine = get_property(root, "model", NULL); 220 machine = of_get_property(root, "model", NULL);
221 if (machine != NULL) { 221 if (machine != NULL) {
222 is_longtrail = strncmp(machine, "IBM,LongTrail", 13) == 0; 222 is_longtrail = strncmp(machine, "IBM,LongTrail", 13) == 0;
223 is_mot = strncmp(machine, "MOT", 3) == 0; 223 is_mot = strncmp(machine, "MOT", 3) == 0;
@@ -236,7 +236,7 @@ chrp_find_bridges(void)
236 dev->full_name); 236 dev->full_name);
237 continue; 237 continue;
238 } 238 }
239 bus_range = get_property(dev, "bus-range", &len); 239 bus_range = of_get_property(dev, "bus-range", &len);
240 if (bus_range == NULL || len < 2 * sizeof(int)) { 240 if (bus_range == NULL || len < 2 * sizeof(int)) {
241 printk(KERN_WARNING "Can't get bus-range for %s\n", 241 printk(KERN_WARNING "Can't get bus-range for %s\n",
242 dev->full_name); 242 dev->full_name);
@@ -262,7 +262,7 @@ chrp_find_bridges(void)
262 hose->first_busno = bus_range[0]; 262 hose->first_busno = bus_range[0];
263 hose->last_busno = bus_range[1]; 263 hose->last_busno = bus_range[1];
264 264
265 model = get_property(dev, "model", NULL); 265 model = of_get_property(dev, "model", NULL);
266 if (model == NULL) 266 if (model == NULL)
267 model = "<none>"; 267 model = "<none>";
268 if (device_is_compatible(dev, "IBM,python")) { 268 if (device_is_compatible(dev, "IBM,python")) {
@@ -284,7 +284,8 @@ chrp_find_bridges(void)
284 r.start + 0x000f8000, 284 r.start + 0x000f8000,
285 r.start + 0x000f8010); 285 r.start + 0x000f8010);
286 if (index == 0) { 286 if (index == 0) {
287 dma = get_property(dev, "system-dma-base",&len); 287 dma = of_get_property(dev, "system-dma-base",
288 &len);
288 if (dma && len >= sizeof(*dma)) { 289 if (dma && len >= sizeof(*dma)) {
289 dma = (unsigned int *) 290 dma = (unsigned int *)
290 (((unsigned long)dma) + 291 (((unsigned long)dma) +
@@ -302,7 +303,7 @@ chrp_find_bridges(void)
302 303
303 /* check the first bridge for a property that we can 304 /* check the first bridge for a property that we can
304 use to set pci_dram_offset */ 305 use to set pci_dram_offset */
305 dma = get_property(dev, "ibm,dma-ranges", &len); 306 dma = of_get_property(dev, "ibm,dma-ranges", &len);
306 if (index == 0 && dma != NULL && len >= 6 * sizeof(*dma)) { 307 if (index == 0 && dma != NULL && len >= 6 * sizeof(*dma)) {
307 pci_dram_offset = dma[2] - dma[3]; 308 pci_dram_offset = dma[2] - dma[3];
308 printk("pci_dram_offset = %lx\n", pci_dram_offset); 309 printk("pci_dram_offset = %lx\n", pci_dram_offset);
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
index 044ad3f1e04a..05d1bc0c8918 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -112,7 +112,7 @@ void chrp_show_cpuinfo(struct seq_file *m)
112 112
113 root = find_path_device("/"); 113 root = find_path_device("/");
114 if (root) 114 if (root)
115 model = get_property(root, "model", NULL); 115 model = of_get_property(root, "model", NULL);
116 seq_printf(m, "machine\t\t: CHRP %s\n", model); 116 seq_printf(m, "machine\t\t: CHRP %s\n", model);
117 117
118 /* longtrail (goldengate) stuff */ 118 /* longtrail (goldengate) stuff */
@@ -205,7 +205,8 @@ static void __init sio_init(void)
205 struct device_node *root; 205 struct device_node *root;
206 206
207 if ((root = find_path_device("/")) && 207 if ((root = find_path_device("/")) &&
208 !strncmp(get_property(root, "model", NULL), "IBM,LongTrail", 13)) { 208 !strncmp(of_get_property(root, "model", NULL),
209 "IBM,LongTrail", 13)) {
209 /* logical device 0 (KBC/Keyboard) */ 210 /* logical device 0 (KBC/Keyboard) */
210 sio_fixup_irq("keyboard", 0, 1, 2); 211 sio_fixup_irq("keyboard", 0, 1, 2);
211 /* select logical device 1 (KBC/Mouse) */ 212 /* select logical device 1 (KBC/Mouse) */
@@ -225,7 +226,7 @@ static void __init pegasos_set_l2cr(void)
225 /* Enable L2 cache if needed */ 226 /* Enable L2 cache if needed */
226 np = find_type_devices("cpu"); 227 np = find_type_devices("cpu");
227 if (np != NULL) { 228 if (np != NULL) {
228 const unsigned int *l2cr = get_property(np, "l2cr", NULL); 229 const unsigned int *l2cr = of_get_property(np, "l2cr", NULL);
229 if (l2cr == NULL) { 230 if (l2cr == NULL) {
230 printk ("Pegasos l2cr : no cpu l2cr property found\n"); 231 printk ("Pegasos l2cr : no cpu l2cr property found\n");
231 return; 232 return;
@@ -256,7 +257,7 @@ void __init chrp_setup_arch(void)
256 loops_per_jiffy = 50000000/HZ; 257 loops_per_jiffy = 50000000/HZ;
257 258
258 if (root) 259 if (root)
259 machine = get_property(root, "model", NULL); 260 machine = of_get_property(root, "model", NULL);
260 if (machine && strncmp(machine, "Pegasos", 7) == 0) { 261 if (machine && strncmp(machine, "Pegasos", 7) == 0) {
261 _chrp_type = _CHRP_Pegasos; 262 _chrp_type = _CHRP_Pegasos;
262 } else if (machine && strncmp(machine, "IBM", 3) == 0) { 263 } else if (machine && strncmp(machine, "IBM", 3) == 0) {
@@ -360,7 +361,7 @@ static void __init chrp_find_openpic(void)
360 return; 361 return;
361 root = of_find_node_by_path("/"); 362 root = of_find_node_by_path("/");
362 if (root) { 363 if (root) {
363 opprop = get_property(root, "platform-open-pic", &oplen); 364 opprop = of_get_property(root, "platform-open-pic", &oplen);
364 na = of_n_addr_cells(root); 365 na = of_n_addr_cells(root);
365 } 366 }
366 if (opprop && oplen >= na * sizeof(unsigned int)) { 367 if (opprop && oplen >= na * sizeof(unsigned int)) {
@@ -377,7 +378,7 @@ static void __init chrp_find_openpic(void)
377 378
378 printk(KERN_INFO "OpenPIC at %lx\n", opaddr); 379 printk(KERN_INFO "OpenPIC at %lx\n", opaddr);
379 380
380 iranges = get_property(np, "interrupt-ranges", &len); 381 iranges = of_get_property(np, "interrupt-ranges", &len);
381 if (iranges == NULL) 382 if (iranges == NULL)
382 len = 0; /* non-distributed mpic */ 383 len = 0; /* non-distributed mpic */
383 else 384 else
@@ -463,7 +464,7 @@ static void __init chrp_find_8259(void)
463 * from anyway 464 * from anyway
464 */ 465 */
465 for (np = find_devices("pci"); np != NULL; np = np->next) { 466 for (np = find_devices("pci"); np != NULL; np = np->next) {
466 const unsigned int *addrp = get_property(np, 467 const unsigned int *addrp = of_get_property(np,
467 "8259-interrupt-acknowledge", NULL); 468 "8259-interrupt-acknowledge", NULL);
468 469
469 if (addrp == NULL) 470 if (addrp == NULL)
@@ -543,7 +544,7 @@ chrp_init2(void)
543 */ 544 */
544 device = find_devices("rtas"); 545 device = find_devices("rtas");
545 if (device) 546 if (device)
546 p = get_property(device, "rtas-event-scan-rate", NULL); 547 p = of_get_property(device, "rtas-event-scan-rate", NULL);
547 if (p && *p) { 548 if (p && *p) {
548 /* 549 /*
549 * Arrange to call chrp_event_scan at least *p times 550 * Arrange to call chrp_event_scan at least *p times
diff --git a/arch/powerpc/platforms/embedded6xx/linkstation.c b/arch/powerpc/platforms/embedded6xx/linkstation.c
index 3f6c4114f908..b412f006a9c5 100644
--- a/arch/powerpc/platforms/embedded6xx/linkstation.c
+++ b/arch/powerpc/platforms/embedded6xx/linkstation.c
@@ -58,11 +58,11 @@ static int __init add_bridge(struct device_node *dev)
58{ 58{
59 int len; 59 int len;
60 struct pci_controller *hose; 60 struct pci_controller *hose;
61 int *bus_range; 61 const int *bus_range;
62 62
63 printk("Adding PCI host bridge %s\n", dev->full_name); 63 printk("Adding PCI host bridge %s\n", dev->full_name);
64 64
65 bus_range = (int *) get_property(dev, "bus-range", &len); 65 bus_range = of_get_property(dev, "bus-range", &len);
66 if (bus_range == NULL || len < 2 * sizeof(int)) 66 if (bus_range == NULL || len < 2 * sizeof(int))
67 printk(KERN_WARNING "Can't get bus-range for %s, assume" 67 printk(KERN_WARNING "Can't get bus-range for %s, assume"
68 " bus 0\n", dev->full_name); 68 " bus 0\n", dev->full_name);
@@ -106,7 +106,7 @@ static void __init linkstation_init_IRQ(void)
106{ 106{
107 struct mpic *mpic; 107 struct mpic *mpic;
108 struct device_node *dnp; 108 struct device_node *dnp;
109 void *prop; 109 const u32 *prop;
110 int size; 110 int size;
111 phys_addr_t paddr; 111 phys_addr_t paddr;
112 112
@@ -114,7 +114,7 @@ static void __init linkstation_init_IRQ(void)
114 if (dnp == NULL) 114 if (dnp == NULL)
115 return; 115 return;
116 116
117 prop = (struct device_node *)get_property(dnp, "reg", &size); 117 prop = of_get_property(dnp, "reg", &size);
118 paddr = (phys_addr_t)of_translate_address(dnp, prop); 118 paddr = (phys_addr_t)of_translate_address(dnp, prop);
119 119
120 mpic = mpic_alloc(dnp, paddr, MPIC_PRIMARY | MPIC_WANTS_RESET, 4, 32, " EPIC "); 120 mpic = mpic_alloc(dnp, paddr, MPIC_PRIMARY | MPIC_WANTS_RESET, 4, 32, " EPIC ");
diff --git a/arch/powerpc/platforms/embedded6xx/ls_uart.c b/arch/powerpc/platforms/embedded6xx/ls_uart.c
index 0e837762cc5b..d0bee9f19e4e 100644
--- a/arch/powerpc/platforms/embedded6xx/ls_uart.c
+++ b/arch/powerpc/platforms/embedded6xx/ls_uart.c
@@ -110,8 +110,8 @@ static int __init ls_uarts_init(void)
110 if (!avr) 110 if (!avr)
111 return -EINVAL; 111 return -EINVAL;
112 112
113 avr_clock = *(u32*)get_property(avr, "clock-frequency", &len); 113 avr_clock = *(u32*)of_get_property(avr, "clock-frequency", &len);
114 phys_addr = ((u32*)get_property(avr, "reg", &len))[0]; 114 phys_addr = ((u32*)of_get_property(avr, "reg", &len))[0];
115 115
116 if (!avr_clock || !phys_addr) 116 if (!avr_clock || !phys_addr)
117 return -EINVAL; 117 return -EINVAL;
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
index 604b47dd915c..c3f64ddb0be6 100644
--- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
+++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
@@ -81,7 +81,7 @@ static void __init mpc7448_hpc2_setup_arch(void)
81 if (cpu != 0) { 81 if (cpu != 0) {
82 const unsigned int *fp; 82 const unsigned int *fp;
83 83
84 fp = get_property(cpu, "clock-frequency", NULL); 84 fp = of_get_property(cpu, "clock-frequency", NULL);
85 if (fp != 0) 85 if (fp != 0)
86 loops_per_jiffy = *fp / HZ; 86 loops_per_jiffy = *fp / HZ;
87 else 87 else
@@ -132,7 +132,7 @@ static void __init mpc7448_hpc2_init_IRQ(void)
132 tsi_pic = of_find_node_by_type(NULL, "open-pic"); 132 tsi_pic = of_find_node_by_type(NULL, "open-pic");
133 if (tsi_pic) { 133 if (tsi_pic) {
134 unsigned int size; 134 unsigned int size;
135 const void *prop = get_property(tsi_pic, "reg", &size); 135 const void *prop = of_get_property(tsi_pic, "reg", &size);
136 mpic_paddr = of_translate_address(tsi_pic, prop); 136 mpic_paddr = of_translate_address(tsi_pic, prop);
137 } 137 }
138 138
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c
index 7df2902271d0..3b6a9666c2c0 100644
--- a/arch/powerpc/platforms/iseries/iommu.c
+++ b/arch/powerpc/platforms/iseries/iommu.c
@@ -171,7 +171,7 @@ void iommu_devnode_init_iSeries(struct pci_dev *pdev, struct device_node *dn)
171{ 171{
172 struct iommu_table *tbl; 172 struct iommu_table *tbl;
173 struct pci_dn *pdn = PCI_DN(dn); 173 struct pci_dn *pdn = PCI_DN(dn);
174 const u32 *lsn = get_property(dn, "linux,logical-slot-number", NULL); 174 const u32 *lsn = of_get_property(dn, "linux,logical-slot-number", NULL);
175 175
176 BUG_ON(lsn == NULL); 176 BUG_ON(lsn == NULL);
177 177
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c
index 404cf0696857..9c974227155e 100644
--- a/arch/powerpc/platforms/iseries/pci.c
+++ b/arch/powerpc/platforms/iseries/pci.c
@@ -176,7 +176,7 @@ void __init iSeries_pci_final_fixup(void)
176 struct pci_dn *pdn = PCI_DN(node); 176 struct pci_dn *pdn = PCI_DN(node);
177 const u32 *agent; 177 const u32 *agent;
178 178
179 agent = get_property(node, "linux,agent-id", NULL); 179 agent = of_get_property(node, "linux,agent-id", NULL);
180 if ((pdn != NULL) && (agent != NULL)) { 180 if ((pdn != NULL) && (agent != NULL)) {
181 u8 irq = iSeries_allocate_IRQ(pdn->busno, 0, 181 u8 irq = iSeries_allocate_IRQ(pdn->busno, 0,
182 pdn->bussubno); 182 pdn->bussubno);
@@ -754,7 +754,7 @@ void __init iSeries_pcibios_init(void)
754 if ((node->type == NULL) || (strcmp(node->type, "pci") != 0)) 754 if ((node->type == NULL) || (strcmp(node->type, "pci") != 0))
755 continue; 755 continue;
756 756
757 busp = get_property(node, "bus-range", NULL); 757 busp = of_get_property(node, "bus-range", NULL);
758 if (busp == NULL) 758 if (busp == NULL)
759 continue; 759 continue;
760 bus = *busp; 760 bus = *busp;
diff --git a/arch/powerpc/platforms/iseries/viopath.c b/arch/powerpc/platforms/iseries/viopath.c
index e2100ece9c65..2ca2d8a9de97 100644
--- a/arch/powerpc/platforms/iseries/viopath.c
+++ b/arch/powerpc/platforms/iseries/viopath.c
@@ -155,7 +155,7 @@ static int proc_viopath_show(struct seq_file *m, void *v)
155 node = of_find_node_by_path("/"); 155 node = of_find_node_by_path("/");
156 sysid = NULL; 156 sysid = NULL;
157 if (node != NULL) 157 if (node != NULL)
158 sysid = get_property(node, "system-id", NULL); 158 sysid = of_get_property(node, "system-id", NULL);
159 159
160 if (sysid == NULL) 160 if (sysid == NULL)
161 seq_printf(m, "SRLNBR=<UNKNOWN>\n"); 161 seq_printf(m, "SRLNBR=<UNKNOWN>\n");
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index ab5a6f12e1f0..b1d3b99c3f9d 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -44,11 +44,11 @@ static int __init fixup_one_level_bus_range(struct device_node *node, int higher
44 int len; 44 int len;
45 45
46 /* For PCI<->PCI bridges or CardBus bridges, we go down */ 46 /* For PCI<->PCI bridges or CardBus bridges, we go down */
47 class_code = get_property(node, "class-code", NULL); 47 class_code = of_get_property(node, "class-code", NULL);
48 if (!class_code || ((*class_code >> 8) != PCI_CLASS_BRIDGE_PCI && 48 if (!class_code || ((*class_code >> 8) != PCI_CLASS_BRIDGE_PCI &&
49 (*class_code >> 8) != PCI_CLASS_BRIDGE_CARDBUS)) 49 (*class_code >> 8) != PCI_CLASS_BRIDGE_CARDBUS))
50 continue; 50 continue;
51 bus_range = get_property(node, "bus-range", &len); 51 bus_range = of_get_property(node, "bus-range", &len);
52 if (bus_range != NULL && len > 2 * sizeof(int)) { 52 if (bus_range != NULL && len > 2 * sizeof(int)) {
53 if (bus_range[1] > higher) 53 if (bus_range[1] > higher)
54 higher = bus_range[1]; 54 higher = bus_range[1];
@@ -454,7 +454,7 @@ static int __init add_bridge(struct device_node *dev)
454 454
455 DBG("Adding PCI host bridge %s\n", dev->full_name); 455 DBG("Adding PCI host bridge %s\n", dev->full_name);
456 456
457 bus_range = get_property(dev, "bus-range", &len); 457 bus_range = of_get_property(dev, "bus-range", &len);
458 if (bus_range == NULL || len < 2 * sizeof(int)) { 458 if (bus_range == NULL || len < 2 * sizeof(int)) {
459 printk(KERN_WARNING "Can't get bus-range for %s, assume bus 0\n", 459 printk(KERN_WARNING "Can't get bus-range for %s, assume bus 0\n",
460 dev->full_name); 460 dev->full_name);
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c
index f21add0e4786..120cd048e0cc 100644
--- a/arch/powerpc/platforms/maple/setup.c
+++ b/arch/powerpc/platforms/maple/setup.c
@@ -113,8 +113,8 @@ static void maple_restart(char *cmd)
113 printk(KERN_EMERG "Maple: Unable to find Service Processor\n"); 113 printk(KERN_EMERG "Maple: Unable to find Service Processor\n");
114 goto fail; 114 goto fail;
115 } 115 }
116 maple_nvram_offset = get_property(sp, "restart-addr", NULL); 116 maple_nvram_offset = of_get_property(sp, "restart-addr", NULL);
117 maple_nvram_command = get_property(sp, "restart-value", NULL); 117 maple_nvram_command = of_get_property(sp, "restart-value", NULL);
118 of_node_put(sp); 118 of_node_put(sp);
119 119
120 /* send command */ 120 /* send command */
@@ -140,8 +140,8 @@ static void maple_power_off(void)
140 printk(KERN_EMERG "Maple: Unable to find Service Processor\n"); 140 printk(KERN_EMERG "Maple: Unable to find Service Processor\n");
141 goto fail; 141 goto fail;
142 } 142 }
143 maple_nvram_offset = get_property(sp, "power-off-addr", NULL); 143 maple_nvram_offset = of_get_property(sp, "power-off-addr", NULL);
144 maple_nvram_command = get_property(sp, "power-off-value", NULL); 144 maple_nvram_command = of_get_property(sp, "power-off-value", NULL);
145 of_node_put(sp); 145 of_node_put(sp);
146 146
147 /* send command */ 147 /* send command */
@@ -249,7 +249,7 @@ static void __init maple_init_IRQ(void)
249 /* Find address list in /platform-open-pic */ 249 /* Find address list in /platform-open-pic */
250 root = of_find_node_by_path("/"); 250 root = of_find_node_by_path("/");
251 naddr = of_n_addr_cells(root); 251 naddr = of_n_addr_cells(root);
252 opprop = get_property(root, "platform-open-pic", &opplen); 252 opprop = of_get_property(root, "platform-open-pic", &opplen);
253 if (opprop != 0) { 253 if (opprop != 0) {
254 openpic_addr = of_read_number(opprop, naddr); 254 openpic_addr = of_read_number(opprop, naddr);
255 has_isus = (opplen > naddr); 255 has_isus = (opplen > naddr);
@@ -260,7 +260,7 @@ static void __init maple_init_IRQ(void)
260 BUG_ON(openpic_addr == 0); 260 BUG_ON(openpic_addr == 0);
261 261
262 /* Check for a big endian MPIC */ 262 /* Check for a big endian MPIC */
263 if (get_property(np, "big-endian", NULL) != NULL) 263 if (of_get_property(np, "big-endian", NULL) != NULL)
264 flags |= MPIC_BIG_ENDIAN; 264 flags |= MPIC_BIG_ENDIAN;
265 265
266 /* XXX Maple specific bits */ 266 /* XXX Maple specific bits */
diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c
index 07819cd3ac44..95fa6a7d15ee 100644
--- a/arch/powerpc/platforms/pasemi/iommu.c
+++ b/arch/powerpc/platforms/pasemi/iommu.c
@@ -249,7 +249,7 @@ void iommu_init_early_pasemi(void)
249 iommu_off = 1; 249 iommu_off = 1;
250#else 250#else
251 iommu_off = of_chosen && 251 iommu_off = of_chosen &&
252 get_property(of_chosen, "linux,iommu-off", NULL); 252 of_get_property(of_chosen, "linux,iommu-off", NULL);
253#endif 253#endif
254 if (iommu_off) { 254 if (iommu_off) {
255 /* Direct I/O, IOMMU off */ 255 /* Direct I/O, IOMMU off */
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index d4fd61328c8b..32a614cacf24 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -137,7 +137,7 @@ static __init void pas_init_IRQ(void)
137 /* Find address list in /platform-open-pic */ 137 /* Find address list in /platform-open-pic */
138 root = of_find_node_by_path("/"); 138 root = of_find_node_by_path("/");
139 naddr = of_n_addr_cells(root); 139 naddr = of_n_addr_cells(root);
140 opprop = get_property(root, "platform-open-pic", &opplen); 140 opprop = of_get_property(root, "platform-open-pic", &opplen);
141 if (!opprop) { 141 if (!opprop) {
142 printk(KERN_ERR "No platform-open-pic property.\n"); 142 printk(KERN_ERR "No platform-open-pic property.\n");
143 of_node_put(root); 143 of_node_put(root);
diff --git a/arch/powerpc/platforms/powermac/backlight.c b/arch/powerpc/platforms/powermac/backlight.c
index de7440e62cc4..0dc8a45c408a 100644
--- a/arch/powerpc/platforms/powermac/backlight.c
+++ b/arch/powerpc/platforms/powermac/backlight.c
@@ -59,7 +59,7 @@ int pmac_has_backlight_type(const char *type)
59 struct device_node* bk_node = find_devices("backlight"); 59 struct device_node* bk_node = find_devices("backlight");
60 60
61 if (bk_node) { 61 if (bk_node) {
62 const char *prop = get_property(bk_node, 62 const char *prop = of_get_property(bk_node,
63 "backlight-control", NULL); 63 "backlight-control", NULL);
64 if (prop && strncmp(prop, type, strlen(type)) == 0) 64 if (prop && strncmp(prop, type, strlen(type)) == 0)
65 return 1; 65 return 1;
diff --git a/arch/powerpc/platforms/powermac/cpufreq_32.c b/arch/powerpc/platforms/powermac/cpufreq_32.c
index c2b6b4134f68..76eda9fcd1aa 100644
--- a/arch/powerpc/platforms/powermac/cpufreq_32.c
+++ b/arch/powerpc/platforms/powermac/cpufreq_32.c
@@ -421,7 +421,7 @@ static int pmac_cpufreq_cpu_init(struct cpufreq_policy *policy)
421 421
422static u32 read_gpio(struct device_node *np) 422static u32 read_gpio(struct device_node *np)
423{ 423{
424 const u32 *reg = get_property(np, "reg", NULL); 424 const u32 *reg = of_get_property(np, "reg", NULL);
425 u32 offset; 425 u32 offset;
426 426
427 if (reg == NULL) 427 if (reg == NULL)
@@ -521,13 +521,14 @@ static int pmac_cpufreq_init_MacRISC3(struct device_node *cpunode)
521 int lenp, rc; 521 int lenp, rc;
522 const u32 *freqs, *ratio; 522 const u32 *freqs, *ratio;
523 523
524 freqs = get_property(cpunode, "bus-frequencies", &lenp); 524 freqs = of_get_property(cpunode, "bus-frequencies", &lenp);
525 lenp /= sizeof(u32); 525 lenp /= sizeof(u32);
526 if (freqs == NULL || lenp != 2) { 526 if (freqs == NULL || lenp != 2) {
527 printk(KERN_ERR "cpufreq: bus-frequencies incorrect or missing\n"); 527 printk(KERN_ERR "cpufreq: bus-frequencies incorrect or missing\n");
528 return 1; 528 return 1;
529 } 529 }
530 ratio = get_property(cpunode, "processor-to-bus-ratio*2", NULL); 530 ratio = of_get_property(cpunode, "processor-to-bus-ratio*2",
531 NULL);
531 if (ratio == NULL) { 532 if (ratio == NULL) {
532 printk(KERN_ERR "cpufreq: processor-to-bus-ratio*2 missing\n"); 533 printk(KERN_ERR "cpufreq: processor-to-bus-ratio*2 missing\n");
533 return 1; 534 return 1;
@@ -562,7 +563,7 @@ static int pmac_cpufreq_init_MacRISC3(struct device_node *cpunode)
562 /* If we use the PMU, look for the min & max frequencies in the 563 /* If we use the PMU, look for the min & max frequencies in the
563 * device-tree 564 * device-tree
564 */ 565 */
565 value = get_property(cpunode, "min-clock-frequency", NULL); 566 value = of_get_property(cpunode, "min-clock-frequency", NULL);
566 if (!value) 567 if (!value)
567 return 1; 568 return 1;
568 low_freq = (*value) / 1000; 569 low_freq = (*value) / 1000;
@@ -571,7 +572,7 @@ static int pmac_cpufreq_init_MacRISC3(struct device_node *cpunode)
571 if (low_freq < 100000) 572 if (low_freq < 100000)
572 low_freq *= 10; 573 low_freq *= 10;
573 574
574 value = get_property(cpunode, "max-clock-frequency", NULL); 575 value = of_get_property(cpunode, "max-clock-frequency", NULL);
575 if (!value) 576 if (!value)
576 return 1; 577 return 1;
577 hi_freq = (*value) / 1000; 578 hi_freq = (*value) / 1000;
@@ -585,7 +586,7 @@ static int pmac_cpufreq_init_7447A(struct device_node *cpunode)
585{ 586{
586 struct device_node *volt_gpio_np; 587 struct device_node *volt_gpio_np;
587 588
588 if (get_property(cpunode, "dynamic-power-step", NULL) == NULL) 589 if (of_get_property(cpunode, "dynamic-power-step", NULL) == NULL)
589 return 1; 590 return 1;
590 591
591 volt_gpio_np = of_find_node_by_name(NULL, "cpu-vcore-select"); 592 volt_gpio_np = of_find_node_by_name(NULL, "cpu-vcore-select");
@@ -614,11 +615,11 @@ static int pmac_cpufreq_init_750FX(struct device_node *cpunode)
614 u32 pvr; 615 u32 pvr;
615 const u32 *value; 616 const u32 *value;
616 617
617 if (get_property(cpunode, "dynamic-power-step", NULL) == NULL) 618 if (of_get_property(cpunode, "dynamic-power-step", NULL) == NULL)
618 return 1; 619 return 1;
619 620
620 hi_freq = cur_freq; 621 hi_freq = cur_freq;
621 value = get_property(cpunode, "reduced-clock-frequency", NULL); 622 value = of_get_property(cpunode, "reduced-clock-frequency", NULL);
622 if (!value) 623 if (!value)
623 return 1; 624 return 1;
624 low_freq = (*value) / 1000; 625 low_freq = (*value) / 1000;
@@ -662,14 +663,14 @@ static int __init pmac_cpufreq_setup(void)
662 goto out; 663 goto out;
663 664
664 /* Get current cpu clock freq */ 665 /* Get current cpu clock freq */
665 value = get_property(cpunode, "clock-frequency", NULL); 666 value = of_get_property(cpunode, "clock-frequency", NULL);
666 if (!value) 667 if (!value)
667 goto out; 668 goto out;
668 cur_freq = (*value) / 1000; 669 cur_freq = (*value) / 1000;
669 670
670 /* Check for 7447A based MacRISC3 */ 671 /* Check for 7447A based MacRISC3 */
671 if (machine_is_compatible("MacRISC3") && 672 if (machine_is_compatible("MacRISC3") &&
672 get_property(cpunode, "dynamic-power-step", NULL) && 673 of_get_property(cpunode, "dynamic-power-step", NULL) &&
673 PVR_VER(mfspr(SPRN_PVR)) == 0x8003) { 674 PVR_VER(mfspr(SPRN_PVR)) == 0x8003) {
674 pmac_cpufreq_init_7447A(cpunode); 675 pmac_cpufreq_init_7447A(cpunode);
675 /* Check for other MacRISC3 machines */ 676 /* Check for other MacRISC3 machines */
diff --git a/arch/powerpc/platforms/powermac/cpufreq_64.c b/arch/powerpc/platforms/powermac/cpufreq_64.c
index 9d22361a26d6..567d5523b690 100644
--- a/arch/powerpc/platforms/powermac/cpufreq_64.c
+++ b/arch/powerpc/platforms/powermac/cpufreq_64.c
@@ -410,7 +410,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpus)
410 /* Get first CPU node */ 410 /* Get first CPU node */
411 for (cpunode = NULL; 411 for (cpunode = NULL;
412 (cpunode = of_get_next_child(cpus, cpunode)) != NULL;) { 412 (cpunode = of_get_next_child(cpus, cpunode)) != NULL;) {
413 const u32 *reg = get_property(cpunode, "reg", NULL); 413 const u32 *reg = of_get_property(cpunode, "reg", NULL);
414 if (reg == NULL || (*reg) != 0) 414 if (reg == NULL || (*reg) != 0)
415 continue; 415 continue;
416 if (!strcmp(cpunode->type, "cpu")) 416 if (!strcmp(cpunode->type, "cpu"))
@@ -422,7 +422,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpus)
422 } 422 }
423 423
424 /* Check 970FX for now */ 424 /* Check 970FX for now */
425 valp = get_property(cpunode, "cpu-version", NULL); 425 valp = of_get_property(cpunode, "cpu-version", NULL);
426 if (!valp) { 426 if (!valp) {
427 DBG("No cpu-version property !\n"); 427 DBG("No cpu-version property !\n");
428 goto bail_noprops; 428 goto bail_noprops;
@@ -434,7 +434,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpus)
434 } 434 }
435 435
436 /* Look for the powertune data in the device-tree */ 436 /* Look for the powertune data in the device-tree */
437 g5_pmode_data = get_property(cpunode, "power-mode-data",&psize); 437 g5_pmode_data = of_get_property(cpunode, "power-mode-data",&psize);
438 if (!g5_pmode_data) { 438 if (!g5_pmode_data) {
439 DBG("No power-mode-data !\n"); 439 DBG("No power-mode-data !\n");
440 goto bail_noprops; 440 goto bail_noprops;
@@ -493,7 +493,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpus)
493 * half freq in this version. So far, I haven't yet seen a machine 493 * half freq in this version. So far, I haven't yet seen a machine
494 * supporting anything else. 494 * supporting anything else.
495 */ 495 */
496 valp = get_property(cpunode, "clock-frequency", NULL); 496 valp = of_get_property(cpunode, "clock-frequency", NULL);
497 if (!valp) 497 if (!valp)
498 return -ENODEV; 498 return -ENODEV;
499 max_freq = (*valp)/1000; 499 max_freq = (*valp)/1000;
@@ -563,7 +563,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpus)
563 /* Lookup the cpuid eeprom node */ 563 /* Lookup the cpuid eeprom node */
564 cpuid = of_find_node_by_path("/u3@0,f8000000/i2c@f8001000/cpuid@a0"); 564 cpuid = of_find_node_by_path("/u3@0,f8000000/i2c@f8001000/cpuid@a0");
565 if (cpuid != NULL) 565 if (cpuid != NULL)
566 eeprom = get_property(cpuid, "cpuid", NULL); 566 eeprom = of_get_property(cpuid, "cpuid", NULL);
567 if (eeprom == NULL) { 567 if (eeprom == NULL) {
568 printk(KERN_ERR "cpufreq: Can't find cpuid EEPROM !\n"); 568 printk(KERN_ERR "cpufreq: Can't find cpuid EEPROM !\n");
569 rc = -ENODEV; 569 rc = -ENODEV;
@@ -573,13 +573,13 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpus)
573 /* Lookup the i2c hwclock */ 573 /* Lookup the i2c hwclock */
574 for (hwclock = NULL; 574 for (hwclock = NULL;
575 (hwclock = of_find_node_by_name(hwclock, "i2c-hwclock")) != NULL;){ 575 (hwclock = of_find_node_by_name(hwclock, "i2c-hwclock")) != NULL;){
576 const char *loc = get_property(hwclock, 576 const char *loc = of_get_property(hwclock,
577 "hwctrl-location", NULL); 577 "hwctrl-location", NULL);
578 if (loc == NULL) 578 if (loc == NULL)
579 continue; 579 continue;
580 if (strcmp(loc, "CPU CLOCK")) 580 if (strcmp(loc, "CPU CLOCK"))
581 continue; 581 continue;
582 if (!get_property(hwclock, "platform-get-frequency", NULL)) 582 if (!of_get_property(hwclock, "platform-get-frequency", NULL))
583 continue; 583 continue;
584 break; 584 break;
585 } 585 }
@@ -638,7 +638,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpus)
638 */ 638 */
639 639
640 /* Get max frequency from device-tree */ 640 /* Get max frequency from device-tree */
641 valp = get_property(cpunode, "clock-frequency", NULL); 641 valp = of_get_property(cpunode, "clock-frequency", NULL);
642 if (!valp) { 642 if (!valp) {
643 printk(KERN_ERR "cpufreq: Can't find CPU frequency !\n"); 643 printk(KERN_ERR "cpufreq: Can't find CPU frequency !\n");
644 rc = -ENODEV; 644 rc = -ENODEV;
diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c
index 24cc50c1774a..103fcc4c5605 100644
--- a/arch/powerpc/platforms/powermac/feature.c
+++ b/arch/powerpc/platforms/powermac/feature.c
@@ -1057,8 +1057,8 @@ core99_reset_cpu(struct device_node *node, long param, long value)
1057 if (np == NULL) 1057 if (np == NULL)
1058 return -ENODEV; 1058 return -ENODEV;
1059 for (np = np->child; np != NULL; np = np->sibling) { 1059 for (np = np->child; np != NULL; np = np->sibling) {
1060 const u32 *num = get_property(np, "reg", NULL); 1060 const u32 *num = of_get_property(np, "reg", NULL);
1061 const u32 *rst = get_property(np, "soft-reset", NULL); 1061 const u32 *rst = of_get_property(np, "soft-reset", NULL);
1062 if (num == NULL || rst == NULL) 1062 if (num == NULL || rst == NULL)
1063 continue; 1063 continue;
1064 if (param == *num) { 1064 if (param == *num) {
@@ -1095,7 +1095,7 @@ core99_usb_enable(struct device_node *node, long param, long value)
1095 macio->type != macio_intrepid) 1095 macio->type != macio_intrepid)
1096 return -ENODEV; 1096 return -ENODEV;
1097 1097
1098 prop = get_property(node, "AAPL,clock-id", NULL); 1098 prop = of_get_property(node, "AAPL,clock-id", NULL);
1099 if (!prop) 1099 if (!prop)
1100 return -ENODEV; 1100 return -ENODEV;
1101 if (strncmp(prop, "usb0u048", 8) == 0) 1101 if (strncmp(prop, "usb0u048", 8) == 0)
@@ -1506,8 +1506,8 @@ static long g5_reset_cpu(struct device_node *node, long param, long value)
1506 if (np == NULL) 1506 if (np == NULL)
1507 return -ENODEV; 1507 return -ENODEV;
1508 for (np = np->child; np != NULL; np = np->sibling) { 1508 for (np = np->child; np != NULL; np = np->sibling) {
1509 const u32 *num = get_property(np, "reg", NULL); 1509 const u32 *num = of_get_property(np, "reg", NULL);
1510 const u32 *rst = get_property(np, "soft-reset", NULL); 1510 const u32 *rst = of_get_property(np, "soft-reset", NULL);
1511 if (num == NULL || rst == NULL) 1511 if (num == NULL || rst == NULL)
1512 continue; 1512 continue;
1513 if (param == *num) { 1513 if (param == *num) {
@@ -2411,7 +2411,7 @@ static int __init probe_motherboard(void)
2411 */ 2411 */
2412 dt = find_devices("device-tree"); 2412 dt = find_devices("device-tree");
2413 if (dt != NULL) 2413 if (dt != NULL)
2414 model = get_property(dt, "model", NULL); 2414 model = of_get_property(dt, "model", NULL);
2415 for(i=0; model && i<(sizeof(pmac_mb_defs)/sizeof(struct pmac_mb_def)); i++) { 2415 for(i=0; model && i<(sizeof(pmac_mb_defs)/sizeof(struct pmac_mb_def)); i++) {
2416 if (strcmp(model, pmac_mb_defs[i].model_string) == 0) { 2416 if (strcmp(model, pmac_mb_defs[i].model_string) == 0) {
2417 pmac_mb = pmac_mb_defs[i]; 2417 pmac_mb = pmac_mb_defs[i];
@@ -2509,7 +2509,7 @@ found:
2509 if (np->sibling) 2509 if (np->sibling)
2510 break; 2510 break;
2511 /* Nap mode not supported if flush-on-lock property is present */ 2511 /* Nap mode not supported if flush-on-lock property is present */
2512 if (get_property(np, "flush-on-lock", NULL)) 2512 if (of_get_property(np, "flush-on-lock", NULL))
2513 break; 2513 break;
2514 powersave_nap = 1; 2514 powersave_nap = 1;
2515 printk(KERN_DEBUG "Processor NAP mode on idle enabled.\n"); 2515 printk(KERN_DEBUG "Processor NAP mode on idle enabled.\n");
@@ -2558,7 +2558,7 @@ static void __init probe_uninorth(void)
2558 if (uninorth_node == NULL) 2558 if (uninorth_node == NULL)
2559 return; 2559 return;
2560 2560
2561 addrp = get_property(uninorth_node, "reg", NULL); 2561 addrp = of_get_property(uninorth_node, "reg", NULL);
2562 if (addrp == NULL) 2562 if (addrp == NULL)
2563 return; 2563 return;
2564 address = of_translate_address(uninorth_node, addrp); 2564 address = of_translate_address(uninorth_node, addrp);
@@ -2642,7 +2642,7 @@ static void __init probe_one_macio(const char *name, const char *compat, int typ
2642 return; 2642 return;
2643 } 2643 }
2644 if (type == macio_keylargo || type == macio_keylargo2) { 2644 if (type == macio_keylargo || type == macio_keylargo2) {
2645 const u32 *did = get_property(node, "device-id", NULL); 2645 const u32 *did = of_get_property(node, "device-id", NULL);
2646 if (*did == 0x00000025) 2646 if (*did == 0x00000025)
2647 type = macio_pangea; 2647 type = macio_pangea;
2648 if (*did == 0x0000003e) 2648 if (*did == 0x0000003e)
@@ -2655,7 +2655,7 @@ static void __init probe_one_macio(const char *name, const char *compat, int typ
2655 macio_chips[i].base = base; 2655 macio_chips[i].base = base;
2656 macio_chips[i].flags = MACIO_FLAG_SCCB_ON | MACIO_FLAG_SCCB_ON; 2656 macio_chips[i].flags = MACIO_FLAG_SCCB_ON | MACIO_FLAG_SCCB_ON;
2657 macio_chips[i].name = macio_names[type]; 2657 macio_chips[i].name = macio_names[type];
2658 revp = get_property(node, "revision-id", NULL); 2658 revp = of_get_property(node, "revision-id", NULL);
2659 if (revp) 2659 if (revp)
2660 macio_chips[i].rev = *revp; 2660 macio_chips[i].rev = *revp;
2661 printk(KERN_INFO "Found a %s mac-io controller, rev: %d, mapped at 0x%p\n", 2661 printk(KERN_INFO "Found a %s mac-io controller, rev: %d, mapped at 0x%p\n",
@@ -2706,8 +2706,8 @@ initial_serial_shutdown(struct device_node *np)
2706 int port_type = PMAC_SCC_ASYNC; 2706 int port_type = PMAC_SCC_ASYNC;
2707 int modem = 0; 2707 int modem = 0;
2708 2708
2709 slots = get_property(np, "slot-names", &len); 2709 slots = of_get_property(np, "slot-names", &len);
2710 conn = get_property(np, "AAPL,connector", &len); 2710 conn = of_get_property(np, "AAPL,connector", &len);
2711 if (conn && (strcmp(conn, "infrared") == 0)) 2711 if (conn && (strcmp(conn, "infrared") == 0))
2712 port_type = PMAC_SCC_IRDA; 2712 port_type = PMAC_SCC_IRDA;
2713 else if (device_is_compatible(np, "cobalt")) 2713 else if (device_is_compatible(np, "cobalt"))
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c
index bfc4829162f1..5430e146b3e9 100644
--- a/arch/powerpc/platforms/powermac/low_i2c.c
+++ b/arch/powerpc/platforms/powermac/low_i2c.c
@@ -491,7 +491,7 @@ static struct pmac_i2c_host_kw *__init kw_i2c_host_init(struct device_node *np)
491 * on all i2c keywest nodes so far ... we would have to fallback 491 * on all i2c keywest nodes so far ... we would have to fallback
492 * to macio parsing if that wasn't the case 492 * to macio parsing if that wasn't the case
493 */ 493 */
494 addrp = get_property(np, "AAPL,address", NULL); 494 addrp = of_get_property(np, "AAPL,address", NULL);
495 if (addrp == NULL) { 495 if (addrp == NULL) {
496 printk(KERN_ERR "low_i2c: Can't find address for %s\n", 496 printk(KERN_ERR "low_i2c: Can't find address for %s\n",
497 np->full_name); 497 np->full_name);
@@ -505,13 +505,13 @@ static struct pmac_i2c_host_kw *__init kw_i2c_host_init(struct device_node *np)
505 host->timeout_timer.function = kw_i2c_timeout; 505 host->timeout_timer.function = kw_i2c_timeout;
506 host->timeout_timer.data = (unsigned long)host; 506 host->timeout_timer.data = (unsigned long)host;
507 507
508 psteps = get_property(np, "AAPL,address-step", NULL); 508 psteps = of_get_property(np, "AAPL,address-step", NULL);
509 steps = psteps ? (*psteps) : 0x10; 509 steps = psteps ? (*psteps) : 0x10;
510 for (host->bsteps = 0; (steps & 0x01) == 0; host->bsteps++) 510 for (host->bsteps = 0; (steps & 0x01) == 0; host->bsteps++)
511 steps >>= 1; 511 steps >>= 1;
512 /* Select interface rate */ 512 /* Select interface rate */
513 host->speed = KW_I2C_MODE_25KHZ; 513 host->speed = KW_I2C_MODE_25KHZ;
514 prate = get_property(np, "AAPL,i2c-rate", NULL); 514 prate = of_get_property(np, "AAPL,i2c-rate", NULL);
515 if (prate) switch(*prate) { 515 if (prate) switch(*prate) {
516 case 100: 516 case 100:
517 host->speed = KW_I2C_MODE_100KHZ; 517 host->speed = KW_I2C_MODE_100KHZ;
@@ -619,7 +619,7 @@ static void __init kw_i2c_probe(void)
619 } else { 619 } else {
620 for (child = NULL; 620 for (child = NULL;
621 (child = of_get_next_child(np, child)) != NULL;) { 621 (child = of_get_next_child(np, child)) != NULL;) {
622 const u32 *reg = get_property(child, 622 const u32 *reg = of_get_property(child,
623 "reg", NULL); 623 "reg", NULL);
624 if (reg == NULL) 624 if (reg == NULL)
625 continue; 625 continue;
@@ -905,7 +905,7 @@ static void __init smu_i2c_probe(void)
905 if (strcmp(busnode->type, "i2c") && 905 if (strcmp(busnode->type, "i2c") &&
906 strcmp(busnode->type, "i2c-bus")) 906 strcmp(busnode->type, "i2c-bus"))
907 continue; 907 continue;
908 reg = get_property(busnode, "reg", NULL); 908 reg = of_get_property(busnode, "reg", NULL);
909 if (reg == NULL) 909 if (reg == NULL)
910 continue; 910 continue;
911 911
@@ -950,7 +950,8 @@ struct pmac_i2c_bus *pmac_i2c_find_bus(struct device_node *node)
950 if (p == bus->busnode) { 950 if (p == bus->busnode) {
951 if (prev && bus->flags & pmac_i2c_multibus) { 951 if (prev && bus->flags & pmac_i2c_multibus) {
952 const u32 *reg; 952 const u32 *reg;
953 reg = get_property(prev, "reg", NULL); 953 reg = of_get_property(prev, "reg",
954 NULL);
954 if (!reg) 955 if (!reg)
955 continue; 956 continue;
956 if (((*reg) >> 8) != bus->channel) 957 if (((*reg) >> 8) != bus->channel)
@@ -971,7 +972,7 @@ EXPORT_SYMBOL_GPL(pmac_i2c_find_bus);
971 972
972u8 pmac_i2c_get_dev_addr(struct device_node *device) 973u8 pmac_i2c_get_dev_addr(struct device_node *device)
973{ 974{
974 const u32 *reg = get_property(device, "reg", NULL); 975 const u32 *reg = of_get_property(device, "reg", NULL);
975 976
976 if (reg == NULL) 977 if (reg == NULL)
977 return 0; 978 return 0;
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c
index 431a685a15dd..092cef4160a1 100644
--- a/arch/powerpc/platforms/powermac/pci.c
+++ b/arch/powerpc/platforms/powermac/pci.c
@@ -70,11 +70,11 @@ static int __init fixup_one_level_bus_range(struct device_node *node, int higher
70 int len; 70 int len;
71 71
72 /* For PCI<->PCI bridges or CardBus bridges, we go down */ 72 /* For PCI<->PCI bridges or CardBus bridges, we go down */
73 class_code = get_property(node, "class-code", NULL); 73 class_code = of_get_property(node, "class-code", NULL);
74 if (!class_code || ((*class_code >> 8) != PCI_CLASS_BRIDGE_PCI && 74 if (!class_code || ((*class_code >> 8) != PCI_CLASS_BRIDGE_PCI &&
75 (*class_code >> 8) != PCI_CLASS_BRIDGE_CARDBUS)) 75 (*class_code >> 8) != PCI_CLASS_BRIDGE_CARDBUS))
76 continue; 76 continue;
77 bus_range = get_property(node, "bus-range", &len); 77 bus_range = of_get_property(node, "bus-range", &len);
78 if (bus_range != NULL && len > 2 * sizeof(int)) { 78 if (bus_range != NULL && len > 2 * sizeof(int)) {
79 if (bus_range[1] > higher) 79 if (bus_range[1] > higher)
80 higher = bus_range[1]; 80 higher = bus_range[1];
@@ -246,8 +246,8 @@ static int chaos_validate_dev(struct pci_bus *bus, int devfn, int offset)
246 if (np == NULL) 246 if (np == NULL)
247 return PCIBIOS_DEVICE_NOT_FOUND; 247 return PCIBIOS_DEVICE_NOT_FOUND;
248 248
249 vendor = get_property(np, "vendor-id", NULL); 249 vendor = of_get_property(np, "vendor-id", NULL);
250 device = get_property(np, "device-id", NULL); 250 device = of_get_property(np, "device-id", NULL);
251 if (vendor == NULL || device == NULL) 251 if (vendor == NULL || device == NULL)
252 return PCIBIOS_DEVICE_NOT_FOUND; 252 return PCIBIOS_DEVICE_NOT_FOUND;
253 253
@@ -691,17 +691,17 @@ static void __init fixup_nec_usb2(void)
691 const u32 *prop; 691 const u32 *prop;
692 u8 bus, devfn; 692 u8 bus, devfn;
693 693
694 prop = get_property(nec, "vendor-id", NULL); 694 prop = of_get_property(nec, "vendor-id", NULL);
695 if (prop == NULL) 695 if (prop == NULL)
696 continue; 696 continue;
697 if (0x1033 != *prop) 697 if (0x1033 != *prop)
698 continue; 698 continue;
699 prop = get_property(nec, "device-id", NULL); 699 prop = of_get_property(nec, "device-id", NULL);
700 if (prop == NULL) 700 if (prop == NULL)
701 continue; 701 continue;
702 if (0x0035 != *prop) 702 if (0x0035 != *prop)
703 continue; 703 continue;
704 prop = get_property(nec, "reg", NULL); 704 prop = of_get_property(nec, "reg", NULL);
705 if (prop == NULL) 705 if (prop == NULL)
706 continue; 706 continue;
707 devfn = (prop[0] >> 8) & 0xff; 707 devfn = (prop[0] >> 8) & 0xff;
@@ -909,7 +909,7 @@ static int __init add_bridge(struct device_node *dev)
909 has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); 909 has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
910 910
911 /* Get bus range if any */ 911 /* Get bus range if any */
912 bus_range = get_property(dev, "bus-range", &len); 912 bus_range = of_get_property(dev, "bus-range", &len);
913 if (bus_range == NULL || len < 2 * sizeof(int)) { 913 if (bus_range == NULL || len < 2 * sizeof(int)) {
914 printk(KERN_WARNING "Can't get bus-range for %s, assume" 914 printk(KERN_WARNING "Can't get bus-range for %s, assume"
915 " bus 0\n", dev->full_name); 915 " bus 0\n", dev->full_name);
diff --git a/arch/powerpc/platforms/powermac/pfunc_base.c b/arch/powerpc/platforms/powermac/pfunc_base.c
index 5c6c15c5f9a3..45d54b9ad9e0 100644
--- a/arch/powerpc/platforms/powermac/pfunc_base.c
+++ b/arch/powerpc/platforms/powermac/pfunc_base.c
@@ -114,7 +114,7 @@ static void macio_gpio_init_one(struct macio_chip *macio)
114 * we just create them all 114 * we just create them all
115 */ 115 */
116 for (gp = NULL; (gp = of_get_next_child(gparent, gp)) != NULL;) { 116 for (gp = NULL; (gp = of_get_next_child(gparent, gp)) != NULL;) {
117 const u32 *reg = get_property(gp, "reg", NULL); 117 const u32 *reg = of_get_property(gp, "reg", NULL);
118 unsigned long offset; 118 unsigned long offset;
119 if (reg == NULL) 119 if (reg == NULL)
120 continue; 120 continue;
diff --git a/arch/powerpc/platforms/powermac/pfunc_core.c b/arch/powerpc/platforms/powermac/pfunc_core.c
index a128553b8413..85434231ae14 100644
--- a/arch/powerpc/platforms/powermac/pfunc_core.c
+++ b/arch/powerpc/platforms/powermac/pfunc_core.c
@@ -820,7 +820,7 @@ struct pmf_function *__pmf_find_function(struct device_node *target,
820 * one, then we fallback to a direct call attempt 820 * one, then we fallback to a direct call attempt
821 */ 821 */
822 snprintf(fname, 63, "platform-%s", name); 822 snprintf(fname, 63, "platform-%s", name);
823 prop = get_property(target, fname, NULL); 823 prop = of_get_property(target, fname, NULL);
824 if (prop == NULL) 824 if (prop == NULL)
825 goto find_it; 825 goto find_it;
826 ph = *prop; 826 ph = *prop;
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
index 5e5c0e4add91..f59d311e25da 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -482,7 +482,7 @@ static struct mpic * __init pmac_setup_one_mpic(struct device_node *np,
482 pmac_call_feature(PMAC_FTR_ENABLE_MPIC, np, 0, 0); 482 pmac_call_feature(PMAC_FTR_ENABLE_MPIC, np, 0, 0);
483 483
484 flags |= MPIC_WANTS_RESET; 484 flags |= MPIC_WANTS_RESET;
485 if (get_property(np, "big-endian", NULL)) 485 if (of_get_property(np, "big-endian", NULL))
486 flags |= MPIC_BIG_ENDIAN; 486 flags |= MPIC_BIG_ENDIAN;
487 487
488 /* Primary Big Endian means HT interrupts. This is quite dodgy 488 /* Primary Big Endian means HT interrupts. This is quite dodgy
@@ -510,7 +510,7 @@ static int __init pmac_pic_probe_mpic(void)
510 for (np = NULL; (np = of_find_node_by_type(np, "open-pic")) 510 for (np = NULL; (np = of_find_node_by_type(np, "open-pic"))
511 != NULL;) { 511 != NULL;) {
512 if (master == NULL && 512 if (master == NULL &&
513 get_property(np, "interrupts", NULL) == NULL) 513 of_get_property(np, "interrupts", NULL) == NULL)
514 master = of_node_get(np); 514 master = of_node_get(np);
515 else if (slave == NULL) 515 else if (slave == NULL)
516 slave = of_node_get(np); 516 slave = of_node_get(np);
@@ -575,7 +575,7 @@ void __init pmac_pic_init(void)
575#ifdef CONFIG_PPC32 575#ifdef CONFIG_PPC32
576 if (!pmac_newworld) 576 if (!pmac_newworld)
577 flags |= OF_IMAP_OLDWORLD_MAC; 577 flags |= OF_IMAP_OLDWORLD_MAC;
578 if (get_property(of_chosen, "linux,bootx", NULL) != NULL) 578 if (of_get_property(of_chosen, "linux,bootx", NULL) != NULL)
579 flags |= OF_IMAP_NO_PHANDLE; 579 flags |= OF_IMAP_NO_PHANDLE;
580#endif /* CONFIG_PPC_32 */ 580#endif /* CONFIG_PPC_32 */
581 581
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index f2a3063980eb..8c96f2461e9a 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -134,12 +134,12 @@ static void pmac_show_cpuinfo(struct seq_file *m)
134 seq_printf(m, "machine\t\t: "); 134 seq_printf(m, "machine\t\t: ");
135 np = of_find_node_by_path("/"); 135 np = of_find_node_by_path("/");
136 if (np != NULL) { 136 if (np != NULL) {
137 pp = get_property(np, "model", NULL); 137 pp = of_get_property(np, "model", NULL);
138 if (pp != NULL) 138 if (pp != NULL)
139 seq_printf(m, "%s\n", pp); 139 seq_printf(m, "%s\n", pp);
140 else 140 else
141 seq_printf(m, "PowerMac\n"); 141 seq_printf(m, "PowerMac\n");
142 pp = get_property(np, "compatible", &plen); 142 pp = of_get_property(np, "compatible", &plen);
143 if (pp != NULL) { 143 if (pp != NULL) {
144 seq_printf(m, "motherboard\t:"); 144 seq_printf(m, "motherboard\t:");
145 while (plen > 0) { 145 while (plen > 0) {
@@ -163,11 +163,13 @@ static void pmac_show_cpuinfo(struct seq_file *m)
163 if (np == NULL) 163 if (np == NULL)
164 np = of_find_node_by_type(NULL, "cache"); 164 np = of_find_node_by_type(NULL, "cache");
165 if (np != NULL) { 165 if (np != NULL) {
166 const unsigned int *ic = get_property(np, "i-cache-size", NULL); 166 const unsigned int *ic =
167 const unsigned int *dc = get_property(np, "d-cache-size", NULL); 167 of_get_property(np, "i-cache-size", NULL);
168 const unsigned int *dc =
169 of_get_property(np, "d-cache-size", NULL);
168 seq_printf(m, "L2 cache\t:"); 170 seq_printf(m, "L2 cache\t:");
169 has_l2cache = 1; 171 has_l2cache = 1;
170 if (get_property(np, "cache-unified", NULL) != 0 && dc) { 172 if (of_get_property(np, "cache-unified", NULL) != 0 && dc) {
171 seq_printf(m, " %dK unified", *dc / 1024); 173 seq_printf(m, " %dK unified", *dc / 1024);
172 } else { 174 } else {
173 if (ic) 175 if (ic)
@@ -176,7 +178,7 @@ static void pmac_show_cpuinfo(struct seq_file *m)
176 seq_printf(m, "%s %dK data", 178 seq_printf(m, "%s %dK data",
177 (ic? " +": ""), *dc / 1024); 179 (ic? " +": ""), *dc / 1024);
178 } 180 }
179 pp = get_property(np, "ram-type", NULL); 181 pp = of_get_property(np, "ram-type", NULL);
180 if (pp) 182 if (pp)
181 seq_printf(m, " %s", pp); 183 seq_printf(m, " %s", pp);
182 seq_printf(m, "\n"); 184 seq_printf(m, "\n");
@@ -253,7 +255,7 @@ static void __init l2cr_init(void)
253 np = find_type_devices("cpu"); 255 np = find_type_devices("cpu");
254 if (np != 0) { 256 if (np != 0) {
255 const unsigned int *l2cr = 257 const unsigned int *l2cr =
256 get_property(np, "l2cr-value", NULL); 258 of_get_property(np, "l2cr-value", NULL);
257 if (l2cr != 0) { 259 if (l2cr != 0) {
258 ppc_override_l2cr = 1; 260 ppc_override_l2cr = 1;
259 ppc_override_l2cr_value = *l2cr; 261 ppc_override_l2cr_value = *l2cr;
@@ -285,7 +287,7 @@ static void __init pmac_setup_arch(void)
285 loops_per_jiffy = 50000000 / HZ; 287 loops_per_jiffy = 50000000 / HZ;
286 cpu = of_find_node_by_type(NULL, "cpu"); 288 cpu = of_find_node_by_type(NULL, "cpu");
287 if (cpu != NULL) { 289 if (cpu != NULL) {
288 fp = get_property(cpu, "clock-frequency", NULL); 290 fp = of_get_property(cpu, "clock-frequency", NULL);
289 if (fp != NULL) { 291 if (fp != NULL) {
290 if (pvr >= 0x30 && pvr < 0x80) 292 if (pvr >= 0x30 && pvr < 0x80)
291 /* PPC970 etc. */ 293 /* PPC970 etc. */
@@ -302,7 +304,7 @@ static void __init pmac_setup_arch(void)
302 304
303 /* See if newworld or oldworld */ 305 /* See if newworld or oldworld */
304 for (ic = NULL; (ic = of_find_all_nodes(ic)) != NULL; ) 306 for (ic = NULL; (ic = of_find_all_nodes(ic)) != NULL; )
305 if (get_property(ic, "interrupt-controller", NULL)) 307 if (of_get_property(ic, "interrupt-controller", NULL))
306 break; 308 break;
307 if (ic) { 309 if (ic) {
308 pmac_newworld = 1; 310 pmac_newworld = 1;
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index d73fb73802bb..20f328678fd1 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -567,7 +567,7 @@ static void __init smp_core99_setup_i2c_hwsync(int ncpus)
567 pmac_tb_clock_chip_host = pmac_i2c_find_bus(cc); 567 pmac_tb_clock_chip_host = pmac_i2c_find_bus(cc);
568 if (pmac_tb_clock_chip_host == NULL) 568 if (pmac_tb_clock_chip_host == NULL)
569 continue; 569 continue;
570 reg = get_property(cc, "reg", NULL); 570 reg = of_get_property(cc, "reg", NULL);
571 if (reg == NULL) 571 if (reg == NULL)
572 continue; 572 continue;
573 switch (*reg) { 573 switch (*reg) {
@@ -695,7 +695,7 @@ static void __init smp_core99_setup(int ncpus)
695 struct device_node *cpus = 695 struct device_node *cpus =
696 of_find_node_by_path("/cpus"); 696 of_find_node_by_path("/cpus");
697 if (cpus && 697 if (cpus &&
698 get_property(cpus, "platform-cpu-timebase", NULL)) { 698 of_get_property(cpus, "platform-cpu-timebase", NULL)) {
699 pmac_tb_freeze = smp_core99_pfunc_tb_freeze; 699 pmac_tb_freeze = smp_core99_pfunc_tb_freeze;
700 printk(KERN_INFO "Processor timebase sync using" 700 printk(KERN_INFO "Processor timebase sync using"
701 " platform function\n"); 701 " platform function\n");
@@ -712,7 +712,7 @@ static void __init smp_core99_setup(int ncpus)
712 core99_tb_gpio = KL_GPIO_TB_ENABLE; /* default value */ 712 core99_tb_gpio = KL_GPIO_TB_ENABLE; /* default value */
713 cpu = of_find_node_by_type(NULL, "cpu"); 713 cpu = of_find_node_by_type(NULL, "cpu");
714 if (cpu != NULL) { 714 if (cpu != NULL) {
715 tbprop = get_property(cpu, "timebase-enable", NULL); 715 tbprop = of_get_property(cpu, "timebase-enable", NULL);
716 if (tbprop) 716 if (tbprop)
717 core99_tb_gpio = *tbprop; 717 core99_tb_gpio = *tbprop;
718 of_node_put(cpu); 718 of_node_put(cpu);
diff --git a/arch/powerpc/platforms/powermac/udbg_scc.c b/arch/powerpc/platforms/powermac/udbg_scc.c
index 379db05b0082..47de4d3fc167 100644
--- a/arch/powerpc/platforms/powermac/udbg_scc.c
+++ b/arch/powerpc/platforms/powermac/udbg_scc.c
@@ -81,7 +81,7 @@ void udbg_scc_init(int force_scc)
81 macio = of_get_parent(escc); 81 macio = of_get_parent(escc);
82 if (macio == NULL) 82 if (macio == NULL)
83 goto bail; 83 goto bail;
84 path = get_property(of_chosen, "linux,stdout-path", NULL); 84 path = of_get_property(of_chosen, "linux,stdout-path", NULL);
85 if (path != NULL) 85 if (path != NULL)
86 stdout = of_find_node_by_path(path); 86 stdout = of_find_node_by_path(path);
87 for (ch = NULL; (ch = of_get_next_child(escc, ch)) != NULL;) { 87 for (ch = NULL; (ch = of_get_next_child(escc, ch)) != NULL;) {
@@ -96,13 +96,13 @@ void udbg_scc_init(int force_scc)
96 ch = ch_def ? ch_def : ch_a; 96 ch = ch_def ? ch_def : ch_a;
97 97
98 /* Get address within mac-io ASIC */ 98 /* Get address within mac-io ASIC */
99 reg = get_property(escc, "reg", NULL); 99 reg = of_get_property(escc, "reg", NULL);
100 if (reg == NULL) 100 if (reg == NULL)
101 goto bail; 101 goto bail;
102 addr = reg[0]; 102 addr = reg[0];
103 103
104 /* Get address of mac-io PCI itself */ 104 /* Get address of mac-io PCI itself */
105 reg = get_property(macio, "assigned-addresses", NULL); 105 reg = of_get_property(macio, "assigned-addresses", NULL);
106 if (reg == NULL) 106 if (reg == NULL)
107 goto bail; 107 goto bail;
108 addr += reg[2]; 108 addr += reg[2];
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index a56be71d1ede..48fbd442e9df 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -789,10 +789,10 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
789 unsigned int rets[3]; 789 unsigned int rets[3];
790 struct eeh_early_enable_info *info = data; 790 struct eeh_early_enable_info *info = data;
791 int ret; 791 int ret;
792 const char *status = get_property(dn, "status", NULL); 792 const char *status = of_get_property(dn, "status", NULL);
793 const u32 *class_code = get_property(dn, "class-code", NULL); 793 const u32 *class_code = of_get_property(dn, "class-code", NULL);
794 const u32 *vendor_id = get_property(dn, "vendor-id", NULL); 794 const u32 *vendor_id = of_get_property(dn, "vendor-id", NULL);
795 const u32 *device_id = get_property(dn, "device-id", NULL); 795 const u32 *device_id = of_get_property(dn, "device-id", NULL);
796 const u32 *regs; 796 const u32 *regs;
797 int enable; 797 int enable;
798 struct pci_dn *pdn = PCI_DN(dn); 798 struct pci_dn *pdn = PCI_DN(dn);
@@ -835,7 +835,7 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
835 835
836 /* Ok... see if this device supports EEH. Some do, some don't, 836 /* Ok... see if this device supports EEH. Some do, some don't,
837 * and the only way to find out is to check each and every one. */ 837 * and the only way to find out is to check each and every one. */
838 regs = get_property(dn, "reg", NULL); 838 regs = of_get_property(dn, "reg", NULL);
839 if (regs) { 839 if (regs) {
840 /* First register entry is addr (00BBSS00) */ 840 /* First register entry is addr (00BBSS00) */
841 /* Try to enable eeh */ 841 /* Try to enable eeh */
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c
index 8cc331eecc9d..3170e003f76a 100644
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -314,14 +314,14 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
314 314
315 if (!frozen_dn) { 315 if (!frozen_dn) {
316 316
317 location = get_property(event->dn, "ibm,loc-code", NULL); 317 location = of_get_property(event->dn, "ibm,loc-code", NULL);
318 location = location ? location : "unknown"; 318 location = location ? location : "unknown";
319 printk(KERN_ERR "EEH: Error: Cannot find partition endpoint " 319 printk(KERN_ERR "EEH: Error: Cannot find partition endpoint "
320 "for location=%s pci addr=%s\n", 320 "for location=%s pci addr=%s\n",
321 location, pci_name(event->dev)); 321 location, pci_name(event->dev));
322 return NULL; 322 return NULL;
323 } 323 }
324 location = get_property(frozen_dn, "ibm,loc-code", NULL); 324 location = of_get_property(frozen_dn, "ibm,loc-code", NULL);
325 location = location ? location : "unknown"; 325 location = location ? location : "unknown";
326 326
327 /* There are two different styles for coming up with the PE. 327 /* There are two different styles for coming up with the PE.
diff --git a/arch/powerpc/platforms/pseries/eeh_event.c b/arch/powerpc/platforms/pseries/eeh_event.c
index 221dec8c16bd..ddb80f5d850b 100644
--- a/arch/powerpc/platforms/pseries/eeh_event.c
+++ b/arch/powerpc/platforms/pseries/eeh_event.c
@@ -126,7 +126,7 @@ int eeh_send_failure_event (struct device_node *dn,
126 126
127 if (!mem_init_done) { 127 if (!mem_init_done) {
128 printk(KERN_ERR "EEH: event during early boot not handled\n"); 128 printk(KERN_ERR "EEH: event during early boot not handled\n");
129 location = get_property(dn, "ibm,loc-code", NULL); 129 location = of_get_property(dn, "ibm,loc-code", NULL);
130 printk(KERN_ERR "EEH: device node = %s\n", dn->full_name); 130 printk(KERN_ERR "EEH: device node = %s\n", dn->full_name);
131 printk(KERN_ERR "EEH: PCI location = %s\n", location); 131 printk(KERN_ERR "EEH: PCI location = %s\n", location);
132 return 1; 132 return 1;
diff --git a/arch/powerpc/platforms/pseries/firmware.c b/arch/powerpc/platforms/pseries/firmware.c
index 90522e3c9d46..29bf83bfb1f0 100644
--- a/arch/powerpc/platforms/pseries/firmware.c
+++ b/arch/powerpc/platforms/pseries/firmware.c
@@ -80,7 +80,7 @@ void __init fw_feature_init(void)
80 goto out; 80 goto out;
81 } 81 }
82 82
83 hypertas = get_property(dn, "ibm,hypertas-functions", &len); 83 hypertas = of_get_property(dn, "ibm,hypertas-functions", &len);
84 if (hypertas == NULL) 84 if (hypertas == NULL)
85 goto out; 85 goto out;
86 86
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index f460b9cbfd46..9711eb0d5496 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
@@ -143,7 +143,7 @@ static int pseries_add_processor(struct device_node *np)
143 int err = -ENOSPC, len, nthreads, i; 143 int err = -ENOSPC, len, nthreads, i;
144 const u32 *intserv; 144 const u32 *intserv;
145 145
146 intserv = get_property(np, "ibm,ppc-interrupt-server#s", &len); 146 intserv = of_get_property(np, "ibm,ppc-interrupt-server#s", &len);
147 if (!intserv) 147 if (!intserv)
148 return 0; 148 return 0;
149 149
@@ -203,7 +203,7 @@ static void pseries_remove_processor(struct device_node *np)
203 int len, nthreads, i; 203 int len, nthreads, i;
204 const u32 *intserv; 204 const u32 *intserv;
205 205
206 intserv = get_property(np, "ibm,ppc-interrupt-server#s", &len); 206 intserv = of_get_property(np, "ibm,ppc-interrupt-server#s", &len);
207 if (!intserv) 207 if (!intserv)
208 return; 208 return;
209 209
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index f9510a5a3e21..66665c82415c 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -253,8 +253,8 @@ static void iommu_table_setparms(struct pci_controller *phb,
253 253
254 node = (struct device_node *)phb->arch_data; 254 node = (struct device_node *)phb->arch_data;
255 255
256 basep = get_property(node, "linux,tce-base", NULL); 256 basep = of_get_property(node, "linux,tce-base", NULL);
257 sizep = get_property(node, "linux,tce-size", NULL); 257 sizep = of_get_property(node, "linux,tce-size", NULL);
258 if (basep == NULL || sizep == NULL) { 258 if (basep == NULL || sizep == NULL) {
259 printk(KERN_ERR "PCI_DMA: iommu_table_setparms: %s has " 259 printk(KERN_ERR "PCI_DMA: iommu_table_setparms: %s has "
260 "missing tce entries !\n", dn->full_name); 260 "missing tce entries !\n", dn->full_name);
@@ -404,7 +404,7 @@ static void pci_dma_bus_setup_pSeriesLP(struct pci_bus *bus)
404 404
405 /* Find nearest ibm,dma-window, walking up the device tree */ 405 /* Find nearest ibm,dma-window, walking up the device tree */
406 for (pdn = dn; pdn != NULL; pdn = pdn->parent) { 406 for (pdn = dn; pdn != NULL; pdn = pdn->parent) {
407 dma_window = get_property(pdn, "ibm,dma-window", NULL); 407 dma_window = of_get_property(pdn, "ibm,dma-window", NULL);
408 if (dma_window != NULL) 408 if (dma_window != NULL)
409 break; 409 break;
410 } 410 }
@@ -499,7 +499,7 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev)
499 499
500 for (pdn = dn; pdn && PCI_DN(pdn) && !PCI_DN(pdn)->iommu_table; 500 for (pdn = dn; pdn && PCI_DN(pdn) && !PCI_DN(pdn)->iommu_table;
501 pdn = pdn->parent) { 501 pdn = pdn->parent) {
502 dma_window = get_property(pdn, "ibm,dma-window", NULL); 502 dma_window = of_get_property(pdn, "ibm,dma-window", NULL);
503 if (dma_window) 503 if (dma_window)
504 break; 504 break;
505 } 505 }
@@ -548,7 +548,7 @@ static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long acti
548 switch (action) { 548 switch (action) {
549 case PSERIES_RECONFIG_REMOVE: 549 case PSERIES_RECONFIG_REMOVE:
550 if (pci && pci->iommu_table && 550 if (pci && pci->iommu_table &&
551 get_property(np, "ibm,dma-window", NULL)) 551 of_get_property(np, "ibm,dma-window", NULL))
552 iommu_free_table(np); 552 iommu_free_table(np);
553 break; 553 break;
554 default: 554 default:
@@ -565,7 +565,7 @@ static struct notifier_block iommu_reconfig_nb = {
565/* These are called very early. */ 565/* These are called very early. */
566void iommu_init_early_pSeries(void) 566void iommu_init_early_pSeries(void)
567{ 567{
568 if (of_chosen && get_property(of_chosen, "linux,iommu-off", NULL)) { 568 if (of_chosen && of_get_property(of_chosen, "linux,iommu-off", NULL)) {
569 /* Direct I/O, IOMMU off */ 569 /* Direct I/O, IOMMU off */
570 ppc_md.pci_dma_dev_setup = NULL; 570 ppc_md.pci_dma_dev_setup = NULL;
571 ppc_md.pci_dma_bus_setup = NULL; 571 ppc_md.pci_dma_bus_setup = NULL;
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 843ee9643211..3a70e8ad7bc8 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -209,13 +209,13 @@ void __init find_udbg_vterm(void)
209 /* find the boot console from /chosen/stdout */ 209 /* find the boot console from /chosen/stdout */
210 if (!of_chosen) 210 if (!of_chosen)
211 return; 211 return;
212 name = get_property(of_chosen, "linux,stdout-path", NULL); 212 name = of_get_property(of_chosen, "linux,stdout-path", NULL);
213 if (name == NULL) 213 if (name == NULL)
214 return; 214 return;
215 stdout_node = of_find_node_by_path(name); 215 stdout_node = of_find_node_by_path(name);
216 if (!stdout_node) 216 if (!stdout_node)
217 return; 217 return;
218 name = get_property(stdout_node, "name", NULL); 218 name = of_get_property(stdout_node, "name", NULL);
219 if (!name) { 219 if (!name) {
220 printk(KERN_WARNING "stdout node missing 'name' property!\n"); 220 printk(KERN_WARNING "stdout node missing 'name' property!\n");
221 goto out; 221 goto out;
@@ -226,7 +226,7 @@ void __init find_udbg_vterm(void)
226 /* Check if it's a virtual terminal */ 226 /* Check if it's a virtual terminal */
227 if (strncmp(name, "vty", 3) != 0) 227 if (strncmp(name, "vty", 3) != 0)
228 goto out; 228 goto out;
229 termno = get_property(stdout_node, "reg", NULL); 229 termno = of_get_property(stdout_node, "reg", NULL);
230 if (termno == NULL) 230 if (termno == NULL)
231 goto out; 231 goto out;
232 vtermno = termno[0]; 232 vtermno = termno[0];
diff --git a/arch/powerpc/platforms/pseries/nvram.c b/arch/powerpc/platforms/pseries/nvram.c
index 64163cecdf93..f68903e15bd5 100644
--- a/arch/powerpc/platforms/pseries/nvram.c
+++ b/arch/powerpc/platforms/pseries/nvram.c
@@ -130,7 +130,7 @@ int __init pSeries_nvram_init(void)
130 if (nvram == NULL) 130 if (nvram == NULL)
131 return -ENODEV; 131 return -ENODEV;
132 132
133 nbytes_p = get_property(nvram, "#bytes", &proplen); 133 nbytes_p = of_get_property(nvram, "#bytes", &proplen);
134 if (nbytes_p == NULL || proplen != sizeof(unsigned int)) 134 if (nbytes_p == NULL || proplen != sizeof(unsigned int))
135 return -EIO; 135 return -EIO;
136 136
diff --git a/arch/powerpc/platforms/pseries/pci.c b/arch/powerpc/platforms/pseries/pci.c
index 5c54ff9521c8..2c6ded29f73d 100644
--- a/arch/powerpc/platforms/pseries/pci.c
+++ b/arch/powerpc/platforms/pseries/pci.c
@@ -40,7 +40,7 @@ void pcibios_name_device(struct pci_dev *dev)
40 */ 40 */
41 dn = pci_device_to_OF_node(dev); 41 dn = pci_device_to_OF_node(dev);
42 if (dn) { 42 if (dn) {
43 char *loc_code = get_property(dn, "ibm,loc-code", 0); 43 const char *loc_code = of_get_property(dn, "ibm,loc-code", 0);
44 if (loc_code) { 44 if (loc_code) {
45 int loc_len = strlen(loc_code); 45 int loc_len = strlen(loc_code);
46 if (loc_len < sizeof(dev->dev.name)) { 46 if (loc_len < sizeof(dev->dev.name)) {
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c
index edc038873113..53aa04101ced 100644
--- a/arch/powerpc/platforms/pseries/ras.c
+++ b/arch/powerpc/platforms/pseries/ras.c
@@ -85,7 +85,7 @@ static void request_ras_irqs(struct device_node *np,
85 * map those interrupts using the default interrupt host and default 85 * map those interrupts using the default interrupt host and default
86 * trigger 86 * trigger
87 */ 87 */
88 opicprop = get_property(np, "open-pic-interrupt", &opicplen); 88 opicprop = of_get_property(np, "open-pic-interrupt", &opicplen);
89 if (opicprop) { 89 if (opicprop) {
90 opicplen /= sizeof(u32); 90 opicplen /= sizeof(u32);
91 for (i = 0; i < opicplen; i++) { 91 for (i = 0; i < opicplen; i++) {
diff --git a/arch/powerpc/platforms/pseries/rtasd.c b/arch/powerpc/platforms/pseries/rtasd.c
index 77d0937d5c07..9797b10b2935 100644
--- a/arch/powerpc/platforms/pseries/rtasd.c
+++ b/arch/powerpc/platforms/pseries/rtasd.c
@@ -363,7 +363,7 @@ static int get_eventscan_parms(void)
363 363
364 node = of_find_node_by_path("/rtas"); 364 node = of_find_node_by_path("/rtas");
365 365
366 ip = get_property(node, "rtas-event-scan-rate", NULL); 366 ip = of_get_property(node, "rtas-event-scan-rate", NULL);
367 if (ip == NULL) { 367 if (ip == NULL) {
368 printk(KERN_ERR "rtasd: no rtas-event-scan-rate\n"); 368 printk(KERN_ERR "rtasd: no rtas-event-scan-rate\n");
369 of_node_put(node); 369 of_node_put(node);
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 54e93eb8a8ee..e2fcd2307e67 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -93,7 +93,7 @@ static void pSeries_show_cpuinfo(struct seq_file *m)
93 93
94 root = of_find_node_by_path("/"); 94 root = of_find_node_by_path("/");
95 if (root) 95 if (root)
96 model = get_property(root, "model", NULL); 96 model = of_get_property(root, "model", NULL);
97 seq_printf(m, "machine\t\t: CHRP %s\n", model); 97 seq_printf(m, "machine\t\t: CHRP %s\n", model);
98 of_node_put(root); 98 of_node_put(root);
99} 99}
@@ -140,7 +140,7 @@ static void __init pseries_mpic_init_IRQ(void)
140 140
141 np = of_find_node_by_path("/"); 141 np = of_find_node_by_path("/");
142 naddr = of_n_addr_cells(np); 142 naddr = of_n_addr_cells(np);
143 opprop = get_property(np, "platform-open-pic", &opplen); 143 opprop = of_get_property(np, "platform-open-pic", &opplen);
144 if (opprop != 0) { 144 if (opprop != 0) {
145 openpic_addr = of_read_number(opprop, naddr); 145 openpic_addr = of_read_number(opprop, naddr);
146 printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr); 146 printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr);
@@ -189,7 +189,7 @@ static void __init pseries_mpic_init_IRQ(void)
189 break; 189 break;
190 if (strcmp(np->name, "pci") != 0) 190 if (strcmp(np->name, "pci") != 0)
191 continue; 191 continue;
192 addrp = get_property(np, "8259-interrupt-acknowledge", 192 addrp = of_get_property(np, "8259-interrupt-acknowledge",
193 NULL); 193 NULL);
194 if (addrp == NULL) 194 if (addrp == NULL)
195 continue; 195 continue;
@@ -226,7 +226,7 @@ static void __init pseries_discover_pic(void)
226 226
227 for (np = NULL; (np = of_find_node_by_name(np, 227 for (np = NULL; (np = of_find_node_by_name(np,
228 "interrupt-controller"));) { 228 "interrupt-controller"));) {
229 typep = get_property(np, "compatible", NULL); 229 typep = of_get_property(np, "compatible", NULL);
230 if (strstr(typep, "open-pic")) { 230 if (strstr(typep, "open-pic")) {
231 pSeries_mpic_node = of_node_get(np); 231 pSeries_mpic_node = of_node_get(np);
232 ppc_md.init_IRQ = pseries_mpic_init_IRQ; 232 ppc_md.init_IRQ = pseries_mpic_init_IRQ;
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index f0795faada91..896cbf340c42 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -576,7 +576,7 @@ static void __init xics_init_one_node(struct device_node *np,
576 * This happens to be the case so far but we are playing with fire... 576 * This happens to be the case so far but we are playing with fire...
577 * should be fixed one of these days. -BenH. 577 * should be fixed one of these days. -BenH.
578 */ 578 */
579 ireg = get_property(np, "ibm,interrupt-server-ranges", NULL); 579 ireg = of_get_property(np, "ibm,interrupt-server-ranges", NULL);
580 580
581 /* Do that ever happen ? we'll know soon enough... but even good'old 581 /* Do that ever happen ? we'll know soon enough... but even good'old
582 * f80 does have that property .. 582 * f80 does have that property ..
@@ -588,7 +588,7 @@ static void __init xics_init_one_node(struct device_node *np,
588 */ 588 */
589 *indx = *ireg; 589 *indx = *ireg;
590 } 590 }
591 ireg = get_property(np, "reg", &ilen); 591 ireg = of_get_property(np, "reg", &ilen);
592 if (!ireg) 592 if (!ireg)
593 panic("xics_init_IRQ: can't find interrupt reg property"); 593 panic("xics_init_IRQ: can't find interrupt reg property");
594 594
@@ -640,7 +640,7 @@ static void __init xics_setup_8259_cascade(void)
640 break; 640 break;
641 if (strcmp(np->name, "pci") != 0) 641 if (strcmp(np->name, "pci") != 0)
642 continue; 642 continue;
643 addrp = get_property(np, "8259-interrupt-acknowledge", NULL); 643 addrp = of_get_property(np, "8259-interrupt-acknowledge", NULL);
644 if (addrp == NULL) 644 if (addrp == NULL)
645 continue; 645 continue;
646 naddr = of_n_addr_cells(np); 646 naddr = of_n_addr_cells(np);
@@ -664,10 +664,11 @@ static struct device_node *cpuid_to_of_node(int cpu)
664 int i, len; 664 int i, len;
665 const u32 *intserv; 665 const u32 *intserv;
666 666
667 intserv = get_property(np, "ibm,ppc-interrupt-server#s", &len); 667 intserv = of_get_property(np, "ibm,ppc-interrupt-server#s",
668 &len);
668 669
669 if (!intserv) 670 if (!intserv)
670 intserv = get_property(np, "reg", &len); 671 intserv = of_get_property(np, "reg", &len);
671 672
672 i = len / sizeof(u32); 673 i = len / sizeof(u32);
673 674
@@ -709,7 +710,7 @@ void __init xics_init_IRQ(void)
709 /* Find the server numbers for the boot cpu. */ 710 /* Find the server numbers for the boot cpu. */
710 np = cpuid_to_of_node(boot_cpuid); 711 np = cpuid_to_of_node(boot_cpuid);
711 BUG_ON(!np); 712 BUG_ON(!np);
712 ireg = get_property(np, "ibm,ppc-interrupt-gserver#s", &ilen); 713 ireg = of_get_property(np, "ibm,ppc-interrupt-gserver#s", &ilen);
713 if (!ireg) 714 if (!ireg)
714 goto skip_gserver_check; 715 goto skip_gserver_check;
715 i = ilen / sizeof(int); 716 i = ilen / sizeof(int);
@@ -725,7 +726,7 @@ void __init xics_init_IRQ(void)
725 default_server = hcpuid; 726 default_server = hcpuid;
726 default_distrib_server = ireg[j+1]; 727 default_distrib_server = ireg[j+1];
727 728
728 isize = get_property(np, 729 isize = of_get_property(np,
729 "ibm,interrupt-server#-size", NULL); 730 "ibm,interrupt-server#-size", NULL);
730 if (isize) 731 if (isize)
731 interrupt_server_size = *isize; 732 interrupt_server_size = *isize;