aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-02-25 18:38:37 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-02-25 18:38:37 -0500
commit6ebdc661b608671e9ca572af8bb42d58108cc008 (patch)
treee99caacb964a27caeae699160fa5eddcb14526e9 /arch/powerpc/platforms
parentd7930c9ef9cc67044f5ddaac54d06ca22645a012 (diff)
parentdf0edeb59eb559be0bee53452fda2f5cc0ae133f (diff)
Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (41 commits) of: remove undefined request_OF_resource & release_OF_resource of/sparc: Remove sparc-local declaration of allnodes and devtree_lock of: move definition of of_chosen into common code. of: remove unused extern reference to devtree_lock of: put default string compare and #a/s-cell values into common header of/flattree: Don't assume HAVE_LMB of: protect linux/of.h with CONFIG_OF proc_devtree: fix THIS_MODULE without module.h of: Remove old and misplaced function declarations of/flattree: Make the kernel accept ePAPR style phandle information of/flattree: endian-convert members of boot_param_header of: assume big-endian properties, adding conversions where necessary of: use __be32 for cell value accessors of/flattree: use OF_ROOT_NODE_{SIZE,ADDR}_CELLS DEFAULT for fdt parsing of/flattree: use callback to setup initrd from /chosen proc_devtree: include linux/of.h of: make set_node_proc_entry private to proc_devtree.c of: include linux/proc_fs.h of/flattree: merge early_init_dt_scan_memory() common code of: add 'of_' prefix to machine_is_compatible() ...
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/85xx/xes_mpc85xx.c4
-rw-r--r--arch/powerpc/platforms/cell/cbe_powerbutton.c2
-rw-r--r--arch/powerpc/platforms/cell/ras.c2
-rw-r--r--arch/powerpc/platforms/cell/spu_manage.c6
-rw-r--r--arch/powerpc/platforms/pasemi/cpufreq.c4
-rw-r--r--arch/powerpc/platforms/powermac/cpufreq_32.c14
-rw-r--r--arch/powerpc/platforms/powermac/cpufreq_64.c14
-rw-r--r--arch/powerpc/platforms/powermac/feature.c2
-rw-r--r--arch/powerpc/platforms/powermac/pfunc_core.c2
-rw-r--r--arch/powerpc/platforms/powermac/smp.c12
-rw-r--r--arch/powerpc/platforms/powermac/time.c8
-rw-r--r--arch/powerpc/platforms/powermac/udbg_scc.c6
12 files changed, 38 insertions, 38 deletions
diff --git a/arch/powerpc/platforms/85xx/xes_mpc85xx.c b/arch/powerpc/platforms/85xx/xes_mpc85xx.c
index 1b426050a2f9..0125604d096e 100644
--- a/arch/powerpc/platforms/85xx/xes_mpc85xx.c
+++ b/arch/powerpc/platforms/85xx/xes_mpc85xx.c
@@ -80,8 +80,8 @@ static void xes_mpc85xx_configure_l2(void __iomem *l2_base)
80 printk(KERN_INFO "xes_mpc85xx: Enabling L2 as cache\n"); 80 printk(KERN_INFO "xes_mpc85xx: Enabling L2 as cache\n");
81 81
82 ctl = MPC85xx_L2CTL_L2E | MPC85xx_L2CTL_L2I; 82 ctl = MPC85xx_L2CTL_L2E | MPC85xx_L2CTL_L2I;
83 if (machine_is_compatible("MPC8540") || 83 if (of_machine_is_compatible("MPC8540") ||
84 machine_is_compatible("MPC8560")) 84 of_machine_is_compatible("MPC8560"))
85 /* 85 /*
86 * Assume L2 SRAM is used fully for cache, so set 86 * Assume L2 SRAM is used fully for cache, so set
87 * L2BLKSZ (bits 4:5) to match L2SIZ (bits 2:3). 87 * L2BLKSZ (bits 4:5) to match L2SIZ (bits 2:3).
diff --git a/arch/powerpc/platforms/cell/cbe_powerbutton.c b/arch/powerpc/platforms/cell/cbe_powerbutton.c
index dcddaa5fcb66..f75a4daa4ca2 100644
--- a/arch/powerpc/platforms/cell/cbe_powerbutton.c
+++ b/arch/powerpc/platforms/cell/cbe_powerbutton.c
@@ -48,7 +48,7 @@ static int __init cbe_powerbutton_init(void)
48 int ret = 0; 48 int ret = 0;
49 struct input_dev *dev; 49 struct input_dev *dev;
50 50
51 if (!machine_is_compatible("IBM,CBPLUS-1.0")) { 51 if (!of_machine_is_compatible("IBM,CBPLUS-1.0")) {
52 printk(KERN_ERR "%s: Not a cell blade.\n", __func__); 52 printk(KERN_ERR "%s: Not a cell blade.\n", __func__);
53 ret = -ENODEV; 53 ret = -ENODEV;
54 goto out; 54 goto out;
diff --git a/arch/powerpc/platforms/cell/ras.c b/arch/powerpc/platforms/cell/ras.c
index 5e0a191764fc..608fd2b584c9 100644
--- a/arch/powerpc/platforms/cell/ras.c
+++ b/arch/powerpc/platforms/cell/ras.c
@@ -255,7 +255,7 @@ static int __init cbe_sysreset_init(void)
255{ 255{
256 struct cbe_pmd_regs __iomem *regs; 256 struct cbe_pmd_regs __iomem *regs;
257 257
258 sysreset_hack = machine_is_compatible("IBM,CBPLUS-1.0"); 258 sysreset_hack = of_machine_is_compatible("IBM,CBPLUS-1.0");
259 if (!sysreset_hack) 259 if (!sysreset_hack)
260 return 0; 260 return 0;
261 261
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c
index 4c506c1463cd..891f18e337a2 100644
--- a/arch/powerpc/platforms/cell/spu_manage.c
+++ b/arch/powerpc/platforms/cell/spu_manage.c
@@ -457,7 +457,7 @@ neighbour_spu(int cbe, struct device_node *target, struct device_node *avoid)
457 continue; 457 continue;
458 vic_handles = of_get_property(spu_dn, "vicinity", &lenp); 458 vic_handles = of_get_property(spu_dn, "vicinity", &lenp);
459 for (i=0; i < (lenp / sizeof(phandle)); i++) { 459 for (i=0; i < (lenp / sizeof(phandle)); i++) {
460 if (vic_handles[i] == target->linux_phandle) 460 if (vic_handles[i] == target->phandle)
461 return spu; 461 return spu;
462 } 462 }
463 } 463 }
@@ -499,7 +499,7 @@ static void init_affinity_node(int cbe)
499 499
500 if (strcmp(name, "spe") == 0) { 500 if (strcmp(name, "spe") == 0) {
501 spu = devnode_spu(cbe, vic_dn); 501 spu = devnode_spu(cbe, vic_dn);
502 avoid_ph = last_spu_dn->linux_phandle; 502 avoid_ph = last_spu_dn->phandle;
503 } else { 503 } else {
504 /* 504 /*
505 * "mic-tm" and "bif0" nodes do not have 505 * "mic-tm" and "bif0" nodes do not have
@@ -514,7 +514,7 @@ static void init_affinity_node(int cbe)
514 last_spu->has_mem_affinity = 1; 514 last_spu->has_mem_affinity = 1;
515 spu->has_mem_affinity = 1; 515 spu->has_mem_affinity = 1;
516 } 516 }
517 avoid_ph = vic_dn->linux_phandle; 517 avoid_ph = vic_dn->phandle;
518 } 518 }
519 519
520 list_add_tail(&spu->aff_list, &last_spu->aff_list); 520 list_add_tail(&spu->aff_list, &last_spu->aff_list);
diff --git a/arch/powerpc/platforms/pasemi/cpufreq.c b/arch/powerpc/platforms/pasemi/cpufreq.c
index be2527a516ea..d35e0520abf0 100644
--- a/arch/powerpc/platforms/pasemi/cpufreq.c
+++ b/arch/powerpc/platforms/pasemi/cpufreq.c
@@ -304,8 +304,8 @@ static struct cpufreq_driver pas_cpufreq_driver = {
304 304
305static int __init pas_cpufreq_init(void) 305static int __init pas_cpufreq_init(void)
306{ 306{
307 if (!machine_is_compatible("PA6T-1682M") && 307 if (!of_machine_is_compatible("PA6T-1682M") &&
308 !machine_is_compatible("pasemi,pwrficient")) 308 !of_machine_is_compatible("pasemi,pwrficient"))
309 return -ENODEV; 309 return -ENODEV;
310 310
311 return cpufreq_register_driver(&pas_cpufreq_driver); 311 return cpufreq_register_driver(&pas_cpufreq_driver);
diff --git a/arch/powerpc/platforms/powermac/cpufreq_32.c b/arch/powerpc/platforms/powermac/cpufreq_32.c
index 08d94e4cedd3..d4f127d18141 100644
--- a/arch/powerpc/platforms/powermac/cpufreq_32.c
+++ b/arch/powerpc/platforms/powermac/cpufreq_32.c
@@ -657,31 +657,31 @@ static int __init pmac_cpufreq_setup(void)
657 cur_freq = (*value) / 1000; 657 cur_freq = (*value) / 1000;
658 658
659 /* Check for 7447A based MacRISC3 */ 659 /* Check for 7447A based MacRISC3 */
660 if (machine_is_compatible("MacRISC3") && 660 if (of_machine_is_compatible("MacRISC3") &&
661 of_get_property(cpunode, "dynamic-power-step", NULL) && 661 of_get_property(cpunode, "dynamic-power-step", NULL) &&
662 PVR_VER(mfspr(SPRN_PVR)) == 0x8003) { 662 PVR_VER(mfspr(SPRN_PVR)) == 0x8003) {
663 pmac_cpufreq_init_7447A(cpunode); 663 pmac_cpufreq_init_7447A(cpunode);
664 /* Check for other MacRISC3 machines */ 664 /* Check for other MacRISC3 machines */
665 } else if (machine_is_compatible("PowerBook3,4") || 665 } else if (of_machine_is_compatible("PowerBook3,4") ||
666 machine_is_compatible("PowerBook3,5") || 666 of_machine_is_compatible("PowerBook3,5") ||
667 machine_is_compatible("MacRISC3")) { 667 of_machine_is_compatible("MacRISC3")) {
668 pmac_cpufreq_init_MacRISC3(cpunode); 668 pmac_cpufreq_init_MacRISC3(cpunode);
669 /* Else check for iBook2 500/600 */ 669 /* Else check for iBook2 500/600 */
670 } else if (machine_is_compatible("PowerBook4,1")) { 670 } else if (of_machine_is_compatible("PowerBook4,1")) {
671 hi_freq = cur_freq; 671 hi_freq = cur_freq;
672 low_freq = 400000; 672 low_freq = 400000;
673 set_speed_proc = pmu_set_cpu_speed; 673 set_speed_proc = pmu_set_cpu_speed;
674 is_pmu_based = 1; 674 is_pmu_based = 1;
675 } 675 }
676 /* Else check for TiPb 550 */ 676 /* Else check for TiPb 550 */
677 else if (machine_is_compatible("PowerBook3,3") && cur_freq == 550000) { 677 else if (of_machine_is_compatible("PowerBook3,3") && cur_freq == 550000) {
678 hi_freq = cur_freq; 678 hi_freq = cur_freq;
679 low_freq = 500000; 679 low_freq = 500000;
680 set_speed_proc = pmu_set_cpu_speed; 680 set_speed_proc = pmu_set_cpu_speed;
681 is_pmu_based = 1; 681 is_pmu_based = 1;
682 } 682 }
683 /* Else check for TiPb 400 & 500 */ 683 /* Else check for TiPb 400 & 500 */
684 else if (machine_is_compatible("PowerBook3,2")) { 684 else if (of_machine_is_compatible("PowerBook3,2")) {
685 /* We only know about the 400 MHz and the 500Mhz model 685 /* We only know about the 400 MHz and the 500Mhz model
686 * they both have 300 MHz as low frequency 686 * they both have 300 MHz as low frequency
687 */ 687 */
diff --git a/arch/powerpc/platforms/powermac/cpufreq_64.c b/arch/powerpc/platforms/powermac/cpufreq_64.c
index 708c75133377..3ed288e68ec4 100644
--- a/arch/powerpc/platforms/powermac/cpufreq_64.c
+++ b/arch/powerpc/platforms/powermac/cpufreq_64.c
@@ -398,11 +398,11 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpus)
398 int rc = -ENODEV; 398 int rc = -ENODEV;
399 399
400 /* Check supported platforms */ 400 /* Check supported platforms */
401 if (machine_is_compatible("PowerMac8,1") || 401 if (of_machine_is_compatible("PowerMac8,1") ||
402 machine_is_compatible("PowerMac8,2") || 402 of_machine_is_compatible("PowerMac8,2") ||
403 machine_is_compatible("PowerMac9,1")) 403 of_machine_is_compatible("PowerMac9,1"))
404 use_volts_smu = 1; 404 use_volts_smu = 1;
405 else if (machine_is_compatible("PowerMac11,2")) 405 else if (of_machine_is_compatible("PowerMac11,2"))
406 use_volts_vdnap = 1; 406 use_volts_vdnap = 1;
407 else 407 else
408 return -ENODEV; 408 return -ENODEV;
@@ -729,9 +729,9 @@ static int __init g5_cpufreq_init(void)
729 return -ENODEV; 729 return -ENODEV;
730 } 730 }
731 731
732 if (machine_is_compatible("PowerMac7,2") || 732 if (of_machine_is_compatible("PowerMac7,2") ||
733 machine_is_compatible("PowerMac7,3") || 733 of_machine_is_compatible("PowerMac7,3") ||
734 machine_is_compatible("RackMac3,1")) 734 of_machine_is_compatible("RackMac3,1"))
735 rc = g5_pm72_cpufreq_init(cpus); 735 rc = g5_pm72_cpufreq_init(cpus);
736#ifdef CONFIG_PMAC_SMU 736#ifdef CONFIG_PMAC_SMU
737 else 737 else
diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c
index fbc9bbd74dbd..33e815f4466c 100644
--- a/arch/powerpc/platforms/powermac/feature.c
+++ b/arch/powerpc/platforms/powermac/feature.c
@@ -2426,7 +2426,7 @@ static int __init probe_motherboard(void)
2426 } 2426 }
2427 } 2427 }
2428 for(i=0; i<ARRAY_SIZE(pmac_mb_defs); i++) { 2428 for(i=0; i<ARRAY_SIZE(pmac_mb_defs); i++) {
2429 if (machine_is_compatible(pmac_mb_defs[i].model_string)) { 2429 if (of_machine_is_compatible(pmac_mb_defs[i].model_string)) {
2430 pmac_mb = pmac_mb_defs[i]; 2430 pmac_mb = pmac_mb_defs[i];
2431 goto found; 2431 goto found;
2432 } 2432 }
diff --git a/arch/powerpc/platforms/powermac/pfunc_core.c b/arch/powerpc/platforms/powermac/pfunc_core.c
index 96d5ce50364e..ede49e78a8da 100644
--- a/arch/powerpc/platforms/powermac/pfunc_core.c
+++ b/arch/powerpc/platforms/powermac/pfunc_core.c
@@ -842,7 +842,7 @@ struct pmf_function *__pmf_find_function(struct device_node *target,
842 list_for_each_entry(func, &dev->functions, link) { 842 list_for_each_entry(func, &dev->functions, link) {
843 if (name && strcmp(name, func->name)) 843 if (name && strcmp(name, func->name))
844 continue; 844 continue;
845 if (func->phandle && target->node != func->phandle) 845 if (func->phandle && target->phandle != func->phandle)
846 continue; 846 continue;
847 if ((func->flags & flags) == 0) 847 if ((func->flags & flags) == 0)
848 continue; 848 continue;
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index b40c22d697f0..6898e8241cd0 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -693,9 +693,9 @@ static void __init smp_core99_setup(int ncpus)
693#ifdef CONFIG_PPC64 693#ifdef CONFIG_PPC64
694 694
695 /* i2c based HW sync on some G5s */ 695 /* i2c based HW sync on some G5s */
696 if (machine_is_compatible("PowerMac7,2") || 696 if (of_machine_is_compatible("PowerMac7,2") ||
697 machine_is_compatible("PowerMac7,3") || 697 of_machine_is_compatible("PowerMac7,3") ||
698 machine_is_compatible("RackMac3,1")) 698 of_machine_is_compatible("RackMac3,1"))
699 smp_core99_setup_i2c_hwsync(ncpus); 699 smp_core99_setup_i2c_hwsync(ncpus);
700 700
701 /* pfunc based HW sync on recent G5s */ 701 /* pfunc based HW sync on recent G5s */
@@ -713,7 +713,7 @@ static void __init smp_core99_setup(int ncpus)
713#else /* CONFIG_PPC64 */ 713#else /* CONFIG_PPC64 */
714 714
715 /* GPIO based HW sync on ppc32 Core99 */ 715 /* GPIO based HW sync on ppc32 Core99 */
716 if (pmac_tb_freeze == NULL && !machine_is_compatible("MacRISC4")) { 716 if (pmac_tb_freeze == NULL && !of_machine_is_compatible("MacRISC4")) {
717 struct device_node *cpu; 717 struct device_node *cpu;
718 const u32 *tbprop = NULL; 718 const u32 *tbprop = NULL;
719 719
@@ -750,7 +750,7 @@ static void __init smp_core99_setup(int ncpus)
750#endif 750#endif
751 751
752 /* 32 bits SMP can't NAP */ 752 /* 32 bits SMP can't NAP */
753 if (!machine_is_compatible("MacRISC4")) 753 if (!of_machine_is_compatible("MacRISC4"))
754 powersave_nap = 0; 754 powersave_nap = 0;
755} 755}
756 756
@@ -852,7 +852,7 @@ static void __devinit smp_core99_setup_cpu(int cpu_nr)
852 /* If we didn't start the second CPU, we must take 852 /* If we didn't start the second CPU, we must take
853 * it off the bus 853 * it off the bus
854 */ 854 */
855 if (machine_is_compatible("MacRISC4") && 855 if (of_machine_is_compatible("MacRISC4") &&
856 num_online_cpus() < 2) 856 num_online_cpus() < 2)
857 g5_phy_disable_cpu1(); 857 g5_phy_disable_cpu1();
858#endif /* CONFIG_PPC64 */ 858#endif /* CONFIG_PPC64 */
diff --git a/arch/powerpc/platforms/powermac/time.c b/arch/powerpc/platforms/powermac/time.c
index 1810e4226e56..48211ca134c3 100644
--- a/arch/powerpc/platforms/powermac/time.c
+++ b/arch/powerpc/platforms/powermac/time.c
@@ -317,9 +317,9 @@ void __init pmac_calibrate_decr(void)
317 * calibration. That's better since the VIA itself seems 317 * calibration. That's better since the VIA itself seems
318 * to be slightly off. --BenH 318 * to be slightly off. --BenH
319 */ 319 */
320 if (!machine_is_compatible("MacRISC2") && 320 if (!of_machine_is_compatible("MacRISC2") &&
321 !machine_is_compatible("MacRISC3") && 321 !of_machine_is_compatible("MacRISC3") &&
322 !machine_is_compatible("MacRISC4")) 322 !of_machine_is_compatible("MacRISC4"))
323 if (via_calibrate_decr()) 323 if (via_calibrate_decr())
324 return; 324 return;
325 325
@@ -328,7 +328,7 @@ void __init pmac_calibrate_decr(void)
328 * probably implement calibration based on the KL timer on these 328 * probably implement calibration based on the KL timer on these
329 * machines anyway... -BenH 329 * machines anyway... -BenH
330 */ 330 */
331 if (machine_is_compatible("PowerMac3,5")) 331 if (of_machine_is_compatible("PowerMac3,5"))
332 if (via_calibrate_decr()) 332 if (via_calibrate_decr())
333 return; 333 return;
334#endif 334#endif
diff --git a/arch/powerpc/platforms/powermac/udbg_scc.c b/arch/powerpc/platforms/powermac/udbg_scc.c
index 9490157da62e..d83135a9830e 100644
--- a/arch/powerpc/platforms/powermac/udbg_scc.c
+++ b/arch/powerpc/platforms/powermac/udbg_scc.c
@@ -132,9 +132,9 @@ void udbg_scc_init(int force_scc)
132 scc_inittab[1] = in_8(sccc); 132 scc_inittab[1] = in_8(sccc);
133 out_8(sccc, 12); 133 out_8(sccc, 12);
134 scc_inittab[3] = in_8(sccc); 134 scc_inittab[3] = in_8(sccc);
135 } else if (machine_is_compatible("RackMac1,1") 135 } else if (of_machine_is_compatible("RackMac1,1")
136 || machine_is_compatible("RackMac1,2") 136 || of_machine_is_compatible("RackMac1,2")
137 || machine_is_compatible("MacRISC4")) { 137 || of_machine_is_compatible("MacRISC4")) {
138 /* Xserves and G5s default to 57600 */ 138 /* Xserves and G5s default to 57600 */
139 scc_inittab[1] = 0; 139 scc_inittab[1] = 0;
140 scc_inittab[3] = 0; 140 scc_inittab[3] = 0;