aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/prpmc2800.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/boot/prpmc2800.c')
-rw-r--r--arch/powerpc/boot/prpmc2800.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/arch/powerpc/boot/prpmc2800.c b/arch/powerpc/boot/prpmc2800.c
index 05c3245b30d7..da31d6030482 100644
--- a/arch/powerpc/boot/prpmc2800.c
+++ b/arch/powerpc/boot/prpmc2800.c
@@ -344,20 +344,20 @@ static void prpmc2800_bridge_setup(u32 mem_size)
344 acc_bits); 344 acc_bits);
345 345
346 /* Get the cpu -> pci i/o & mem mappings from the device tree */ 346 /* Get the cpu -> pci i/o & mem mappings from the device tree */
347 devp = finddevice("/mv64x60/pci@80000000"); 347 devp = find_node_by_compatible(NULL, "marvell,mv64360-pci");
348 if (devp == NULL) 348 if (devp == NULL)
349 fatal("Error: Missing /mv64x60/pci@80000000" 349 fatal("Error: Missing marvell,mv64360-pci"
350 " device tree node\n\r"); 350 " device tree node\n\r");
351 351
352 rc = getprop(devp, "ranges", v, sizeof(v)); 352 rc = getprop(devp, "ranges", v, sizeof(v));
353 if (rc != sizeof(v)) 353 if (rc != sizeof(v))
354 fatal("Error: Can't find /mv64x60/pci@80000000/ranges" 354 fatal("Error: Can't find marvell,mv64360-pci ranges"
355 " property\n\r"); 355 " property\n\r");
356 356
357 /* Get the cpu -> pci i/o & mem mappings from the device tree */ 357 /* Get the cpu -> pci i/o & mem mappings from the device tree */
358 devp = finddevice("/mv64x60"); 358 devp = find_node_by_compatible(NULL, "marvell,mv64360");
359 if (devp == NULL) 359 if (devp == NULL)
360 fatal("Error: Missing /mv64x60 device tree node\n\r"); 360 fatal("Error: Missing marvell,mv64360 device tree node\n\r");
361 361
362 enables = in_le32((u32 *)(bridge_base + MV64x60_CPU_BAR_ENABLE)); 362 enables = in_le32((u32 *)(bridge_base + MV64x60_CPU_BAR_ENABLE));
363 enables |= 0x0007fe00; /* Disable all cpu->pci windows */ 363 enables |= 0x0007fe00; /* Disable all cpu->pci windows */
@@ -429,9 +429,9 @@ static void prpmc2800_fixups(void)
429 setprop(devp, "model", model, l); 429 setprop(devp, "model", model, l);
430 430
431 /* Set /cpus/PowerPC,7447/clock-frequency */ 431 /* Set /cpus/PowerPC,7447/clock-frequency */
432 devp = finddevice("/cpus/PowerPC,7447"); 432 devp = find_node_by_prop_value_str(NULL, "device_type", "cpu");
433 if (devp == NULL) 433 if (devp == NULL)
434 fatal("Error: Missing proper /cpus device tree node\n\r"); 434 fatal("Error: Missing proper cpu device tree node\n\r");
435 v[0] = bip->core_speed; 435 v[0] = bip->core_speed;
436 setprop(devp, "clock-frequency", &v[0], sizeof(v[0])); 436 setprop(devp, "clock-frequency", &v[0], sizeof(v[0]));
437 437
@@ -443,16 +443,17 @@ static void prpmc2800_fixups(void)
443 v[1] = bip->mem_size; 443 v[1] = bip->mem_size;
444 setprop(devp, "reg", v, sizeof(v)); 444 setprop(devp, "reg", v, sizeof(v));
445 445
446 /* Update /mv64x60/model, if this is a mv64362 */ 446 /* Update model, if this is a mv64362 */
447 if (bip->bridge_type == BRIDGE_TYPE_MV64362) { 447 if (bip->bridge_type == BRIDGE_TYPE_MV64362) {
448 devp = finddevice("/mv64x60"); 448 devp = find_node_by_compatible(NULL, "marvell,mv64360");
449 if (devp == NULL) 449 if (devp == NULL)
450 fatal("Error: Missing /mv64x60 device tree node\n\r"); 450 fatal("Error: Missing marvell,mv64360"
451 " device tree node\n\r");
451 setprop(devp, "model", "mv64362", strlen("mv64362") + 1); 452 setprop(devp, "model", "mv64362", strlen("mv64362") + 1);
452 } 453 }
453 454
454 /* Set User FLASH size */ 455 /* Set User FLASH size */
455 devp = finddevice("/mv64x60/flash@a0000000"); 456 devp = find_node_by_compatible(NULL, "direct-mapped");
456 if (devp == NULL) 457 if (devp == NULL)
457 fatal("Error: Missing User FLASH device tree node\n\r"); 458 fatal("Error: Missing User FLASH device tree node\n\r");
458 rc = getprop(devp, "reg", v, sizeof(v)); 459 rc = getprop(devp, "reg", v, sizeof(v));