aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/chrp
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/chrp
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/chrp')
-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
3 files changed, 16 insertions, 14 deletions
diff --git a/arch/powerpc/platforms/chrp/nvram.c b/arch/powerpc/platforms/chrp/nvram.c
index 0dd4a64757d..8efd4244701 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 e2f870800e5..b23e39796a0 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 044ad3f1e04..05d1bc0c891 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