aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/btext.c22
-rw-r--r--arch/powerpc/kernel/ibmebus.c22
-rw-r--r--arch/powerpc/kernel/legacy_serial.c24
-rw-r--r--arch/powerpc/kernel/lparcfg.c9
-rw-r--r--arch/powerpc/kernel/machine_kexec_64.c4
-rw-r--r--arch/powerpc/kernel/of_platform.c4
-rw-r--r--arch/powerpc/kernel/pci_32.c14
-rw-r--r--arch/powerpc/kernel/pci_64.c16
-rw-r--r--arch/powerpc/kernel/pci_dn.c9
-rw-r--r--arch/powerpc/kernel/prom_parse.c43
-rw-r--r--arch/powerpc/kernel/rtas-proc.c4
-rw-r--r--arch/powerpc/kernel/rtas.c16
-rw-r--r--arch/powerpc/kernel/rtas_pci.c10
-rw-r--r--arch/powerpc/kernel/setup-common.c7
-rw-r--r--arch/powerpc/kernel/setup_64.c10
-rw-r--r--arch/powerpc/kernel/sysfs.c2
-rw-r--r--arch/powerpc/kernel/time.c2
-rw-r--r--arch/powerpc/kernel/vio.c14
18 files changed, 116 insertions, 116 deletions
diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c
index 3678997339d6..e7b684689e04 100644
--- a/arch/powerpc/kernel/btext.c
+++ b/arch/powerpc/kernel/btext.c
@@ -161,33 +161,33 @@ int btext_initialize(struct device_node *np)
161 unsigned long address = 0; 161 unsigned long address = 0;
162 const u32 *prop; 162 const u32 *prop;
163 163
164 prop = get_property(np, "linux,bootx-width", NULL); 164 prop = of_get_property(np, "linux,bootx-width", NULL);
165 if (prop == NULL) 165 if (prop == NULL)
166 prop = get_property(np, "width", NULL); 166 prop = of_get_property(np, "width", NULL);
167 if (prop == NULL) 167 if (prop == NULL)
168 return -EINVAL; 168 return -EINVAL;
169 width = *prop; 169 width = *prop;
170 prop = get_property(np, "linux,bootx-height", NULL); 170 prop = of_get_property(np, "linux,bootx-height", NULL);
171 if (prop == NULL) 171 if (prop == NULL)
172 prop = get_property(np, "height", NULL); 172 prop = of_get_property(np, "height", NULL);
173 if (prop == NULL) 173 if (prop == NULL)
174 return -EINVAL; 174 return -EINVAL;
175 height = *prop; 175 height = *prop;
176 prop = get_property(np, "linux,bootx-depth", NULL); 176 prop = of_get_property(np, "linux,bootx-depth", NULL);
177 if (prop == NULL) 177 if (prop == NULL)
178 prop = get_property(np, "depth", NULL); 178 prop = of_get_property(np, "depth", NULL);
179 if (prop == NULL) 179 if (prop == NULL)
180 return -EINVAL; 180 return -EINVAL;
181 depth = *prop; 181 depth = *prop;
182 pitch = width * ((depth + 7) / 8); 182 pitch = width * ((depth + 7) / 8);
183 prop = get_property(np, "linux,bootx-linebytes", NULL); 183 prop = of_get_property(np, "linux,bootx-linebytes", NULL);
184 if (prop == NULL) 184 if (prop == NULL)
185 prop = get_property(np, "linebytes", NULL); 185 prop = of_get_property(np, "linebytes", NULL);
186 if (prop && *prop != 0xffffffffu) 186 if (prop && *prop != 0xffffffffu)
187 pitch = *prop; 187 pitch = *prop;
188 if (pitch == 1) 188 if (pitch == 1)
189 pitch = 0x1000; 189 pitch = 0x1000;
190 prop = get_property(np, "address", NULL); 190 prop = of_get_property(np, "address", NULL);
191 if (prop) 191 if (prop)
192 address = *prop; 192 address = *prop;
193 193
@@ -219,7 +219,7 @@ int __init btext_find_display(int allow_nonstdout)
219 struct device_node *np = NULL; 219 struct device_node *np = NULL;
220 int rc = -ENODEV; 220 int rc = -ENODEV;
221 221
222 name = get_property(of_chosen, "linux,stdout-path", NULL); 222 name = of_get_property(of_chosen, "linux,stdout-path", NULL);
223 if (name != NULL) { 223 if (name != NULL) {
224 np = of_find_node_by_path(name); 224 np = of_find_node_by_path(name);
225 if (np != NULL) { 225 if (np != NULL) {
@@ -236,7 +236,7 @@ int __init btext_find_display(int allow_nonstdout)
236 return rc; 236 return rc;
237 237
238 for (np = NULL; (np = of_find_node_by_type(np, "display"));) { 238 for (np = NULL; (np = of_find_node_by_type(np, "display"));) {
239 if (get_property(np, "linux,opened", NULL)) { 239 if (of_get_property(np, "linux,opened", NULL)) {
240 printk("trying %s ...\n", np->full_name); 240 printk("trying %s ...\n", np->full_name);
241 rc = btext_initialize(np); 241 rc = btext_initialize(np);
242 printk("result: %d\n", rc); 242 printk("result: %d\n", rc);
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c
index 8ed1163c0bd4..48446a699ef8 100644
--- a/arch/powerpc/kernel/ibmebus.c
+++ b/arch/powerpc/kernel/ibmebus.c
@@ -193,7 +193,7 @@ static struct ibmebus_dev* __devinit ibmebus_register_device_node(
193 const char *loc_code; 193 const char *loc_code;
194 int length; 194 int length;
195 195
196 loc_code = get_property(dn, "ibm,loc-code", NULL); 196 loc_code = of_get_property(dn, "ibm,loc-code", NULL);
197 if (!loc_code) { 197 if (!loc_code) {
198 printk(KERN_WARNING "%s: node %s missing 'ibm,loc-code'\n", 198 printk(KERN_WARNING "%s: node %s missing 'ibm,loc-code'\n",
199 __FUNCTION__, dn->name ? dn->name : "<unknown>"); 199 __FUNCTION__, dn->name ? dn->name : "<unknown>");
@@ -256,12 +256,11 @@ static void ibmebus_add_devices_by_id(struct of_device_id *idt)
256static int ibmebus_match_helper_name(struct device *dev, void *data) 256static int ibmebus_match_helper_name(struct device *dev, void *data)
257{ 257{
258 const struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev); 258 const struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev);
259 char *name; 259 const char *name;
260 260
261 name = (char*)get_property( 261 name = of_get_property(ebus_dev->ofdev.node, "name", NULL);
262 ebus_dev->ofdev.node, "name", NULL);
263 262
264 if (name && (strcmp((char*)data, name) == 0)) 263 if (name && (strcmp(data, name) == 0))
265 return 1; 264 return 1;
266 265
267 return 0; 266 return 0;
@@ -363,7 +362,7 @@ static ssize_t name_show(struct device *dev,
363 struct device_attribute *attr, char *buf) 362 struct device_attribute *attr, char *buf)
364{ 363{
365 struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev); 364 struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev);
366 char *name = (char*)get_property(ebus_dev->ofdev.node, "name", NULL); 365 const char *name = of_get_property(ebus_dev->ofdev.node, "name", NULL);
367 return sprintf(buf, "%s\n", name); 366 return sprintf(buf, "%s\n", name);
368} 367}
369 368
@@ -375,12 +374,11 @@ static struct device_attribute ibmebus_dev_attrs[] = {
375static int ibmebus_match_helper_loc_code(struct device *dev, void *data) 374static int ibmebus_match_helper_loc_code(struct device *dev, void *data)
376{ 375{
377 const struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev); 376 const struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev);
378 char *loc_code; 377 const char *loc_code;
379 378
380 loc_code = (char*)get_property( 379 loc_code = of_get_property(ebus_dev->ofdev.node, "ibm,loc-code", NULL);
381 ebus_dev->ofdev.node, "ibm,loc-code", NULL);
382 380
383 if (loc_code && (strcmp((char*)data, loc_code) == 0)) 381 if (loc_code && (strcmp(data, loc_code) == 0))
384 return 1; 382 return 1;
385 383
386 return 0; 384 return 0;
@@ -391,7 +389,7 @@ static ssize_t ibmebus_store_probe(struct bus_type *bus,
391{ 389{
392 struct device_node *dn = NULL; 390 struct device_node *dn = NULL;
393 struct ibmebus_dev *dev; 391 struct ibmebus_dev *dev;
394 char *loc_code; 392 const char *loc_code;
395 char parm[MAX_LOC_CODE_LENGTH]; 393 char parm[MAX_LOC_CODE_LENGTH];
396 394
397 if (count >= MAX_LOC_CODE_LENGTH) 395 if (count >= MAX_LOC_CODE_LENGTH)
@@ -409,7 +407,7 @@ static ssize_t ibmebus_store_probe(struct bus_type *bus,
409 } 407 }
410 408
411 while ((dn = of_find_all_nodes(dn))) { 409 while ((dn = of_find_all_nodes(dn))) {
412 loc_code = (char *)get_property(dn, "ibm,loc-code", NULL); 410 loc_code = of_get_property(dn, "ibm,loc-code", NULL);
413 if (loc_code && (strncmp(loc_code, parm, count) == 0)) { 411 if (loc_code && (strncmp(loc_code, parm, count) == 0)) {
414 dev = ibmebus_register_device_node(dn); 412 dev = ibmebus_register_device_node(dn);
415 if (IS_ERR(dev)) { 413 if (IS_ERR(dev)) {
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index 325f490a10cc..63dd2c3ad95e 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -44,12 +44,12 @@ static int __init add_legacy_port(struct device_node *np, int want_index,
44 int index; 44 int index;
45 45
46 /* get clock freq. if present */ 46 /* get clock freq. if present */
47 clk = get_property(np, "clock-frequency", NULL); 47 clk = of_get_property(np, "clock-frequency", NULL);
48 if (clk && *clk) 48 if (clk && *clk)
49 clock = *clk; 49 clock = *clk;
50 50
51 /* get default speed if present */ 51 /* get default speed if present */
52 spd = get_property(np, "current-speed", NULL); 52 spd = of_get_property(np, "current-speed", NULL);
53 53
54 /* If we have a location index, then try to use it */ 54 /* If we have a location index, then try to use it */
55 if (want_index >= 0 && want_index < MAX_LEGACY_SERIAL_PORTS) 55 if (want_index >= 0 && want_index < MAX_LEGACY_SERIAL_PORTS)
@@ -121,11 +121,11 @@ static int __init add_legacy_soc_port(struct device_node *np,
121 /* We only support ports that have a clock frequency properly 121 /* We only support ports that have a clock frequency properly
122 * encoded in the device-tree. 122 * encoded in the device-tree.
123 */ 123 */
124 if (get_property(np, "clock-frequency", NULL) == NULL) 124 if (of_get_property(np, "clock-frequency", NULL) == NULL)
125 return -1; 125 return -1;
126 126
127 /* if rtas uses this device, don't try to use it as well */ 127 /* if rtas uses this device, don't try to use it as well */
128 if (get_property(np, "used-by-rtas", NULL) != NULL) 128 if (of_get_property(np, "used-by-rtas", NULL) != NULL)
129 return -1; 129 return -1;
130 130
131 /* Get the address */ 131 /* Get the address */
@@ -157,7 +157,7 @@ static int __init add_legacy_isa_port(struct device_node *np,
157 DBG(" -> add_legacy_isa_port(%s)\n", np->full_name); 157 DBG(" -> add_legacy_isa_port(%s)\n", np->full_name);
158 158
159 /* Get the ISA port number */ 159 /* Get the ISA port number */
160 reg = get_property(np, "reg", NULL); 160 reg = of_get_property(np, "reg", NULL);
161 if (reg == NULL) 161 if (reg == NULL)
162 return -1; 162 return -1;
163 163
@@ -168,7 +168,7 @@ static int __init add_legacy_isa_port(struct device_node *np,
168 /* Now look for an "ibm,aix-loc" property that gives us ordering 168 /* Now look for an "ibm,aix-loc" property that gives us ordering
169 * if any... 169 * if any...
170 */ 170 */
171 typep = get_property(np, "ibm,aix-loc", NULL); 171 typep = of_get_property(np, "ibm,aix-loc", NULL);
172 172
173 /* If we have a location index, then use it */ 173 /* If we have a location index, then use it */
174 if (typep && *typep == 'S') 174 if (typep && *typep == 'S')
@@ -206,7 +206,7 @@ static int __init add_legacy_pci_port(struct device_node *np,
206 * compatible UARTs on PCI need all sort of quirks (port offsets 206 * compatible UARTs on PCI need all sort of quirks (port offsets
207 * etc...) that this code doesn't know about 207 * etc...) that this code doesn't know about
208 */ 208 */
209 if (get_property(np, "clock-frequency", NULL) == NULL) 209 if (of_get_property(np, "clock-frequency", NULL) == NULL)
210 return -1; 210 return -1;
211 211
212 /* Get the PCI address. Assume BAR 0 */ 212 /* Get the PCI address. Assume BAR 0 */
@@ -232,7 +232,7 @@ static int __init add_legacy_pci_port(struct device_node *np,
232 * we get to their "reg" property 232 * we get to their "reg" property
233 */ 233 */
234 if (np != pci_dev) { 234 if (np != pci_dev) {
235 const u32 *reg = get_property(np, "reg", NULL); 235 const u32 *reg = of_get_property(np, "reg", NULL);
236 if (reg && (*reg < 4)) 236 if (reg && (*reg < 4))
237 index = lindex = *reg; 237 index = lindex = *reg;
238 } 238 }
@@ -296,7 +296,7 @@ void __init find_legacy_serial_ports(void)
296 DBG(" -> find_legacy_serial_port()\n"); 296 DBG(" -> find_legacy_serial_port()\n");
297 297
298 /* Now find out if one of these is out firmware console */ 298 /* Now find out if one of these is out firmware console */
299 path = get_property(of_chosen, "linux,stdout-path", NULL); 299 path = of_get_property(of_chosen, "linux,stdout-path", NULL);
300 if (path != NULL) { 300 if (path != NULL) {
301 stdout = of_find_node_by_path(path); 301 stdout = of_find_node_by_path(path);
302 if (stdout) 302 if (stdout)
@@ -529,7 +529,7 @@ static int __init check_legacy_serial_console(void)
529 } 529 }
530 /* We are getting a weird phandle from OF ... */ 530 /* We are getting a weird phandle from OF ... */
531 /* ... So use the full path instead */ 531 /* ... So use the full path instead */
532 name = get_property(of_chosen, "linux,stdout-path", NULL); 532 name = of_get_property(of_chosen, "linux,stdout-path", NULL);
533 if (name == NULL) { 533 if (name == NULL) {
534 DBG(" no linux,stdout-path !\n"); 534 DBG(" no linux,stdout-path !\n");
535 return -ENODEV; 535 return -ENODEV;
@@ -541,12 +541,12 @@ static int __init check_legacy_serial_console(void)
541 } 541 }
542 DBG("stdout is %s\n", prom_stdout->full_name); 542 DBG("stdout is %s\n", prom_stdout->full_name);
543 543
544 name = get_property(prom_stdout, "name", NULL); 544 name = of_get_property(prom_stdout, "name", NULL);
545 if (!name) { 545 if (!name) {
546 DBG(" stdout package has no name !\n"); 546 DBG(" stdout package has no name !\n");
547 goto not_found; 547 goto not_found;
548 } 548 }
549 spd = get_property(prom_stdout, "current-speed", NULL); 549 spd = of_get_property(prom_stdout, "current-speed", NULL);
550 if (spd) 550 if (spd)
551 speed = *spd; 551 speed = *spd;
552 552
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c
index 89486b631284..b8dc1eeb0169 100644
--- a/arch/powerpc/kernel/lparcfg.c
+++ b/arch/powerpc/kernel/lparcfg.c
@@ -323,7 +323,7 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v)
323 323
324 rtas_node = find_path_device("/rtas"); 324 rtas_node = find_path_device("/rtas");
325 if (rtas_node) 325 if (rtas_node)
326 lrdrp = get_property(rtas_node, "ibm,lrdr-capacity", NULL); 326 lrdrp = of_get_property(rtas_node, "ibm,lrdr-capacity", NULL);
327 327
328 if (lrdrp == NULL) { 328 if (lrdrp == NULL) {
329 partition_potential_processors = vdso_data->processorCount; 329 partition_potential_processors = vdso_data->processorCount;
@@ -539,21 +539,22 @@ static int lparcfg_data(struct seq_file *m, void *v)
539 539
540 rootdn = find_path_device("/"); 540 rootdn = find_path_device("/");
541 if (rootdn) { 541 if (rootdn) {
542 tmp = get_property(rootdn, "model", NULL); 542 tmp = of_get_property(rootdn, "model", NULL);
543 if (tmp) { 543 if (tmp) {
544 model = tmp; 544 model = tmp;
545 /* Skip "IBM," - see platforms/iseries/dt.c */ 545 /* Skip "IBM," - see platforms/iseries/dt.c */
546 if (firmware_has_feature(FW_FEATURE_ISERIES)) 546 if (firmware_has_feature(FW_FEATURE_ISERIES))
547 model += 4; 547 model += 4;
548 } 548 }
549 tmp = get_property(rootdn, "system-id", NULL); 549 tmp = of_get_property(rootdn, "system-id", NULL);
550 if (tmp) { 550 if (tmp) {
551 system_id = tmp; 551 system_id = tmp;
552 /* Skip "IBM," - see platforms/iseries/dt.c */ 552 /* Skip "IBM," - see platforms/iseries/dt.c */
553 if (firmware_has_feature(FW_FEATURE_ISERIES)) 553 if (firmware_has_feature(FW_FEATURE_ISERIES))
554 system_id += 4; 554 system_id += 4;
555 } 555 }
556 lp_index_ptr = get_property(rootdn, "ibm,partition-no", NULL); 556 lp_index_ptr = of_get_property(rootdn, "ibm,partition-no",
557 NULL);
557 if (lp_index_ptr) 558 if (lp_index_ptr)
558 lp_index = *lp_index_ptr; 559 lp_index = *lp_index_ptr;
559 } 560 }
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index b975b5b0e3d5..704375bda73a 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -72,8 +72,8 @@ int default_machine_kexec_prepare(struct kimage *image)
72 /* We also should not overwrite the tce tables */ 72 /* We also should not overwrite the tce tables */
73 for (node = of_find_node_by_type(NULL, "pci"); node != NULL; 73 for (node = of_find_node_by_type(NULL, "pci"); node != NULL;
74 node = of_find_node_by_type(node, "pci")) { 74 node = of_find_node_by_type(node, "pci")) {
75 basep = get_property(node, "linux,tce-base", NULL); 75 basep = of_get_property(node, "linux,tce-base", NULL);
76 sizep = get_property(node, "linux,tce-size", NULL); 76 sizep = of_get_property(node, "linux,tce-size", NULL);
77 if (basep == NULL || sizep == NULL) 77 if (basep == NULL || sizep == NULL)
78 continue; 78 continue;
79 79
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
index da78e44eefec..d2fd9863318c 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -178,7 +178,7 @@ static void of_platform_make_bus_id(struct of_device *dev)
178 * and 'D' for MMIO DCRs. 178 * and 'D' for MMIO DCRs.
179 */ 179 */
180#ifdef CONFIG_PPC_DCR 180#ifdef CONFIG_PPC_DCR
181 reg = get_property(node, "dcr-reg", NULL); 181 reg = of_get_property(node, "dcr-reg", NULL);
182 if (reg) { 182 if (reg) {
183#ifdef CONFIG_PPC_DCR_NATIVE 183#ifdef CONFIG_PPC_DCR_NATIVE
184 snprintf(name, BUS_ID_SIZE, "d%x.%s", 184 snprintf(name, BUS_ID_SIZE, "d%x.%s",
@@ -198,7 +198,7 @@ static void of_platform_make_bus_id(struct of_device *dev)
198 /* 198 /*
199 * For MMIO, get the physical address 199 * For MMIO, get the physical address
200 */ 200 */
201 reg = get_property(node, "reg", NULL); 201 reg = of_get_property(node, "reg", NULL);
202 if (reg) { 202 if (reg) {
203 addr = of_translate_address(node, reg); 203 addr = of_translate_address(node, reg);
204 if (addr != OF_BAD_ADDR) { 204 if (addr != OF_BAD_ADDR) {
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index e99ffe2140bf..ae04f9418363 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -637,7 +637,7 @@ make_one_node_map(struct device_node* node, u8 pci_bus)
637 637
638 if (pci_bus >= pci_bus_count) 638 if (pci_bus >= pci_bus_count)
639 return; 639 return;
640 bus_range = get_property(node, "bus-range", &len); 640 bus_range = of_get_property(node, "bus-range", &len);
641 if (bus_range == NULL || len < 2 * sizeof(int)) { 641 if (bus_range == NULL || len < 2 * sizeof(int)) {
642 printk(KERN_WARNING "Can't get bus-range for %s, " 642 printk(KERN_WARNING "Can't get bus-range for %s, "
643 "assuming it starts at 0\n", node->full_name); 643 "assuming it starts at 0\n", node->full_name);
@@ -649,11 +649,11 @@ make_one_node_map(struct device_node* node, u8 pci_bus)
649 struct pci_dev* dev; 649 struct pci_dev* dev;
650 const unsigned int *class_code, *reg; 650 const unsigned int *class_code, *reg;
651 651
652 class_code = get_property(node, "class-code", NULL); 652 class_code = of_get_property(node, "class-code", NULL);
653 if (!class_code || ((*class_code >> 8) != PCI_CLASS_BRIDGE_PCI && 653 if (!class_code || ((*class_code >> 8) != PCI_CLASS_BRIDGE_PCI &&
654 (*class_code >> 8) != PCI_CLASS_BRIDGE_CARDBUS)) 654 (*class_code >> 8) != PCI_CLASS_BRIDGE_CARDBUS))
655 continue; 655 continue;
656 reg = get_property(node, "reg", NULL); 656 reg = of_get_property(node, "reg", NULL);
657 if (!reg) 657 if (!reg)
658 continue; 658 continue;
659 dev = pci_find_slot(pci_bus, ((reg[0] >> 8) & 0xff)); 659 dev = pci_find_slot(pci_bus, ((reg[0] >> 8) & 0xff));
@@ -724,7 +724,7 @@ scan_OF_pci_childs(struct device_node* node, pci_OF_scan_iterator filter, void*
724 * a fake root for all functions of a multi-function device, 724 * a fake root for all functions of a multi-function device,
725 * we go down them as well. 725 * we go down them as well.
726 */ 726 */
727 class_code = get_property(node, "class-code", NULL); 727 class_code = of_get_property(node, "class-code", NULL);
728 if ((!class_code || ((*class_code >> 8) != PCI_CLASS_BRIDGE_PCI && 728 if ((!class_code || ((*class_code >> 8) != PCI_CLASS_BRIDGE_PCI &&
729 (*class_code >> 8) != PCI_CLASS_BRIDGE_CARDBUS)) && 729 (*class_code >> 8) != PCI_CLASS_BRIDGE_CARDBUS)) &&
730 strcmp(node->name, "multifunc-device")) 730 strcmp(node->name, "multifunc-device"))
@@ -744,7 +744,7 @@ static struct device_node *scan_OF_for_pci_dev(struct device_node *parent,
744 unsigned int psize; 744 unsigned int psize;
745 745
746 while ((np = of_get_next_child(parent, np)) != NULL) { 746 while ((np = of_get_next_child(parent, np)) != NULL) {
747 reg = get_property(np, "reg", &psize); 747 reg = of_get_property(np, "reg", &psize);
748 if (reg == NULL || psize < 4) 748 if (reg == NULL || psize < 4)
749 continue; 749 continue;
750 if (((reg[0] >> 8) & 0xff) == devfn) 750 if (((reg[0] >> 8) & 0xff) == devfn)
@@ -859,7 +859,7 @@ pci_device_from_OF_node(struct device_node* node, u8* bus, u8* devfn)
859 if (!scan_OF_pci_childs(((struct device_node*)hose->arch_data)->child, 859 if (!scan_OF_pci_childs(((struct device_node*)hose->arch_data)->child,
860 find_OF_pci_device_filter, (void *)node)) 860 find_OF_pci_device_filter, (void *)node))
861 return -ENODEV; 861 return -ENODEV;
862 reg = get_property(node, "reg", NULL); 862 reg = of_get_property(node, "reg", NULL);
863 if (!reg) 863 if (!reg)
864 return -ENODEV; 864 return -ENODEV;
865 *bus = (reg[0] >> 16) & 0xff; 865 *bus = (reg[0] >> 16) & 0xff;
@@ -902,7 +902,7 @@ pci_process_bridge_OF_ranges(struct pci_controller *hose,
902 * that can have more than 3 ranges, fortunately using contiguous 902 * that can have more than 3 ranges, fortunately using contiguous
903 * addresses -- BenH 903 * addresses -- BenH
904 */ 904 */
905 dt_ranges = get_property(dev, "ranges", &rlen); 905 dt_ranges = of_get_property(dev, "ranges", &rlen);
906 if (!dt_ranges) 906 if (!dt_ranges)
907 return; 907 return;
908 /* Sanity check, though hopefully that never happens */ 908 /* Sanity check, though hopefully that never happens */
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 84b4f66e98b6..60d7d4baa227 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -268,7 +268,7 @@ static u32 get_int_prop(struct device_node *np, const char *name, u32 def)
268 const u32 *prop; 268 const u32 *prop;
269 int len; 269 int len;
270 270
271 prop = get_property(np, name, &len); 271 prop = of_get_property(np, name, &len);
272 if (prop && len >= 4) 272 if (prop && len >= 4)
273 return *prop; 273 return *prop;
274 return def; 274 return def;
@@ -301,7 +301,7 @@ static void pci_parse_of_addrs(struct device_node *node, struct pci_dev *dev)
301 u32 i; 301 u32 i;
302 int proplen; 302 int proplen;
303 303
304 addrs = get_property(node, "assigned-addresses", &proplen); 304 addrs = of_get_property(node, "assigned-addresses", &proplen);
305 if (!addrs) 305 if (!addrs)
306 return; 306 return;
307 DBG(" parse addresses (%d bytes) @ %p\n", proplen, addrs); 307 DBG(" parse addresses (%d bytes) @ %p\n", proplen, addrs);
@@ -343,7 +343,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
343 dev = kzalloc(sizeof(struct pci_dev), GFP_KERNEL); 343 dev = kzalloc(sizeof(struct pci_dev), GFP_KERNEL);
344 if (!dev) 344 if (!dev)
345 return NULL; 345 return NULL;
346 type = get_property(node, "device_type", NULL); 346 type = of_get_property(node, "device_type", NULL);
347 if (type == NULL) 347 if (type == NULL)
348 type = ""; 348 type = "";
349 349
@@ -407,7 +407,7 @@ void __devinit of_scan_bus(struct device_node *node,
407 407
408 while ((child = of_get_next_child(node, child)) != NULL) { 408 while ((child = of_get_next_child(node, child)) != NULL) {
409 DBG(" * %s\n", child->full_name); 409 DBG(" * %s\n", child->full_name);
410 reg = get_property(child, "reg", &reglen); 410 reg = of_get_property(child, "reg", &reglen);
411 if (reg == NULL || reglen < 20) 411 if (reg == NULL || reglen < 20)
412 continue; 412 continue;
413 devfn = (reg[0] >> 8) & 0xff; 413 devfn = (reg[0] >> 8) & 0xff;
@@ -440,13 +440,13 @@ void __devinit of_scan_pci_bridge(struct device_node *node,
440 DBG("of_scan_pci_bridge(%s)\n", node->full_name); 440 DBG("of_scan_pci_bridge(%s)\n", node->full_name);
441 441
442 /* parse bus-range property */ 442 /* parse bus-range property */
443 busrange = get_property(node, "bus-range", &len); 443 busrange = of_get_property(node, "bus-range", &len);
444 if (busrange == NULL || len != 8) { 444 if (busrange == NULL || len != 8) {
445 printk(KERN_DEBUG "Can't get bus-range for PCI-PCI bridge %s\n", 445 printk(KERN_DEBUG "Can't get bus-range for PCI-PCI bridge %s\n",
446 node->full_name); 446 node->full_name);
447 return; 447 return;
448 } 448 }
449 ranges = get_property(node, "ranges", &len); 449 ranges = of_get_property(node, "ranges", &len);
450 if (ranges == NULL) { 450 if (ranges == NULL) {
451 printk(KERN_DEBUG "Can't get ranges for PCI-PCI bridge %s\n", 451 printk(KERN_DEBUG "Can't get ranges for PCI-PCI bridge %s\n",
452 node->full_name); 452 node->full_name);
@@ -910,7 +910,7 @@ static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node,
910 unsigned int size; 910 unsigned int size;
911 int rlen = 0; 911 int rlen = 0;
912 912
913 range = get_property(isa_node, "ranges", &rlen); 913 range = of_get_property(isa_node, "ranges", &rlen);
914 if (range == NULL || (rlen < sizeof(struct isa_range))) { 914 if (range == NULL || (rlen < sizeof(struct isa_range))) {
915 printk(KERN_ERR "no ISA ranges or unexpected isa range size," 915 printk(KERN_ERR "no ISA ranges or unexpected isa range size,"
916 "mapping 64k\n"); 916 "mapping 64k\n");
@@ -970,7 +970,7 @@ void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
970 * (size depending on dev->n_addr_cells) 970 * (size depending on dev->n_addr_cells)
971 * cells 4+5 or 5+6: the size of the range 971 * cells 4+5 or 5+6: the size of the range
972 */ 972 */
973 ranges = get_property(dev, "ranges", &rlen); 973 ranges = of_get_property(dev, "ranges", &rlen);
974 if (ranges == NULL) 974 if (ranges == NULL)
975 return; 975 return;
976 hose->io_base_phys = 0; 976 hose->io_base_phys = 0;
diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c
index 68df018dae0e..d7d36df9c053 100644
--- a/arch/powerpc/kernel/pci_dn.c
+++ b/arch/powerpc/kernel/pci_dn.c
@@ -40,7 +40,8 @@
40static void * __devinit update_dn_pci_info(struct device_node *dn, void *data) 40static void * __devinit update_dn_pci_info(struct device_node *dn, void *data)
41{ 41{
42 struct pci_controller *phb = data; 42 struct pci_controller *phb = data;
43 const int *type = get_property(dn, "ibm,pci-config-space-type", NULL); 43 const int *type =
44 of_get_property(dn, "ibm,pci-config-space-type", NULL);
44 const u32 *regs; 45 const u32 *regs;
45 struct pci_dn *pdn; 46 struct pci_dn *pdn;
46 47
@@ -54,14 +55,14 @@ static void * __devinit update_dn_pci_info(struct device_node *dn, void *data)
54 dn->data = pdn; 55 dn->data = pdn;
55 pdn->node = dn; 56 pdn->node = dn;
56 pdn->phb = phb; 57 pdn->phb = phb;
57 regs = get_property(dn, "reg", NULL); 58 regs = of_get_property(dn, "reg", NULL);
58 if (regs) { 59 if (regs) {
59 /* First register entry is addr (00BBSS00) */ 60 /* First register entry is addr (00BBSS00) */
60 pdn->busno = (regs[0] >> 16) & 0xff; 61 pdn->busno = (regs[0] >> 16) & 0xff;
61 pdn->devfn = (regs[0] >> 8) & 0xff; 62 pdn->devfn = (regs[0] >> 8) & 0xff;
62 } 63 }
63 if (firmware_has_feature(FW_FEATURE_ISERIES)) { 64 if (firmware_has_feature(FW_FEATURE_ISERIES)) {
64 const u32 *busp = get_property(dn, "linux,subbus", NULL); 65 const u32 *busp = of_get_property(dn, "linux,subbus", NULL);
65 if (busp) 66 if (busp)
66 pdn->bussubno = *busp; 67 pdn->bussubno = *busp;
67 } 68 }
@@ -100,7 +101,7 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre,
100 u32 class; 101 u32 class;
101 102
102 nextdn = NULL; 103 nextdn = NULL;
103 classp = get_property(dn, "class-code", NULL); 104 classp = of_get_property(dn, "class-code", NULL);
104 class = classp ? *classp : 0; 105 class = classp ? *classp : 0;
105 106
106 if (pre && ((ret = pre(dn, data)) != NULL)) 107 if (pre && ((ret = pre(dn, data)) != NULL))
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index ba9c7c1e4108..aa40a5307294 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -196,7 +196,7 @@ const u32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size,
196 return NULL; 196 return NULL;
197 197
198 /* Get "reg" or "assigned-addresses" property */ 198 /* Get "reg" or "assigned-addresses" property */
199 prop = get_property(dev, bus->addresses, &psize); 199 prop = of_get_property(dev, bus->addresses, &psize);
200 if (prop == NULL) 200 if (prop == NULL)
201 return NULL; 201 return NULL;
202 psize /= 4; 202 psize /= 4;
@@ -438,7 +438,7 @@ static int of_translate_one(struct device_node *parent, struct of_bus *bus,
438 * to translate addresses that aren't supposed to be translated in 438 * to translate addresses that aren't supposed to be translated in
439 * the first place. --BenH. 439 * the first place. --BenH.
440 */ 440 */
441 ranges = get_property(parent, "ranges", &rlen); 441 ranges = of_get_property(parent, "ranges", &rlen);
442 if (ranges == NULL || rlen == 0) { 442 if (ranges == NULL || rlen == 0) {
443 offset = of_read_number(addr, na); 443 offset = of_read_number(addr, na);
444 memset(addr, 0, pna * 4); 444 memset(addr, 0, pna * 4);
@@ -578,7 +578,7 @@ const u32 *of_get_address(struct device_node *dev, int index, u64 *size,
578 return NULL; 578 return NULL;
579 579
580 /* Get "reg" or "assigned-addresses" property */ 580 /* Get "reg" or "assigned-addresses" property */
581 prop = get_property(dev, bus->addresses, &psize); 581 prop = of_get_property(dev, bus->addresses, &psize);
582 if (prop == NULL) 582 if (prop == NULL)
583 return NULL; 583 return NULL;
584 psize /= 4; 584 psize /= 4;
@@ -650,16 +650,16 @@ void of_parse_dma_window(struct device_node *dn, const void *dma_window_prop,
650 /* busno is always one cell */ 650 /* busno is always one cell */
651 *busno = *(dma_window++); 651 *busno = *(dma_window++);
652 652
653 prop = get_property(dn, "ibm,#dma-address-cells", NULL); 653 prop = of_get_property(dn, "ibm,#dma-address-cells", NULL);
654 if (!prop) 654 if (!prop)
655 prop = get_property(dn, "#address-cells", NULL); 655 prop = of_get_property(dn, "#address-cells", NULL);
656 656
657 cells = prop ? *(u32 *)prop : of_n_addr_cells(dn); 657 cells = prop ? *(u32 *)prop : of_n_addr_cells(dn);
658 *phys = of_read_number(dma_window, cells); 658 *phys = of_read_number(dma_window, cells);
659 659
660 dma_window += cells; 660 dma_window += cells;
661 661
662 prop = get_property(dn, "ibm,#dma-size-cells", NULL); 662 prop = of_get_property(dn, "ibm,#dma-size-cells", NULL);
663 cells = prop ? *(u32 *)prop : of_n_size_cells(dn); 663 cells = prop ? *(u32 *)prop : of_n_size_cells(dn);
664 *size = of_read_number(dma_window, cells); 664 *size = of_read_number(dma_window, cells);
665} 665}
@@ -680,7 +680,7 @@ static struct device_node *of_irq_find_parent(struct device_node *child)
680 return NULL; 680 return NULL;
681 681
682 do { 682 do {
683 parp = get_property(child, "interrupt-parent", NULL); 683 parp = of_get_property(child, "interrupt-parent", NULL);
684 if (parp == NULL) 684 if (parp == NULL)
685 p = of_get_parent(child); 685 p = of_get_parent(child);
686 else { 686 else {
@@ -691,7 +691,7 @@ static struct device_node *of_irq_find_parent(struct device_node *child)
691 } 691 }
692 of_node_put(child); 692 of_node_put(child);
693 child = p; 693 child = p;
694 } while (p && get_property(p, "#interrupt-cells", NULL) == NULL); 694 } while (p && of_get_property(p, "#interrupt-cells", NULL) == NULL);
695 695
696 return p; 696 return p;
697} 697}
@@ -716,7 +716,7 @@ void of_irq_map_init(unsigned int flags)
716 struct device_node *np; 716 struct device_node *np;
717 717
718 for(np = NULL; (np = of_find_all_nodes(np)) != NULL;) { 718 for(np = NULL; (np = of_find_all_nodes(np)) != NULL;) {
719 if (get_property(np, "interrupt-controller", NULL) 719 if (of_get_property(np, "interrupt-controller", NULL)
720 == NULL) 720 == NULL)
721 continue; 721 continue;
722 /* Skip /chosen/interrupt-controller */ 722 /* Skip /chosen/interrupt-controller */
@@ -755,7 +755,7 @@ int of_irq_map_raw(struct device_node *parent, const u32 *intspec, u32 ointsize,
755 * is none, we are nice and just walk up the tree 755 * is none, we are nice and just walk up the tree
756 */ 756 */
757 do { 757 do {
758 tmp = get_property(ipar, "#interrupt-cells", NULL); 758 tmp = of_get_property(ipar, "#interrupt-cells", NULL);
759 if (tmp != NULL) { 759 if (tmp != NULL) {
760 intsize = *tmp; 760 intsize = *tmp;
761 break; 761 break;
@@ -779,7 +779,7 @@ int of_irq_map_raw(struct device_node *parent, const u32 *intspec, u32 ointsize,
779 */ 779 */
780 old = of_node_get(ipar); 780 old = of_node_get(ipar);
781 do { 781 do {
782 tmp = get_property(old, "#address-cells", NULL); 782 tmp = of_get_property(old, "#address-cells", NULL);
783 tnode = of_get_parent(old); 783 tnode = of_get_parent(old);
784 of_node_put(old); 784 of_node_put(old);
785 old = tnode; 785 old = tnode;
@@ -795,7 +795,8 @@ int of_irq_map_raw(struct device_node *parent, const u32 *intspec, u32 ointsize,
795 /* Now check if cursor is an interrupt-controller and if it is 795 /* Now check if cursor is an interrupt-controller and if it is
796 * then we are done 796 * then we are done
797 */ 797 */
798 if (get_property(ipar, "interrupt-controller", NULL) != NULL) { 798 if (of_get_property(ipar, "interrupt-controller", NULL) !=
799 NULL) {
799 DBG(" -> got it !\n"); 800 DBG(" -> got it !\n");
800 memcpy(out_irq->specifier, intspec, 801 memcpy(out_irq->specifier, intspec,
801 intsize * sizeof(u32)); 802 intsize * sizeof(u32));
@@ -806,7 +807,7 @@ int of_irq_map_raw(struct device_node *parent, const u32 *intspec, u32 ointsize,
806 } 807 }
807 808
808 /* Now look for an interrupt-map */ 809 /* Now look for an interrupt-map */
809 imap = get_property(ipar, "interrupt-map", &imaplen); 810 imap = of_get_property(ipar, "interrupt-map", &imaplen);
810 /* No interrupt map, check for an interrupt parent */ 811 /* No interrupt map, check for an interrupt parent */
811 if (imap == NULL) { 812 if (imap == NULL) {
812 DBG(" -> no map, getting parent\n"); 813 DBG(" -> no map, getting parent\n");
@@ -816,7 +817,7 @@ int of_irq_map_raw(struct device_node *parent, const u32 *intspec, u32 ointsize,
816 imaplen /= sizeof(u32); 817 imaplen /= sizeof(u32);
817 818
818 /* Look for a mask */ 819 /* Look for a mask */
819 imask = get_property(ipar, "interrupt-map-mask", NULL); 820 imask = of_get_property(ipar, "interrupt-map-mask", NULL);
820 821
821 /* If we were passed no "reg" property and we attempt to parse 822 /* If we were passed no "reg" property and we attempt to parse
822 * an interrupt-map, then #address-cells must be 0. 823 * an interrupt-map, then #address-cells must be 0.
@@ -863,15 +864,13 @@ int of_irq_map_raw(struct device_node *parent, const u32 *intspec, u32 ointsize,
863 /* Get #interrupt-cells and #address-cells of new 864 /* Get #interrupt-cells and #address-cells of new
864 * parent 865 * parent
865 */ 866 */
866 tmp = get_property(newpar, "#interrupt-cells", 867 tmp = of_get_property(newpar, "#interrupt-cells", NULL);
867 NULL);
868 if (tmp == NULL) { 868 if (tmp == NULL) {
869 DBG(" -> parent lacks #interrupt-cells !\n"); 869 DBG(" -> parent lacks #interrupt-cells !\n");
870 goto fail; 870 goto fail;
871 } 871 }
872 newintsize = *tmp; 872 newintsize = *tmp;
873 tmp = get_property(newpar, "#address-cells", 873 tmp = of_get_property(newpar, "#address-cells", NULL);
874 NULL);
875 newaddrsize = (tmp == NULL) ? 0 : *tmp; 874 newaddrsize = (tmp == NULL) ? 0 : *tmp;
876 875
877 DBG(" -> newintsize=%d, newaddrsize=%d\n", 876 DBG(" -> newintsize=%d, newaddrsize=%d\n",
@@ -928,7 +927,7 @@ static int of_irq_map_oldworld(struct device_node *device, int index,
928 * everything together on these) 927 * everything together on these)
929 */ 928 */
930 while (device) { 929 while (device) {
931 ints = get_property(device, "AAPL,interrupts", &intlen); 930 ints = of_get_property(device, "AAPL,interrupts", &intlen);
932 if (ints != NULL) 931 if (ints != NULL)
933 break; 932 break;
934 device = device->parent; 933 device = device->parent;
@@ -970,13 +969,13 @@ int of_irq_map_one(struct device_node *device, int index, struct of_irq *out_irq
970 return of_irq_map_oldworld(device, index, out_irq); 969 return of_irq_map_oldworld(device, index, out_irq);
971 970
972 /* Get the interrupts property */ 971 /* Get the interrupts property */
973 intspec = get_property(device, "interrupts", &intlen); 972 intspec = of_get_property(device, "interrupts", &intlen);
974 if (intspec == NULL) 973 if (intspec == NULL)
975 return -EINVAL; 974 return -EINVAL;
976 intlen /= sizeof(u32); 975 intlen /= sizeof(u32);
977 976
978 /* Get the reg property (if any) */ 977 /* Get the reg property (if any) */
979 addr = get_property(device, "reg", NULL); 978 addr = of_get_property(device, "reg", NULL);
980 979
981 /* Look for the interrupt parent. */ 980 /* Look for the interrupt parent. */
982 p = of_irq_find_parent(device); 981 p = of_irq_find_parent(device);
@@ -984,7 +983,7 @@ int of_irq_map_one(struct device_node *device, int index, struct of_irq *out_irq
984 return -EINVAL; 983 return -EINVAL;
985 984
986 /* Get size of interrupt specifier */ 985 /* Get size of interrupt specifier */
987 tmp = get_property(p, "#interrupt-cells", NULL); 986 tmp = of_get_property(p, "#interrupt-cells", NULL);
988 if (tmp == NULL) { 987 if (tmp == NULL) {
989 of_node_put(p); 988 of_node_put(p);
990 return -EINVAL; 989 return -EINVAL;
diff --git a/arch/powerpc/kernel/rtas-proc.c b/arch/powerpc/kernel/rtas-proc.c
index 6cbf2ae5d7aa..190b7ed1dbfb 100644
--- a/arch/powerpc/kernel/rtas-proc.c
+++ b/arch/powerpc/kernel/rtas-proc.c
@@ -450,7 +450,7 @@ static int ppc_rtas_sensors_show(struct seq_file *m, void *v)
450 int llen, offs; 450 int llen, offs;
451 451
452 sprintf (rstr, SENSOR_PREFIX"%04d", p->token); 452 sprintf (rstr, SENSOR_PREFIX"%04d", p->token);
453 loc = get_property(rtas_node, rstr, &llen); 453 loc = of_get_property(rtas_node, rstr, &llen);
454 454
455 /* A sensor may have multiple instances */ 455 /* A sensor may have multiple instances */
456 for (j = 0, offs = 0; j <= p->quant; j++) { 456 for (j = 0, offs = 0; j <= p->quant; j++) {
@@ -477,7 +477,7 @@ static int ppc_rtas_find_all_sensors(void)
477 const unsigned int *utmp; 477 const unsigned int *utmp;
478 int len, i; 478 int len, i;
479 479
480 utmp = get_property(rtas_node, "rtas-sensors", &len); 480 utmp = of_get_property(rtas_node, "rtas-sensors", &len);
481 if (utmp == NULL) { 481 if (utmp == NULL) {
482 printk (KERN_ERR "error: could not get rtas-sensors\n"); 482 printk (KERN_ERR "error: could not get rtas-sensors\n");
483 return 1; 483 return 1;
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index 9d0735a54564..702fecc93204 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -193,16 +193,16 @@ void rtas_progress(char *s, unsigned short hex)
193 if (display_width == 0) { 193 if (display_width == 0) {
194 display_width = 0x10; 194 display_width = 0x10;
195 if ((root = find_path_device("/rtas"))) { 195 if ((root = find_path_device("/rtas"))) {
196 if ((p = get_property(root, 196 if ((p = of_get_property(root,
197 "ibm,display-line-length", NULL))) 197 "ibm,display-line-length", NULL)))
198 display_width = *p; 198 display_width = *p;
199 if ((p = get_property(root, 199 if ((p = of_get_property(root,
200 "ibm,form-feed", NULL))) 200 "ibm,form-feed", NULL)))
201 form_feed = *p; 201 form_feed = *p;
202 if ((p = get_property(root, 202 if ((p = of_get_property(root,
203 "ibm,display-number-of-lines", NULL))) 203 "ibm,display-number-of-lines", NULL)))
204 display_lines = *p; 204 display_lines = *p;
205 row_width = get_property(root, 205 row_width = of_get_property(root,
206 "ibm,display-truncation-length", NULL); 206 "ibm,display-truncation-length", NULL);
207 } 207 }
208 display_character = rtas_token("display-character"); 208 display_character = rtas_token("display-character");
@@ -298,7 +298,7 @@ int rtas_token(const char *service)
298 const int *tokp; 298 const int *tokp;
299 if (rtas.dev == NULL) 299 if (rtas.dev == NULL)
300 return RTAS_UNKNOWN_SERVICE; 300 return RTAS_UNKNOWN_SERVICE;
301 tokp = get_property(rtas.dev, service, NULL); 301 tokp = of_get_property(rtas.dev, service, NULL);
302 return tokp ? *tokp : RTAS_UNKNOWN_SERVICE; 302 return tokp ? *tokp : RTAS_UNKNOWN_SERVICE;
303} 303}
304EXPORT_SYMBOL(rtas_token); 304EXPORT_SYMBOL(rtas_token);
@@ -832,12 +832,12 @@ void __init rtas_initialize(void)
832 if (rtas.dev) { 832 if (rtas.dev) {
833 const u32 *basep, *entryp, *sizep; 833 const u32 *basep, *entryp, *sizep;
834 834
835 basep = get_property(rtas.dev, "linux,rtas-base", NULL); 835 basep = of_get_property(rtas.dev, "linux,rtas-base", NULL);
836 sizep = get_property(rtas.dev, "rtas-size", NULL); 836 sizep = of_get_property(rtas.dev, "rtas-size", NULL);
837 if (basep != NULL && sizep != NULL) { 837 if (basep != NULL && sizep != NULL) {
838 rtas.base = *basep; 838 rtas.base = *basep;
839 rtas.size = *sizep; 839 rtas.size = *sizep;
840 entryp = get_property(rtas.dev, 840 entryp = of_get_property(rtas.dev,
841 "linux,rtas-entry", NULL); 841 "linux,rtas-entry", NULL);
842 if (entryp == NULL) /* Ugh */ 842 if (entryp == NULL) /* Ugh */
843 rtas.entry = rtas.base; 843 rtas.entry = rtas.base;
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c
index 1616a44ac608..f2286822be09 100644
--- a/arch/powerpc/kernel/rtas_pci.c
+++ b/arch/powerpc/kernel/rtas_pci.c
@@ -60,7 +60,7 @@ static int of_device_available(struct device_node * dn)
60{ 60{
61 const char *status; 61 const char *status;
62 62
63 status = get_property(dn, "status", NULL); 63 status = of_get_property(dn, "status", NULL);
64 64
65 if (!status) 65 if (!status)
66 return 1; 66 return 1;
@@ -177,7 +177,7 @@ struct pci_ops rtas_pci_ops = {
177 177
178int is_python(struct device_node *dev) 178int is_python(struct device_node *dev)
179{ 179{
180 const char *model = get_property(dev, "model", NULL); 180 const char *model = of_get_property(dev, "model", NULL);
181 181
182 if (model && strstr(model, "Python")) 182 if (model && strstr(model, "Python"))
183 return 1; 183 return 1;
@@ -247,7 +247,7 @@ static int phb_set_bus_ranges(struct device_node *dev,
247 const int *bus_range; 247 const int *bus_range;
248 unsigned int len; 248 unsigned int len;
249 249
250 bus_range = get_property(dev, "bus-range", &len); 250 bus_range = of_get_property(dev, "bus-range", &len);
251 if (bus_range == NULL || len < 2 * sizeof(int)) { 251 if (bus_range == NULL || len < 2 * sizeof(int)) {
252 return 1; 252 return 1;
253 } 253 }
@@ -309,12 +309,12 @@ void __init find_and_init_phbs(void)
309 if (of_chosen) { 309 if (of_chosen) {
310 const int *prop; 310 const int *prop;
311 311
312 prop = get_property(of_chosen, 312 prop = of_get_property(of_chosen,
313 "linux,pci-probe-only", NULL); 313 "linux,pci-probe-only", NULL);
314 if (prop) 314 if (prop)
315 pci_probe_only = *prop; 315 pci_probe_only = *prop;
316 316
317 prop = get_property(of_chosen, 317 prop = of_get_property(of_chosen,
318 "linux,pci-assign-all-buses", NULL); 318 "linux,pci-assign-all-buses", NULL);
319 if (prop) 319 if (prop)
320 pci_assign_all_buses = *prop; 320 pci_assign_all_buses = *prop;
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 640ff0d8f83c..3c8847b647fa 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -352,11 +352,12 @@ void __init smp_setup_cpu_maps(void)
352 const int *intserv; 352 const int *intserv;
353 int j, len = sizeof(u32), nthreads = 1; 353 int j, len = sizeof(u32), nthreads = 1;
354 354
355 intserv = get_property(dn, "ibm,ppc-interrupt-server#s", &len); 355 intserv = of_get_property(dn, "ibm,ppc-interrupt-server#s",
356 &len);
356 if (intserv) 357 if (intserv)
357 nthreads = len / sizeof(int); 358 nthreads = len / sizeof(int);
358 else { 359 else {
359 intserv = get_property(dn, "reg", NULL); 360 intserv = of_get_property(dn, "reg", NULL);
360 if (!intserv) 361 if (!intserv)
361 intserv = &cpu; /* assume logical == phys */ 362 intserv = &cpu; /* assume logical == phys */
362 } 363 }
@@ -382,7 +383,7 @@ void __init smp_setup_cpu_maps(void)
382 num_addr_cell = of_n_addr_cells(dn); 383 num_addr_cell = of_n_addr_cells(dn);
383 num_size_cell = of_n_size_cells(dn); 384 num_size_cell = of_n_size_cells(dn);
384 385
385 ireg = get_property(dn, "ibm,lrdr-capacity", NULL); 386 ireg = of_get_property(dn, "ibm,lrdr-capacity", NULL);
386 387
387 if (!ireg) 388 if (!ireg)
388 goto out; 389 goto out;
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 3c0c7f435844..22083ce3cc30 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -109,7 +109,7 @@ static void check_smt_enabled(void)
109 dn = of_find_node_by_path("/options"); 109 dn = of_find_node_by_path("/options");
110 110
111 if (dn) { 111 if (dn) {
112 smt_option = get_property(dn, "ibm,smt-enabled", NULL); 112 smt_option = of_get_property(dn, "ibm,smt-enabled", NULL);
113 113
114 if (smt_option) { 114 if (smt_option) {
115 if (!strcmp(smt_option, "on")) 115 if (!strcmp(smt_option, "on"))
@@ -304,10 +304,10 @@ static void __init initialize_cache_info(void)
304 304
305 size = 0; 305 size = 0;
306 lsize = cur_cpu_spec->dcache_bsize; 306 lsize = cur_cpu_spec->dcache_bsize;
307 sizep = get_property(np, "d-cache-size", NULL); 307 sizep = of_get_property(np, "d-cache-size", NULL);
308 if (sizep != NULL) 308 if (sizep != NULL)
309 size = *sizep; 309 size = *sizep;
310 lsizep = get_property(np, dc, NULL); 310 lsizep = of_get_property(np, dc, NULL);
311 if (lsizep != NULL) 311 if (lsizep != NULL)
312 lsize = *lsizep; 312 lsize = *lsizep;
313 if (sizep == 0 || lsizep == 0) 313 if (sizep == 0 || lsizep == 0)
@@ -321,10 +321,10 @@ static void __init initialize_cache_info(void)
321 321
322 size = 0; 322 size = 0;
323 lsize = cur_cpu_spec->icache_bsize; 323 lsize = cur_cpu_spec->icache_bsize;
324 sizep = get_property(np, "i-cache-size", NULL); 324 sizep = of_get_property(np, "i-cache-size", NULL);
325 if (sizep != NULL) 325 if (sizep != NULL)
326 size = *sizep; 326 size = *sizep;
327 lsizep = get_property(np, ic, NULL); 327 lsizep = of_get_property(np, ic, NULL);
328 if (lsizep != NULL) 328 if (lsizep != NULL)
329 lsize = *lsizep; 329 lsize = *lsizep;
330 if (sizep == 0 || lsizep == 0) 330 if (sizep == 0 || lsizep == 0)
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index d57818aea081..476f1d546056 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -70,7 +70,7 @@ static int __init smt_setup(void)
70 if (!options) 70 if (!options)
71 return -ENODEV; 71 return -ENODEV;
72 72
73 val = get_property(options, "ibm,smt-snooze-delay", NULL); 73 val = of_get_property(options, "ibm,smt-snooze-delay", NULL);
74 if (!smt_snooze_cmdline && val) { 74 if (!smt_snooze_cmdline && val) {
75 for_each_possible_cpu(cpu) 75 for_each_possible_cpu(cpu)
76 per_cpu(smt_snooze_delay, cpu) = *val; 76 per_cpu(smt_snooze_delay, cpu) = *val;
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index f6f0c6b07c4c..7cedef8f5f70 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -834,7 +834,7 @@ static int __init get_freq(char *name, int cells, unsigned long *val)
834 cpu = of_find_node_by_type(NULL, "cpu"); 834 cpu = of_find_node_by_type(NULL, "cpu");
835 835
836 if (cpu) { 836 if (cpu) {
837 fp = get_property(cpu, name, NULL); 837 fp = of_get_property(cpu, name, NULL);
838 if (fp) { 838 if (fp) {
839 found = 1; 839 found = 1;
840 *val = of_read_ulong(fp, cells); 840 *val = of_read_ulong(fp, cells);
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index 2968ffeafdb6..a09277a8639f 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -81,7 +81,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)
81 struct iommu_table *tbl; 81 struct iommu_table *tbl;
82 unsigned long offset, size; 82 unsigned long offset, size;
83 83
84 dma_window = get_property(dev->dev.archdata.of_node, 84 dma_window = of_get_property(dev->dev.archdata.of_node,
85 "ibm,my-dma-window", NULL); 85 "ibm,my-dma-window", NULL);
86 if (!dma_window) 86 if (!dma_window)
87 return NULL; 87 return NULL;
@@ -226,7 +226,7 @@ struct vio_dev * __devinit vio_register_device_node(struct device_node *of_node)
226 return NULL; 226 return NULL;
227 } 227 }
228 228
229 unit_address = get_property(of_node, "reg", NULL); 229 unit_address = of_get_property(of_node, "reg", NULL);
230 if (unit_address == NULL) { 230 if (unit_address == NULL) {
231 printk(KERN_WARNING "%s: node %s missing 'reg'\n", 231 printk(KERN_WARNING "%s: node %s missing 'reg'\n",
232 __FUNCTION__, 232 __FUNCTION__,
@@ -246,7 +246,7 @@ struct vio_dev * __devinit vio_register_device_node(struct device_node *of_node)
246 viodev->type = of_node->type; 246 viodev->type = of_node->type;
247 viodev->unit_address = *unit_address; 247 viodev->unit_address = *unit_address;
248 if (firmware_has_feature(FW_FEATURE_ISERIES)) { 248 if (firmware_has_feature(FW_FEATURE_ISERIES)) {
249 unit_address = get_property(of_node, 249 unit_address = of_get_property(of_node,
250 "linux,unit_address", NULL); 250 "linux,unit_address", NULL);
251 if (unit_address != NULL) 251 if (unit_address != NULL)
252 viodev->unit_address = *unit_address; 252 viodev->unit_address = *unit_address;
@@ -377,7 +377,7 @@ static int vio_hotplug(struct device *dev, char **envp, int num_envp,
377 dn = dev->archdata.of_node; 377 dn = dev->archdata.of_node;
378 if (!dn) 378 if (!dn)
379 return -ENODEV; 379 return -ENODEV;
380 cp = get_property(dn, "compatible", &length); 380 cp = of_get_property(dn, "compatible", &length);
381 if (!cp) 381 if (!cp)
382 return -ENODEV; 382 return -ENODEV;
383 383
@@ -406,12 +406,12 @@ struct bus_type vio_bus_type = {
406 * @which: The property/attribute to be extracted. 406 * @which: The property/attribute to be extracted.
407 * @length: Pointer to length of returned data size (unused if NULL). 407 * @length: Pointer to length of returned data size (unused if NULL).
408 * 408 *
409 * Calls prom.c's get_property() to return the value of the 409 * Calls prom.c's of_get_property() to return the value of the
410 * attribute specified by @which 410 * attribute specified by @which
411*/ 411*/
412const void *vio_get_attribute(struct vio_dev *vdev, char *which, int *length) 412const void *vio_get_attribute(struct vio_dev *vdev, char *which, int *length)
413{ 413{
414 return get_property(vdev->dev.archdata.of_node, which, length); 414 return of_get_property(vdev->dev.archdata.of_node, which, length);
415} 415}
416EXPORT_SYMBOL(vio_get_attribute); 416EXPORT_SYMBOL(vio_get_attribute);
417 417
@@ -443,7 +443,7 @@ struct vio_dev *vio_find_node(struct device_node *vnode)
443 char kobj_name[BUS_ID_SIZE]; 443 char kobj_name[BUS_ID_SIZE];
444 444
445 /* construct the kobject name from the device node */ 445 /* construct the kobject name from the device node */
446 unit_address = get_property(vnode, "reg", NULL); 446 unit_address = of_get_property(vnode, "reg", NULL);
447 if (!unit_address) 447 if (!unit_address)
448 return NULL; 448 return NULL;
449 snprintf(kobj_name, BUS_ID_SIZE, "%x", *unit_address); 449 snprintf(kobj_name, BUS_ID_SIZE, "%x", *unit_address);