aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powermac
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/powermac')
-rw-r--r--arch/powerpc/platforms/powermac/cpufreq_64.c8
-rw-r--r--arch/powerpc/platforms/powermac/feature.c26
-rw-r--r--arch/powerpc/platforms/powermac/low_i2c.c2
-rw-r--r--arch/powerpc/platforms/powermac/nvram.c4
-rw-r--r--arch/powerpc/platforms/powermac/pci.c30
-rw-r--r--arch/powerpc/platforms/powermac/pic.c2
-rw-r--r--arch/powerpc/platforms/powermac/setup.c121
-rw-r--r--arch/powerpc/platforms/powermac/smp.c19
8 files changed, 101 insertions, 111 deletions
diff --git a/arch/powerpc/platforms/powermac/cpufreq_64.c b/arch/powerpc/platforms/powermac/cpufreq_64.c
index 567d5523b690..00f50298c342 100644
--- a/arch/powerpc/platforms/powermac/cpufreq_64.c
+++ b/arch/powerpc/platforms/powermac/cpufreq_64.c
@@ -357,13 +357,13 @@ static unsigned int g5_cpufreq_get_speed(unsigned int cpu)
357 357
358static int g5_cpufreq_cpu_init(struct cpufreq_policy *policy) 358static int g5_cpufreq_cpu_init(struct cpufreq_policy *policy)
359{ 359{
360 if (policy->cpu != 0)
361 return -ENODEV;
362
363 policy->governor = CPUFREQ_DEFAULT_GOVERNOR; 360 policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
364 policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; 361 policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
365 policy->cur = g5_cpu_freqs[g5_query_freq()].frequency; 362 policy->cur = g5_cpu_freqs[g5_query_freq()].frequency;
366 policy->cpus = cpu_possible_map; 363 /* secondary CPUs are tied to the primary one by the
364 * cpufreq core if in the secondary policy we tell it that
365 * it actually must be one policy together with all others. */
366 policy->cpus = cpu_online_map;
367 cpufreq_frequency_table_get_attr(g5_cpu_freqs, policy->cpu); 367 cpufreq_frequency_table_get_attr(g5_cpu_freqs, policy->cpu);
368 368
369 return cpufreq_frequency_table_cpuinfo(policy, 369 return cpufreq_frequency_table_cpuinfo(policy,
diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c
index 52cfdd86c928..f29705f8047d 100644
--- a/arch/powerpc/platforms/powermac/feature.c
+++ b/arch/powerpc/platforms/powermac/feature.c
@@ -1418,7 +1418,7 @@ static long g5_eth_phy_reset(struct device_node *node, long param, long value)
1418 phy = of_get_next_child(node, NULL); 1418 phy = of_get_next_child(node, NULL);
1419 if (!phy) 1419 if (!phy)
1420 return -ENODEV; 1420 return -ENODEV;
1421 need_reset = device_is_compatible(phy, "B5221"); 1421 need_reset = of_device_is_compatible(phy, "B5221");
1422 of_node_put(phy); 1422 of_node_put(phy);
1423 if (!need_reset) 1423 if (!need_reset)
1424 return 0; 1424 return 0;
@@ -2624,7 +2624,7 @@ static void __init probe_one_macio(const char *name, const char *compat, int typ
2624 for (node = NULL; (node = of_find_node_by_name(node, name)) != NULL;) { 2624 for (node = NULL; (node = of_find_node_by_name(node, name)) != NULL;) {
2625 if (!compat) 2625 if (!compat)
2626 break; 2626 break;
2627 if (device_is_compatible(node, compat)) 2627 if (of_device_is_compatible(node, compat))
2628 break; 2628 break;
2629 } 2629 }
2630 if (!node) 2630 if (!node)
@@ -2728,7 +2728,7 @@ initial_serial_shutdown(struct device_node *np)
2728 conn = of_get_property(np, "AAPL,connector", &len); 2728 conn = of_get_property(np, "AAPL,connector", &len);
2729 if (conn && (strcmp(conn, "infrared") == 0)) 2729 if (conn && (strcmp(conn, "infrared") == 0))
2730 port_type = PMAC_SCC_IRDA; 2730 port_type = PMAC_SCC_IRDA;
2731 else if (device_is_compatible(np, "cobalt")) 2731 else if (of_device_is_compatible(np, "cobalt"))
2732 modem = 1; 2732 modem = 1;
2733 else if (slots && slots->count > 0) { 2733 else if (slots && slots->count > 0) {
2734 if (strcmp(slots->name, "IrDA") == 0) 2734 if (strcmp(slots->name, "IrDA") == 0)
@@ -2787,7 +2787,7 @@ set_initial_features(void)
2787 */ 2787 */
2788 np = of_find_node_by_name(NULL, "ethernet"); 2788 np = of_find_node_by_name(NULL, "ethernet");
2789 while(np) { 2789 while(np) {
2790 if (device_is_compatible(np, "K2-GMAC")) 2790 if (of_device_is_compatible(np, "K2-GMAC"))
2791 g5_gmac_enable(np, 0, 1); 2791 g5_gmac_enable(np, 0, 1);
2792 np = of_find_node_by_name(np, "ethernet"); 2792 np = of_find_node_by_name(np, "ethernet");
2793 } 2793 }
@@ -2799,7 +2799,7 @@ set_initial_features(void)
2799 */ 2799 */
2800 np = of_find_node_by_name(NULL, "firewire"); 2800 np = of_find_node_by_name(NULL, "firewire");
2801 while(np) { 2801 while(np) {
2802 if (device_is_compatible(np, "pci106b,5811")) { 2802 if (of_device_is_compatible(np, "pci106b,5811")) {
2803 macio_chips[0].flags |= MACIO_FLAG_FW_SUPPORTED; 2803 macio_chips[0].flags |= MACIO_FLAG_FW_SUPPORTED;
2804 g5_fw_enable(np, 0, 1); 2804 g5_fw_enable(np, 0, 1);
2805 } 2805 }
@@ -2817,8 +2817,8 @@ set_initial_features(void)
2817 np = of_find_node_by_name(NULL, "ethernet"); 2817 np = of_find_node_by_name(NULL, "ethernet");
2818 while(np) { 2818 while(np) {
2819 if (np->parent 2819 if (np->parent
2820 && device_is_compatible(np->parent, "uni-north") 2820 && of_device_is_compatible(np->parent, "uni-north")
2821 && device_is_compatible(np, "gmac")) 2821 && of_device_is_compatible(np, "gmac"))
2822 core99_gmac_enable(np, 0, 1); 2822 core99_gmac_enable(np, 0, 1);
2823 np = of_find_node_by_name(np, "ethernet"); 2823 np = of_find_node_by_name(np, "ethernet");
2824 } 2824 }
@@ -2831,10 +2831,10 @@ set_initial_features(void)
2831 np = of_find_node_by_name(NULL, "firewire"); 2831 np = of_find_node_by_name(NULL, "firewire");
2832 while(np) { 2832 while(np) {
2833 if (np->parent 2833 if (np->parent
2834 && device_is_compatible(np->parent, "uni-north") 2834 && of_device_is_compatible(np->parent, "uni-north")
2835 && (device_is_compatible(np, "pci106b,18") || 2835 && (of_device_is_compatible(np, "pci106b,18") ||
2836 device_is_compatible(np, "pci106b,30") || 2836 of_device_is_compatible(np, "pci106b,30") ||
2837 device_is_compatible(np, "pci11c1,5811"))) { 2837 of_device_is_compatible(np, "pci11c1,5811"))) {
2838 macio_chips[0].flags |= MACIO_FLAG_FW_SUPPORTED; 2838 macio_chips[0].flags |= MACIO_FLAG_FW_SUPPORTED;
2839 core99_firewire_enable(np, 0, 1); 2839 core99_firewire_enable(np, 0, 1);
2840 } 2840 }
@@ -2845,8 +2845,8 @@ set_initial_features(void)
2845 np = of_find_node_by_name(NULL, "ata-6"); 2845 np = of_find_node_by_name(NULL, "ata-6");
2846 while(np) { 2846 while(np) {
2847 if (np->parent 2847 if (np->parent
2848 && device_is_compatible(np->parent, "uni-north") 2848 && of_device_is_compatible(np->parent, "uni-north")
2849 && device_is_compatible(np, "kauai-ata")) { 2849 && of_device_is_compatible(np, "kauai-ata")) {
2850 core99_ata100_enable(np, 1); 2850 core99_ata100_enable(np, 1);
2851 } 2851 }
2852 np = of_find_node_by_name(np, "ata-6"); 2852 np = of_find_node_by_name(np, "ata-6");
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c
index 5430e146b3e9..3f507ab9c5e5 100644
--- a/arch/powerpc/platforms/powermac/low_i2c.c
+++ b/arch/powerpc/platforms/powermac/low_i2c.c
@@ -1207,7 +1207,7 @@ static void pmac_i2c_devscan(void (*callback)(struct device_node *dev,
1207 if (strcmp(np->name, p->name)) 1207 if (strcmp(np->name, p->name))
1208 continue; 1208 continue;
1209 if (p->compatible && 1209 if (p->compatible &&
1210 !device_is_compatible(np, p->compatible)) 1210 !of_device_is_compatible(np, p->compatible))
1211 continue; 1211 continue;
1212 if (p->quirks & pmac_i2c_quirk_skip) 1212 if (p->quirks & pmac_i2c_quirk_skip)
1213 break; 1213 break;
diff --git a/arch/powerpc/platforms/powermac/nvram.c b/arch/powerpc/platforms/powermac/nvram.c
index 692945c14919..c6f0f9e738e5 100644
--- a/arch/powerpc/platforms/powermac/nvram.c
+++ b/arch/powerpc/platforms/powermac/nvram.c
@@ -553,7 +553,7 @@ static int __init core99_nvram_setup(struct device_node *dp, unsigned long addr)
553 * identify the chip using flash id commands and base ourselves on 553 * identify the chip using flash id commands and base ourselves on
554 * a list of known chips IDs 554 * a list of known chips IDs
555 */ 555 */
556 if (device_is_compatible(dp, "amd-0137")) { 556 if (of_device_is_compatible(dp, "amd-0137")) {
557 core99_erase_bank = amd_erase_bank; 557 core99_erase_bank = amd_erase_bank;
558 core99_write_bank = amd_write_bank; 558 core99_write_bank = amd_write_bank;
559 } else { 559 } else {
@@ -588,7 +588,7 @@ int __init pmac_nvram_init(void)
588 } 588 }
589 } 589 }
590 590
591 is_core_99 = device_is_compatible(dp, "nvram,flash"); 591 is_core_99 = of_device_is_compatible(dp, "nvram,flash");
592 if (is_core_99) { 592 if (is_core_99) {
593 err = core99_nvram_setup(dp, r1.start); 593 err = core99_nvram_setup(dp, r1.start);
594 goto bail; 594 goto bail;
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c
index 22c4ae4c6934..c4af9e21ac93 100644
--- a/arch/powerpc/platforms/powermac/pci.c
+++ b/arch/powerpc/platforms/powermac/pci.c
@@ -934,15 +934,15 @@ static int __init add_bridge(struct device_node *dev)
934 934
935 /* 64 bits only bridges */ 935 /* 64 bits only bridges */
936#ifdef CONFIG_PPC64 936#ifdef CONFIG_PPC64
937 if (device_is_compatible(dev, "u3-agp")) { 937 if (of_device_is_compatible(dev, "u3-agp")) {
938 setup_u3_agp(hose); 938 setup_u3_agp(hose);
939 disp_name = "U3-AGP"; 939 disp_name = "U3-AGP";
940 primary = 0; 940 primary = 0;
941 } else if (device_is_compatible(dev, "u3-ht")) { 941 } else if (of_device_is_compatible(dev, "u3-ht")) {
942 setup_u3_ht(hose); 942 setup_u3_ht(hose);
943 disp_name = "U3-HT"; 943 disp_name = "U3-HT";
944 primary = 1; 944 primary = 1;
945 } else if (device_is_compatible(dev, "u4-pcie")) { 945 } else if (of_device_is_compatible(dev, "u4-pcie")) {
946 setup_u4_pcie(hose); 946 setup_u4_pcie(hose);
947 disp_name = "U4-PCIE"; 947 disp_name = "U4-PCIE";
948 primary = 0; 948 primary = 0;
@@ -953,7 +953,7 @@ static int __init add_bridge(struct device_node *dev)
953 953
954 /* 32 bits only bridges */ 954 /* 32 bits only bridges */
955#ifdef CONFIG_PPC32 955#ifdef CONFIG_PPC32
956 if (device_is_compatible(dev, "uni-north")) { 956 if (of_device_is_compatible(dev, "uni-north")) {
957 primary = setup_uninorth(hose, &rsrc); 957 primary = setup_uninorth(hose, &rsrc);
958 disp_name = "UniNorth"; 958 disp_name = "UniNorth";
959 } else if (strcmp(dev->name, "pci") == 0) { 959 } else if (strcmp(dev->name, "pci") == 0) {
@@ -1129,21 +1129,21 @@ pmac_pci_enable_device_hook(struct pci_dev *dev, int initial)
1129 return 0; 1129 return 0;
1130 1130
1131 uninorth_child = node->parent && 1131 uninorth_child = node->parent &&
1132 device_is_compatible(node->parent, "uni-north"); 1132 of_device_is_compatible(node->parent, "uni-north");
1133 1133
1134 /* Firewire & GMAC were disabled after PCI probe, the driver is 1134 /* Firewire & GMAC were disabled after PCI probe, the driver is
1135 * claiming them, we must re-enable them now. 1135 * claiming them, we must re-enable them now.
1136 */ 1136 */
1137 if (uninorth_child && !strcmp(node->name, "firewire") && 1137 if (uninorth_child && !strcmp(node->name, "firewire") &&
1138 (device_is_compatible(node, "pci106b,18") || 1138 (of_device_is_compatible(node, "pci106b,18") ||
1139 device_is_compatible(node, "pci106b,30") || 1139 of_device_is_compatible(node, "pci106b,30") ||
1140 device_is_compatible(node, "pci11c1,5811"))) { 1140 of_device_is_compatible(node, "pci11c1,5811"))) {
1141 pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, node, 0, 1); 1141 pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, node, 0, 1);
1142 pmac_call_feature(PMAC_FTR_1394_ENABLE, node, 0, 1); 1142 pmac_call_feature(PMAC_FTR_1394_ENABLE, node, 0, 1);
1143 updatecfg = 1; 1143 updatecfg = 1;
1144 } 1144 }
1145 if (uninorth_child && !strcmp(node->name, "ethernet") && 1145 if (uninorth_child && !strcmp(node->name, "ethernet") &&
1146 device_is_compatible(node, "gmac")) { 1146 of_device_is_compatible(node, "gmac")) {
1147 pmac_call_feature(PMAC_FTR_GMAC_ENABLE, node, 0, 1); 1147 pmac_call_feature(PMAC_FTR_GMAC_ENABLE, node, 0, 1);
1148 updatecfg = 1; 1148 updatecfg = 1;
1149 } 1149 }
@@ -1203,18 +1203,18 @@ void __init pmac_pcibios_after_init(void)
1203#endif /* CONFIG_BLK_DEV_IDE */ 1203#endif /* CONFIG_BLK_DEV_IDE */
1204 1204
1205 for_each_node_by_name(nd, "firewire") { 1205 for_each_node_by_name(nd, "firewire") {
1206 if (nd->parent && (device_is_compatible(nd, "pci106b,18") || 1206 if (nd->parent && (of_device_is_compatible(nd, "pci106b,18") ||
1207 device_is_compatible(nd, "pci106b,30") || 1207 of_device_is_compatible(nd, "pci106b,30") ||
1208 device_is_compatible(nd, "pci11c1,5811")) 1208 of_device_is_compatible(nd, "pci11c1,5811"))
1209 && device_is_compatible(nd->parent, "uni-north")) { 1209 && of_device_is_compatible(nd->parent, "uni-north")) {
1210 pmac_call_feature(PMAC_FTR_1394_ENABLE, nd, 0, 0); 1210 pmac_call_feature(PMAC_FTR_1394_ENABLE, nd, 0, 0);
1211 pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, nd, 0, 0); 1211 pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, nd, 0, 0);
1212 } 1212 }
1213 } 1213 }
1214 of_node_put(nd); 1214 of_node_put(nd);
1215 for_each_node_by_name(nd, "ethernet") { 1215 for_each_node_by_name(nd, "ethernet") {
1216 if (nd->parent && device_is_compatible(nd, "gmac") 1216 if (nd->parent && of_device_is_compatible(nd, "gmac")
1217 && device_is_compatible(nd->parent, "uni-north")) 1217 && of_device_is_compatible(nd->parent, "uni-north"))
1218 pmac_call_feature(PMAC_FTR_GMAC_ENABLE, nd, 0, 0); 1218 pmac_call_feature(PMAC_FTR_GMAC_ENABLE, nd, 0, 0);
1219 } 1219 }
1220 of_node_put(nd); 1220 of_node_put(nd);
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
index ae5097ac0378..87cd6805171a 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -364,7 +364,7 @@ static void __init pmac_pic_probe_oldstyle(void)
364 slave = of_find_node_by_name(master, "mac-io"); 364 slave = of_find_node_by_name(master, "mac-io");
365 365
366 /* Check ordering of master & slave */ 366 /* Check ordering of master & slave */
367 if (device_is_compatible(master, "gatwick")) { 367 if (of_device_is_compatible(master, "gatwick")) {
368 struct device_node *tmp; 368 struct device_node *tmp;
369 BUG_ON(slave == NULL); 369 BUG_ON(slave == NULL);
370 tmp = master; 370 tmp = master;
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index b820cabac697..a410bc76a8a8 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -439,76 +439,14 @@ static void __init find_boot_device(void)
439#endif 439#endif
440} 440}
441 441
442/* TODO: Merge the suspend-to-ram with the common code !!!
443 * currently, this is a stub implementation for suspend-to-disk
444 * only
445 */
446
447#ifdef CONFIG_SOFTWARE_SUSPEND
448
449static int pmac_pm_prepare(suspend_state_t state)
450{
451 printk(KERN_DEBUG "%s(%d)\n", __FUNCTION__, state);
452
453 return 0;
454}
455
456static int pmac_pm_enter(suspend_state_t state)
457{
458 printk(KERN_DEBUG "%s(%d)\n", __FUNCTION__, state);
459
460 /* Giveup the lazy FPU & vec so we don't have to back them
461 * up from the low level code
462 */
463 enable_kernel_fp();
464
465#ifdef CONFIG_ALTIVEC
466 if (cur_cpu_spec->cpu_features & CPU_FTR_ALTIVEC)
467 enable_kernel_altivec();
468#endif /* CONFIG_ALTIVEC */
469
470 return 0;
471}
472
473static int pmac_pm_finish(suspend_state_t state)
474{
475 printk(KERN_DEBUG "%s(%d)\n", __FUNCTION__, state);
476
477 /* Restore userland MMU context */
478 set_context(current->active_mm->context.id, current->active_mm->pgd);
479
480 return 0;
481}
482
483static int pmac_pm_valid(suspend_state_t state)
484{
485 switch (state) {
486 case PM_SUSPEND_DISK:
487 return 1;
488 /* can't do any other states via generic mechanism yet */
489 default:
490 return 0;
491 }
492}
493
494static struct pm_ops pmac_pm_ops = {
495 .pm_disk_mode = PM_DISK_SHUTDOWN,
496 .prepare = pmac_pm_prepare,
497 .enter = pmac_pm_enter,
498 .finish = pmac_pm_finish,
499 .valid = pmac_pm_valid,
500};
501
502#endif /* CONFIG_SOFTWARE_SUSPEND */
503
504static int initializing = 1; 442static int initializing = 1;
505 443
506static int pmac_late_init(void) 444static int pmac_late_init(void)
507{ 445{
508 initializing = 0; 446 initializing = 0;
509#ifdef CONFIG_SOFTWARE_SUSPEND 447 /* this is udbg (which is __init) and we can later use it during
510 pm_set_ops(&pmac_pm_ops); 448 * cpu hotplug (in smp_core99_kick_cpu) */
511#endif /* CONFIG_SOFTWARE_SUSPEND */ 449 ppc_md.progress = NULL;
512 return 0; 450 return 0;
513} 451}
514 452
@@ -721,12 +659,57 @@ static int pmac_pci_probe_mode(struct pci_bus *bus)
721 /* We need to use normal PCI probing for the AGP bus, 659 /* We need to use normal PCI probing for the AGP bus,
722 * since the device for the AGP bridge isn't in the tree. 660 * since the device for the AGP bridge isn't in the tree.
723 */ 661 */
724 if (bus->self == NULL && (device_is_compatible(node, "u3-agp") || 662 if (bus->self == NULL && (of_device_is_compatible(node, "u3-agp") ||
725 device_is_compatible(node, "u4-pcie"))) 663 of_device_is_compatible(node, "u4-pcie")))
726 return PCI_PROBE_NORMAL; 664 return PCI_PROBE_NORMAL;
727 return PCI_PROBE_DEVTREE; 665 return PCI_PROBE_DEVTREE;
728} 666}
729#endif 667
668#ifdef CONFIG_HOTPLUG_CPU
669/* access per cpu vars from generic smp.c */
670DECLARE_PER_CPU(int, cpu_state);
671
672static void pmac_cpu_die(void)
673{
674 /*
675 * turn off as much as possible, we'll be
676 * kicked out as this will only be invoked
677 * on core99 platforms for now ...
678 */
679
680 printk(KERN_INFO "CPU#%d offline\n", smp_processor_id());
681 __get_cpu_var(cpu_state) = CPU_DEAD;
682 smp_wmb();
683
684 /*
685 * during the path that leads here preemption is disabled,
686 * reenable it now so that when coming up preempt count is
687 * zero correctly
688 */
689 preempt_enable();
690
691 /*
692 * hard-disable interrupts for the non-NAP case, the NAP code
693 * needs to re-enable interrupts (but soft-disables them)
694 */
695 hard_irq_disable();
696
697 while (1) {
698 /* let's not take timer interrupts too often ... */
699 set_dec(0x7fffffff);
700
701 /* should always be true at this point */
702 if (cpu_has_feature(CPU_FTR_CAN_NAP))
703 power4_cpu_offline_powersave();
704 else {
705 HMT_low();
706 HMT_very_low();
707 }
708 }
709}
710#endif /* CONFIG_HOTPLUG_CPU */
711
712#endif /* CONFIG_PPC64 */
730 713
731define_machine(powermac) { 714define_machine(powermac) {
732 .name = "PowerMac", 715 .name = "PowerMac",
@@ -763,6 +746,6 @@ define_machine(powermac) {
763 .phys_mem_access_prot = pci_phys_mem_access_prot, 746 .phys_mem_access_prot = pci_phys_mem_access_prot,
764#endif 747#endif
765#if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PPC64) 748#if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PPC64)
766 .cpu_die = generic_mach_cpu_die, 749 .cpu_die = pmac_cpu_die,
767#endif 750#endif
768}; 751};
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index 6f32c4eca6e5..686ed82bde79 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -24,7 +24,6 @@
24#include <linux/kernel.h> 24#include <linux/kernel.h>
25#include <linux/sched.h> 25#include <linux/sched.h>
26#include <linux/smp.h> 26#include <linux/smp.h>
27#include <linux/smp_lock.h>
28#include <linux/interrupt.h> 27#include <linux/interrupt.h>
29#include <linux/kernel_stat.h> 28#include <linux/kernel_stat.h>
30#include <linux/delay.h> 29#include <linux/delay.h>
@@ -562,7 +561,7 @@ static void __init smp_core99_setup_i2c_hwsync(int ncpus)
562 /* Look for the clock chip */ 561 /* Look for the clock chip */
563 while ((cc = of_find_node_by_name(cc, "i2c-hwclock")) != NULL) { 562 while ((cc = of_find_node_by_name(cc, "i2c-hwclock")) != NULL) {
564 p = of_get_parent(cc); 563 p = of_get_parent(cc);
565 ok = p && device_is_compatible(p, "uni-n-i2c"); 564 ok = p && of_device_is_compatible(p, "uni-n-i2c");
566 of_node_put(p); 565 of_node_put(p);
567 if (!ok) 566 if (!ok)
568 continue; 567 continue;
@@ -575,11 +574,11 @@ static void __init smp_core99_setup_i2c_hwsync(int ncpus)
575 continue; 574 continue;
576 switch (*reg) { 575 switch (*reg) {
577 case 0xd2: 576 case 0xd2:
578 if (device_is_compatible(cc,"pulsar-legacy-slewing")) { 577 if (of_device_is_compatible(cc,"pulsar-legacy-slewing")) {
579 pmac_tb_freeze = smp_core99_pulsar_tb_freeze; 578 pmac_tb_freeze = smp_core99_pulsar_tb_freeze;
580 pmac_tb_pulsar_addr = 0xd2; 579 pmac_tb_pulsar_addr = 0xd2;
581 name = "Pulsar"; 580 name = "Pulsar";
582 } else if (device_is_compatible(cc, "cy28508")) { 581 } else if (of_device_is_compatible(cc, "cy28508")) {
583 pmac_tb_freeze = smp_core99_cypress_tb_freeze; 582 pmac_tb_freeze = smp_core99_cypress_tb_freeze;
584 name = "Cypress"; 583 name = "Cypress";
585 } 584 }
@@ -900,7 +899,7 @@ void smp_core99_cpu_die(unsigned int cpu)
900 cpu_dead[cpu] = 0; 899 cpu_dead[cpu] = 0;
901} 900}
902 901
903#endif 902#endif /* CONFIG_HOTPLUG_CPU && CONFIG_PP32 */
904 903
905/* Core99 Macs (dual G4s and G5s) */ 904/* Core99 Macs (dual G4s and G5s) */
906struct smp_ops_t core99_smp_ops = { 905struct smp_ops_t core99_smp_ops = {
@@ -910,8 +909,16 @@ struct smp_ops_t core99_smp_ops = {
910 .setup_cpu = smp_core99_setup_cpu, 909 .setup_cpu = smp_core99_setup_cpu,
911 .give_timebase = smp_core99_give_timebase, 910 .give_timebase = smp_core99_give_timebase,
912 .take_timebase = smp_core99_take_timebase, 911 .take_timebase = smp_core99_take_timebase,
913#if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PPC32) 912#if defined(CONFIG_HOTPLUG_CPU)
913# if defined(CONFIG_PPC32)
914 .cpu_disable = smp_core99_cpu_disable, 914 .cpu_disable = smp_core99_cpu_disable,
915 .cpu_die = smp_core99_cpu_die, 915 .cpu_die = smp_core99_cpu_die,
916# endif
917# if defined(CONFIG_PPC64)
918 .cpu_disable = generic_cpu_disable,
919 .cpu_die = generic_cpu_die,
920 /* intentionally do *NOT* assign cpu_enable,
921 * the generic code will use kick_cpu then! */
922# endif
916#endif 923#endif
917}; 924};