aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powermac
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-05-03 03:26:52 -0400
committerPaul Mackerras <paulus@samba.org>2007-05-07 06:31:14 -0400
commit55b61fec22caa3e7872caea6c4100fc75cb8f49b (patch)
tree995c2cf733bbd9ee1adc6e77773b0e31e9c21267 /arch/powerpc/platforms/powermac
parentd9333afd6a714760c13f76ba275a32ec7bd979c1 (diff)
[POWERPC] Rename device_is_compatible to of_device_is_compatible
for consistency with other Open Firmware interfaces (and Sparc). This is just a straight replacement. This leaves the compatibility define in place. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/powermac')
-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.c4
-rw-r--r--arch/powerpc/platforms/powermac/smp.c6
7 files changed, 37 insertions, 37 deletions
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 e365bff74d83..a410bc76a8a8 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -659,8 +659,8 @@ static int pmac_pci_probe_mode(struct pci_bus *bus)
659 /* We need to use normal PCI probing for the AGP bus, 659 /* We need to use normal PCI probing for the AGP bus,
660 * 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.
661 */ 661 */
662 if (bus->self == NULL && (device_is_compatible(node, "u3-agp") || 662 if (bus->self == NULL && (of_device_is_compatible(node, "u3-agp") ||
663 device_is_compatible(node, "u4-pcie"))) 663 of_device_is_compatible(node, "u4-pcie")))
664 return PCI_PROBE_NORMAL; 664 return PCI_PROBE_NORMAL;
665 return PCI_PROBE_DEVTREE; 665 return PCI_PROBE_DEVTREE;
666} 666}
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index 330354113186..84f1860493bb 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -562,7 +562,7 @@ static void __init smp_core99_setup_i2c_hwsync(int ncpus)
562 /* Look for the clock chip */ 562 /* Look for the clock chip */
563 while ((cc = of_find_node_by_name(cc, "i2c-hwclock")) != NULL) { 563 while ((cc = of_find_node_by_name(cc, "i2c-hwclock")) != NULL) {
564 p = of_get_parent(cc); 564 p = of_get_parent(cc);
565 ok = p && device_is_compatible(p, "uni-n-i2c"); 565 ok = p && of_device_is_compatible(p, "uni-n-i2c");
566 of_node_put(p); 566 of_node_put(p);
567 if (!ok) 567 if (!ok)
568 continue; 568 continue;
@@ -575,11 +575,11 @@ static void __init smp_core99_setup_i2c_hwsync(int ncpus)
575 continue; 575 continue;
576 switch (*reg) { 576 switch (*reg) {
577 case 0xd2: 577 case 0xd2:
578 if (device_is_compatible(cc,"pulsar-legacy-slewing")) { 578 if (of_device_is_compatible(cc,"pulsar-legacy-slewing")) {
579 pmac_tb_freeze = smp_core99_pulsar_tb_freeze; 579 pmac_tb_freeze = smp_core99_pulsar_tb_freeze;
580 pmac_tb_pulsar_addr = 0xd2; 580 pmac_tb_pulsar_addr = 0xd2;
581 name = "Pulsar"; 581 name = "Pulsar";
582 } else if (device_is_compatible(cc, "cy28508")) { 582 } else if (of_device_is_compatible(cc, "cy28508")) {
583 pmac_tb_freeze = smp_core99_cypress_tb_freeze; 583 pmac_tb_freeze = smp_core99_cypress_tb_freeze;
584 name = "Cypress"; 584 name = "Cypress";
585 } 585 }