aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev
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/sysdev
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/sysdev')
-rw-r--r--arch/powerpc/sysdev/dcr.c14
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c90
-rw-r--r--arch/powerpc/sysdev/mpic.c8
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe.c4
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe_io.c6
-rw-r--r--arch/powerpc/sysdev/tsi108_dev.c16
-rw-r--r--arch/powerpc/sysdev/tsi108_pci.c2
7 files changed, 73 insertions, 67 deletions
diff --git a/arch/powerpc/sysdev/dcr.c b/arch/powerpc/sysdev/dcr.c
index 1fc5819e7d18..574b6ef44e0b 100644
--- a/arch/powerpc/sysdev/dcr.c
+++ b/arch/powerpc/sysdev/dcr.c
@@ -26,7 +26,7 @@
26unsigned int dcr_resource_start(struct device_node *np, unsigned int index) 26unsigned int dcr_resource_start(struct device_node *np, unsigned int index)
27{ 27{
28 unsigned int ds; 28 unsigned int ds;
29 const u32 *dr = get_property(np, "dcr-reg", &ds); 29 const u32 *dr = of_get_property(np, "dcr-reg", &ds);
30 30
31 if (dr == NULL || ds & 1 || index >= (ds / 8)) 31 if (dr == NULL || ds & 1 || index >= (ds / 8))
32 return 0; 32 return 0;
@@ -37,7 +37,7 @@ unsigned int dcr_resource_start(struct device_node *np, unsigned int index)
37unsigned int dcr_resource_len(struct device_node *np, unsigned int index) 37unsigned int dcr_resource_len(struct device_node *np, unsigned int index)
38{ 38{
39 unsigned int ds; 39 unsigned int ds;
40 const u32 *dr = get_property(np, "dcr-reg", &ds); 40 const u32 *dr = of_get_property(np, "dcr-reg", &ds);
41 41
42 if (dr == NULL || ds & 1 || index >= (ds / 8)) 42 if (dr == NULL || ds & 1 || index >= (ds / 8))
43 return 0; 43 return 0;
@@ -53,9 +53,9 @@ static struct device_node * find_dcr_parent(struct device_node * node)
53 const u32 *p; 53 const u32 *p;
54 54
55 for (par = of_node_get(node); par;) { 55 for (par = of_node_get(node); par;) {
56 if (get_property(par, "dcr-controller", NULL)) 56 if (of_get_property(par, "dcr-controller", NULL))
57 break; 57 break;
58 p = get_property(par, "dcr-parent", NULL); 58 p = of_get_property(par, "dcr-parent", NULL);
59 tmp = par; 59 tmp = par;
60 if (p == NULL) 60 if (p == NULL)
61 par = of_get_parent(par); 61 par = of_get_parent(par);
@@ -80,13 +80,13 @@ u64 of_translate_dcr_address(struct device_node *dev,
80 return OF_BAD_ADDR; 80 return OF_BAD_ADDR;
81 81
82 /* Stride is not properly defined yet, default to 0x10 for Axon */ 82 /* Stride is not properly defined yet, default to 0x10 for Axon */
83 p = get_property(dp, "dcr-mmio-stride", NULL); 83 p = of_get_property(dp, "dcr-mmio-stride", NULL);
84 stride = (p == NULL) ? 0x10 : *p; 84 stride = (p == NULL) ? 0x10 : *p;
85 85
86 /* XXX FIXME: Which property name is to use of the 2 following ? */ 86 /* XXX FIXME: Which property name is to use of the 2 following ? */
87 p = get_property(dp, "dcr-mmio-range", NULL); 87 p = of_get_property(dp, "dcr-mmio-range", NULL);
88 if (p == NULL) 88 if (p == NULL)
89 p = get_property(dp, "dcr-mmio-space", NULL); 89 p = of_get_property(dp, "dcr-mmio-space", NULL);
90 if (p == NULL) 90 if (p == NULL)
91 return OF_BAD_ADDR; 91 return OF_BAD_ADDR;
92 92
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index d20f02927f72..8a123c71449f 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -52,7 +52,7 @@ phys_addr_t get_immrbase(void)
52 soc = of_find_node_by_type(NULL, "soc"); 52 soc = of_find_node_by_type(NULL, "soc");
53 if (soc) { 53 if (soc) {
54 unsigned int size; 54 unsigned int size;
55 const void *prop = get_property(soc, "reg", &size); 55 const void *prop = of_get_property(soc, "reg", &size);
56 56
57 if (prop) 57 if (prop)
58 immrbase = of_translate_address(soc, prop); 58 immrbase = of_translate_address(soc, prop);
@@ -78,8 +78,8 @@ u32 get_brgfreq(void)
78 node = of_find_node_by_type(NULL, "cpm"); 78 node = of_find_node_by_type(NULL, "cpm");
79 if (node) { 79 if (node) {
80 unsigned int size; 80 unsigned int size;
81 const unsigned int *prop = get_property(node, "brg-frequency", 81 const unsigned int *prop = of_get_property(node,
82 &size); 82 "brg-frequency", &size);
83 83
84 if (prop) 84 if (prop)
85 brgfreq = *prop; 85 brgfreq = *prop;
@@ -103,8 +103,8 @@ u32 get_baudrate(void)
103 node = of_find_node_by_type(NULL, "serial"); 103 node = of_find_node_by_type(NULL, "serial");
104 if (node) { 104 if (node) {
105 unsigned int size; 105 unsigned int size;
106 const unsigned int *prop = get_property(node, "current-speed", 106 const unsigned int *prop = of_get_property(node,
107 &size); 107 "current-speed", &size);
108 108
109 if (prop) 109 if (prop)
110 fs_baudrate = *prop; 110 fs_baudrate = *prop;
@@ -153,7 +153,8 @@ static int __init gfar_mdio_of_init(void)
153 while ((child = of_get_next_child(np, child)) != NULL) { 153 while ((child = of_get_next_child(np, child)) != NULL) {
154 int irq = irq_of_parse_and_map(child, 0); 154 int irq = irq_of_parse_and_map(child, 0);
155 if (irq != NO_IRQ) { 155 if (irq != NO_IRQ) {
156 const u32 *id = get_property(child, "reg", NULL); 156 const u32 *id = of_get_property(child,
157 "reg", NULL);
157 mdio_data.irq[*id] = irq; 158 mdio_data.irq[*id] = irq;
158 } 159 }
159 } 160 }
@@ -209,7 +210,7 @@ static int __init gfar_of_init(void)
209 210
210 of_irq_to_resource(np, 0, &r[1]); 211 of_irq_to_resource(np, 0, &r[1]);
211 212
212 model = get_property(np, "model", NULL); 213 model = of_get_property(np, "model", NULL);
213 214
214 /* If we aren't the FEC we have multiple interrupts */ 215 /* If we aren't the FEC we have multiple interrupts */
215 if (model && strcasecmp(model, "FEC")) { 216 if (model && strcasecmp(model, "FEC")) {
@@ -253,7 +254,7 @@ static int __init gfar_of_init(void)
253 FSL_GIANFAR_DEV_HAS_VLAN | 254 FSL_GIANFAR_DEV_HAS_VLAN |
254 FSL_GIANFAR_DEV_HAS_EXTENDED_HASH; 255 FSL_GIANFAR_DEV_HAS_EXTENDED_HASH;
255 256
256 ph = get_property(np, "phy-handle", NULL); 257 ph = of_get_property(np, "phy-handle", NULL);
257 phy = of_find_node_by_phandle(*ph); 258 phy = of_find_node_by_phandle(*ph);
258 259
259 if (phy == NULL) { 260 if (phy == NULL) {
@@ -263,7 +264,7 @@ static int __init gfar_of_init(void)
263 264
264 mdio = of_get_parent(phy); 265 mdio = of_get_parent(phy);
265 266
266 id = get_property(phy, "reg", NULL); 267 id = of_get_property(phy, "reg", NULL);
267 ret = of_address_to_resource(mdio, 0, &res); 268 ret = of_address_to_resource(mdio, 0, &res);
268 if (ret) { 269 if (ret) {
269 of_node_put(phy); 270 of_node_put(phy);
@@ -325,11 +326,11 @@ static int __init fsl_i2c_of_init(void)
325 } 326 }
326 327
327 i2c_data.device_flags = 0; 328 i2c_data.device_flags = 0;
328 flags = get_property(np, "dfsrr", NULL); 329 flags = of_get_property(np, "dfsrr", NULL);
329 if (flags) 330 if (flags)
330 i2c_data.device_flags |= FSL_I2C_DEV_SEPARATE_DFSRR; 331 i2c_data.device_flags |= FSL_I2C_DEV_SEPARATE_DFSRR;
331 332
332 flags = get_property(np, "fsl5200-clocking", NULL); 333 flags = of_get_property(np, "fsl5200-clocking", NULL);
333 if (flags) 334 if (flags)
334 i2c_data.device_flags |= FSL_I2C_DEV_CLOCK_5200; 335 i2c_data.device_flags |= FSL_I2C_DEV_CLOCK_5200;
335 336
@@ -374,7 +375,7 @@ static int __init mpc83xx_wdt_init(void)
374 goto nosoc; 375 goto nosoc;
375 } 376 }
376 377
377 freq = get_property(soc, "bus-frequency", NULL); 378 freq = of_get_property(soc, "bus-frequency", NULL);
378 if (!freq) { 379 if (!freq) {
379 ret = -ENODEV; 380 ret = -ENODEV;
380 goto err; 381 goto err;
@@ -466,15 +467,15 @@ static int __init fsl_usb_of_init(void)
466 467
467 usb_data.operating_mode = FSL_USB2_MPH_HOST; 468 usb_data.operating_mode = FSL_USB2_MPH_HOST;
468 469
469 prop = get_property(np, "port0", NULL); 470 prop = of_get_property(np, "port0", NULL);
470 if (prop) 471 if (prop)
471 usb_data.port_enables |= FSL_USB2_PORT0_ENABLED; 472 usb_data.port_enables |= FSL_USB2_PORT0_ENABLED;
472 473
473 prop = get_property(np, "port1", NULL); 474 prop = of_get_property(np, "port1", NULL);
474 if (prop) 475 if (prop)
475 usb_data.port_enables |= FSL_USB2_PORT1_ENABLED; 476 usb_data.port_enables |= FSL_USB2_PORT1_ENABLED;
476 477
477 prop = get_property(np, "phy_type", NULL); 478 prop = of_get_property(np, "phy_type", NULL);
478 usb_data.phy_mode = determine_usb_phy(prop); 479 usb_data.phy_mode = determine_usb_phy(prop);
479 480
480 ret = 481 ret =
@@ -501,7 +502,7 @@ static int __init fsl_usb_of_init(void)
501 502
502 of_irq_to_resource(np, 0, &r[1]); 503 of_irq_to_resource(np, 0, &r[1]);
503 504
504 prop = get_property(np, "dr_mode", NULL); 505 prop = of_get_property(np, "dr_mode", NULL);
505 506
506 if (!prop || !strcmp(prop, "host")) { 507 if (!prop || !strcmp(prop, "host")) {
507 usb_data.operating_mode = FSL_USB2_DR_HOST; 508 usb_data.operating_mode = FSL_USB2_DR_HOST;
@@ -538,7 +539,7 @@ static int __init fsl_usb_of_init(void)
538 goto err; 539 goto err;
539 } 540 }
540 541
541 prop = get_property(np, "phy_type", NULL); 542 prop = of_get_property(np, "phy_type", NULL);
542 usb_data.phy_mode = determine_usb_phy(prop); 543 usb_data.phy_mode = determine_usb_phy(prop);
543 544
544 if (usb_dev_dr_host) { 545 if (usb_dev_dr_host) {
@@ -633,7 +634,7 @@ static int __init fs_enet_of_init(void)
633 goto err; 634 goto err;
634 } 635 }
635 636
636 model = get_property(np, "model", NULL); 637 model = of_get_property(np, "model", NULL);
637 if (model == NULL) { 638 if (model == NULL) {
638 ret = -ENODEV; 639 ret = -ENODEV;
639 goto unreg; 640 goto unreg;
@@ -643,7 +644,7 @@ static int __init fs_enet_of_init(void)
643 if (mac_addr) 644 if (mac_addr)
644 memcpy(fs_enet_data.macaddr, mac_addr, 6); 645 memcpy(fs_enet_data.macaddr, mac_addr, 6);
645 646
646 ph = get_property(np, "phy-handle", NULL); 647 ph = of_get_property(np, "phy-handle", NULL);
647 phy = of_find_node_by_phandle(*ph); 648 phy = of_find_node_by_phandle(*ph);
648 649
649 if (phy == NULL) { 650 if (phy == NULL) {
@@ -651,12 +652,12 @@ static int __init fs_enet_of_init(void)
651 goto unreg; 652 goto unreg;
652 } 653 }
653 654
654 phy_addr = get_property(phy, "reg", NULL); 655 phy_addr = of_get_property(phy, "reg", NULL);
655 fs_enet_data.phy_addr = *phy_addr; 656 fs_enet_data.phy_addr = *phy_addr;
656 657
657 phy_irq = get_property(phy, "interrupts", NULL); 658 phy_irq = of_get_property(phy, "interrupts", NULL);
658 659
659 id = get_property(np, "device-id", NULL); 660 id = of_get_property(np, "device-id", NULL);
660 fs_enet_data.fs_no = *id; 661 fs_enet_data.fs_no = *id;
661 strcpy(fs_enet_data.fs_type, model); 662 strcpy(fs_enet_data.fs_type, model);
662 663
@@ -668,8 +669,10 @@ static int __init fs_enet_of_init(void)
668 goto unreg; 669 goto unreg;
669 } 670 }
670 671
671 fs_enet_data.clk_rx = *((u32 *) get_property(np, "rx-clock", NULL)); 672 fs_enet_data.clk_rx = *((u32 *)of_get_property(np,
672 fs_enet_data.clk_tx = *((u32 *) get_property(np, "tx-clock", NULL)); 673 "rx-clock", NULL));
674 fs_enet_data.clk_tx = *((u32 *)of_get_property(np,
675 "tx-clock", NULL));
673 676
674 if (strstr(model, "FCC")) { 677 if (strstr(model, "FCC")) {
675 int fcc_index = *id - 1; 678 int fcc_index = *id - 1;
@@ -690,7 +693,7 @@ static int __init fs_enet_of_init(void)
690 fs_enet_data.bus_id = (char*)&bus_id[(*id)]; 693 fs_enet_data.bus_id = (char*)&bus_id[(*id)];
691 fs_enet_data.init_ioports = init_fcc_ioports; 694 fs_enet_data.init_ioports = init_fcc_ioports;
692 695
693 mdio_bb_prop = get_property(phy, "bitbang", NULL); 696 mdio_bb_prop = of_get_property(phy, "bitbang", NULL);
694 if (mdio_bb_prop) { 697 if (mdio_bb_prop) {
695 struct platform_device *fs_enet_mdio_bb_dev; 698 struct platform_device *fs_enet_mdio_bb_dev;
696 struct fs_mii_bb_platform_info fs_enet_mdio_bb_data; 699 struct fs_mii_bb_platform_info fs_enet_mdio_bb_data;
@@ -796,10 +799,10 @@ static int __init cpm_uart_of_init(void)
796 goto err; 799 goto err;
797 } 800 }
798 801
799 id = get_property(np, "device-id", NULL); 802 id = of_get_property(np, "device-id", NULL);
800 cpm_uart_data.fs_no = *id; 803 cpm_uart_data.fs_no = *id;
801 804
802 model = (char*)get_property(np, "model", NULL); 805 model = of_get_property(np, "model", NULL);
803 strcpy(cpm_uart_data.fs_type, model); 806 strcpy(cpm_uart_data.fs_type, model);
804 807
805 cpm_uart_data.uart_clk = ppc_proc_freq; 808 cpm_uart_data.uart_clk = ppc_proc_freq;
@@ -808,8 +811,10 @@ static int __init cpm_uart_of_init(void)
808 cpm_uart_data.tx_buf_size = 32; 811 cpm_uart_data.tx_buf_size = 32;
809 cpm_uart_data.rx_num_fifo = 4; 812 cpm_uart_data.rx_num_fifo = 4;
810 cpm_uart_data.rx_buf_size = 32; 813 cpm_uart_data.rx_buf_size = 32;
811 cpm_uart_data.clk_rx = *((u32 *) get_property(np, "rx-clock", NULL)); 814 cpm_uart_data.clk_rx = *((u32 *)of_get_property(np,
812 cpm_uart_data.clk_tx = *((u32 *) get_property(np, "tx-clock", NULL)); 815 "rx-clock", NULL));
816 cpm_uart_data.clk_tx = *((u32 *)of_get_property(np,
817 "tx-clock", NULL));
813 818
814 ret = 819 ret =
815 platform_device_add_data(cpm_uart_dev, &cpm_uart_data, 820 platform_device_add_data(cpm_uart_dev, &cpm_uart_data,
@@ -833,7 +838,7 @@ arch_initcall(cpm_uart_of_init);
833#ifdef CONFIG_8xx 838#ifdef CONFIG_8xx
834 839
835extern void init_scc_ioports(struct fs_platform_info*); 840extern void init_scc_ioports(struct fs_platform_info*);
836extern int platform_device_skip(char *model, int id); 841extern int platform_device_skip(const char *model, int id);
837 842
838static int __init fs_enet_mdio_of_init(void) 843static int __init fs_enet_mdio_of_init(void)
839{ 844{
@@ -900,21 +905,22 @@ static int __init fs_enet_of_init(void)
900 struct resource r[4]; 905 struct resource r[4];
901 struct device_node *phy = NULL, *mdio = NULL; 906 struct device_node *phy = NULL, *mdio = NULL;
902 struct fs_platform_info fs_enet_data; 907 struct fs_platform_info fs_enet_data;
903 unsigned int *id, *phy_addr; 908 const unsigned int *id;
909 const unsigned int *phy_addr;
904 void *mac_addr; 910 void *mac_addr;
905 phandle *ph; 911 const phandle *ph;
906 char *model; 912 const char *model;
907 913
908 memset(r, 0, sizeof(r)); 914 memset(r, 0, sizeof(r));
909 memset(&fs_enet_data, 0, sizeof(fs_enet_data)); 915 memset(&fs_enet_data, 0, sizeof(fs_enet_data));
910 916
911 model = (char *)get_property(np, "model", NULL); 917 model = of_get_property(np, "model", NULL);
912 if (model == NULL) { 918 if (model == NULL) {
913 ret = -ENODEV; 919 ret = -ENODEV;
914 goto unreg; 920 goto unreg;
915 } 921 }
916 922
917 id = (u32 *) get_property(np, "device-id", NULL); 923 id = of_get_property(np, "device-id", NULL);
918 fs_enet_data.fs_no = *id; 924 fs_enet_data.fs_no = *id;
919 925
920 if (platform_device_skip(model, *id)) 926 if (platform_device_skip(model, *id))
@@ -929,12 +935,12 @@ static int __init fs_enet_of_init(void)
929 if (mac_addr) 935 if (mac_addr)
930 memcpy(fs_enet_data.macaddr, mac_addr, 6); 936 memcpy(fs_enet_data.macaddr, mac_addr, 6);
931 937
932 ph = (phandle *) get_property(np, "phy-handle", NULL); 938 ph = of_get_property(np, "phy-handle", NULL);
933 if (ph != NULL) 939 if (ph != NULL)
934 phy = of_find_node_by_phandle(*ph); 940 phy = of_find_node_by_phandle(*ph);
935 941
936 if (phy != NULL) { 942 if (phy != NULL) {
937 phy_addr = (u32 *) get_property(phy, "reg", NULL); 943 phy_addr = of_get_property(phy, "reg", NULL);
938 fs_enet_data.phy_addr = *phy_addr; 944 fs_enet_data.phy_addr = *phy_addr;
939 fs_enet_data.has_phy = 1; 945 fs_enet_data.has_phy = 1;
940 946
@@ -947,7 +953,7 @@ static int __init fs_enet_of_init(void)
947 } 953 }
948 } 954 }
949 955
950 model = (char*)get_property(np, "model", NULL); 956 model = of_get_property(np, "model", NULL);
951 strcpy(fs_enet_data.fs_type, model); 957 strcpy(fs_enet_data.fs_type, model);
952 958
953 if (strstr(model, "FEC")) { 959 if (strstr(model, "FEC")) {
@@ -1038,8 +1044,8 @@ static int __init cpm_smc_uart_of_init(void)
1038 i++) { 1044 i++) {
1039 struct resource r[3]; 1045 struct resource r[3];
1040 struct fs_uart_platform_info cpm_uart_data; 1046 struct fs_uart_platform_info cpm_uart_data;
1041 int *id; 1047 const int *id;
1042 char *model; 1048 const char *model;
1043 1049
1044 memset(r, 0, sizeof(r)); 1050 memset(r, 0, sizeof(r));
1045 memset(&cpm_uart_data, 0, sizeof(cpm_uart_data)); 1051 memset(&cpm_uart_data, 0, sizeof(cpm_uart_data));
@@ -1066,10 +1072,10 @@ static int __init cpm_smc_uart_of_init(void)
1066 goto err; 1072 goto err;
1067 } 1073 }
1068 1074
1069 model = (char*)get_property(np, "model", NULL); 1075 model = of_get_property(np, "model", NULL);
1070 strcpy(cpm_uart_data.fs_type, model); 1076 strcpy(cpm_uart_data.fs_type, model);
1071 1077
1072 id = (int*)get_property(np, "device-id", NULL); 1078 id = of_get_property(np, "device-id", NULL);
1073 cpm_uart_data.fs_no = *id; 1079 cpm_uart_data.fs_no = *id;
1074 cpm_uart_data.uart_clk = ppc_proc_freq; 1080 cpm_uart_data.uart_clk = ppc_proc_freq;
1075 1081
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index bcfb900481f8..27e6f78739eb 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -970,7 +970,7 @@ struct mpic * __init mpic_alloc(struct device_node *node,
970 mpic->spurious_vec = intvec_top; 970 mpic->spurious_vec = intvec_top;
971 971
972 /* Check for "big-endian" in device-tree */ 972 /* Check for "big-endian" in device-tree */
973 if (node && get_property(node, "big-endian", NULL) != NULL) 973 if (node && of_get_property(node, "big-endian", NULL) != NULL)
974 mpic->flags |= MPIC_BIG_ENDIAN; 974 mpic->flags |= MPIC_BIG_ENDIAN;
975 975
976 976
@@ -986,13 +986,13 @@ struct mpic * __init mpic_alloc(struct device_node *node,
986 BUG_ON(paddr == 0 && node == NULL); 986 BUG_ON(paddr == 0 && node == NULL);
987 987
988 /* If no physical address passed in, check if it's dcr based */ 988 /* If no physical address passed in, check if it's dcr based */
989 if (paddr == 0 && get_property(node, "dcr-reg", NULL) != NULL) 989 if (paddr == 0 && of_get_property(node, "dcr-reg", NULL) != NULL)
990 mpic->flags |= MPIC_USES_DCR; 990 mpic->flags |= MPIC_USES_DCR;
991 991
992#ifdef CONFIG_PPC_DCR 992#ifdef CONFIG_PPC_DCR
993 if (mpic->flags & MPIC_USES_DCR) { 993 if (mpic->flags & MPIC_USES_DCR) {
994 const u32 *dbasep; 994 const u32 *dbasep;
995 dbasep = get_property(node, "dcr-reg", NULL); 995 dbasep = of_get_property(node, "dcr-reg", NULL);
996 BUG_ON(dbasep == NULL); 996 BUG_ON(dbasep == NULL);
997 mpic->dcr_base = *dbasep; 997 mpic->dcr_base = *dbasep;
998 mpic->reg_type = mpic_access_dcr; 998 mpic->reg_type = mpic_access_dcr;
@@ -1006,7 +1006,7 @@ struct mpic * __init mpic_alloc(struct device_node *node,
1006 */ 1006 */
1007 if (paddr == 0 && !(mpic->flags & MPIC_USES_DCR)) { 1007 if (paddr == 0 && !(mpic->flags & MPIC_USES_DCR)) {
1008 const u32 *reg; 1008 const u32 *reg;
1009 reg = get_property(node, "reg", NULL); 1009 reg = of_get_property(node, "reg", NULL);
1010 BUG_ON(reg == NULL); 1010 BUG_ON(reg == NULL);
1011 paddr = of_translate_address(node, reg); 1011 paddr = of_translate_address(node, reg);
1012 BUG_ON(paddr == OF_BAD_ADDR); 1012 BUG_ON(paddr == OF_BAD_ADDR);
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c
index 43f6cc9d7ea0..7f4c07543961 100644
--- a/arch/powerpc/sysdev/qe_lib/qe.c
+++ b/arch/powerpc/sysdev/qe_lib/qe.c
@@ -71,7 +71,7 @@ phys_addr_t get_qe_base(void)
71 qe = of_find_node_by_type(NULL, "qe"); 71 qe = of_find_node_by_type(NULL, "qe");
72 if (qe) { 72 if (qe) {
73 unsigned int size; 73 unsigned int size;
74 const void *prop = get_property(qe, "reg", &size); 74 const void *prop = of_get_property(qe, "reg", &size);
75 qebase = of_translate_address(qe, prop); 75 qebase = of_translate_address(qe, prop);
76 of_node_put(qe); 76 of_node_put(qe);
77 }; 77 };
@@ -158,7 +158,7 @@ unsigned int get_brg_clk(void)
158 qe = of_find_node_by_type(NULL, "qe"); 158 qe = of_find_node_by_type(NULL, "qe");
159 if (qe) { 159 if (qe) {
160 unsigned int size; 160 unsigned int size;
161 const u32 *prop = get_property(qe, "brg-frequency", &size); 161 const u32 *prop = of_get_property(qe, "brg-frequency", &size);
162 brg_clk = *prop; 162 brg_clk = *prop;
163 of_node_put(qe); 163 of_node_put(qe);
164 }; 164 };
diff --git a/arch/powerpc/sysdev/qe_lib/qe_io.c b/arch/powerpc/sysdev/qe_lib/qe_io.c
index 0afe6bfe3714..e32b45bf9ff5 100644
--- a/arch/powerpc/sysdev/qe_lib/qe_io.c
+++ b/arch/powerpc/sysdev/qe_lib/qe_io.c
@@ -53,7 +53,7 @@ int par_io_init(struct device_node *np)
53 return ret; 53 return ret;
54 par_io = ioremap(res.start, res.end - res.start + 1); 54 par_io = ioremap(res.start, res.end - res.start + 1);
55 55
56 num_ports = get_property(np, "num-ports", NULL); 56 num_ports = of_get_property(np, "num-ports", NULL);
57 if (num_ports) 57 if (num_ports)
58 num_par_io_ports = *num_ports; 58 num_par_io_ports = *num_ports;
59 59
@@ -161,7 +161,7 @@ int par_io_of_config(struct device_node *np)
161 return -1; 161 return -1;
162 } 162 }
163 163
164 ph = get_property(np, "pio-handle", NULL); 164 ph = of_get_property(np, "pio-handle", NULL);
165 if (ph == 0) { 165 if (ph == 0) {
166 printk(KERN_ERR "pio-handle not available \n"); 166 printk(KERN_ERR "pio-handle not available \n");
167 return -1; 167 return -1;
@@ -169,7 +169,7 @@ int par_io_of_config(struct device_node *np)
169 169
170 pio = of_find_node_by_phandle(*ph); 170 pio = of_find_node_by_phandle(*ph);
171 171
172 pio_map = get_property(pio, "pio-map", &pio_map_len); 172 pio_map = of_get_property(pio, "pio-map", &pio_map_len);
173 if (pio_map == NULL) { 173 if (pio_map == NULL) {
174 printk(KERN_ERR "pio-map is not set! \n"); 174 printk(KERN_ERR "pio-map is not set! \n");
175 return -1; 175 return -1;
diff --git a/arch/powerpc/sysdev/tsi108_dev.c b/arch/powerpc/sysdev/tsi108_dev.c
index 97f37ef4bbbf..337039ee51e6 100644
--- a/arch/powerpc/sysdev/tsi108_dev.c
+++ b/arch/powerpc/sysdev/tsi108_dev.c
@@ -48,7 +48,7 @@ phys_addr_t get_csrbase(void)
48 tsi = of_find_node_by_type(NULL, "tsi-bridge"); 48 tsi = of_find_node_by_type(NULL, "tsi-bridge");
49 if (tsi) { 49 if (tsi) {
50 unsigned int size; 50 unsigned int size;
51 const void *prop = get_property(tsi, "reg", &size); 51 const void *prop = of_get_property(tsi, "reg", &size);
52 tsi108_csr_base = of_translate_address(tsi, prop); 52 tsi108_csr_base = of_translate_address(tsi, prop);
53 of_node_put(tsi); 53 of_node_put(tsi);
54 }; 54 };
@@ -77,10 +77,10 @@ static int __init tsi108_eth_of_init(void)
77 struct resource r[2]; 77 struct resource r[2];
78 struct device_node *phy; 78 struct device_node *phy;
79 hw_info tsi_eth_data; 79 hw_info tsi_eth_data;
80 unsigned int *id; 80 const unsigned int *id;
81 unsigned int *phy_id; 81 const unsigned int *phy_id;
82 const void *mac_addr; 82 const void *mac_addr;
83 phandle *ph; 83 const phandle *ph;
84 84
85 memset(r, 0, sizeof(r)); 85 memset(r, 0, sizeof(r));
86 memset(&tsi_eth_data, 0, sizeof(tsi_eth_data)); 86 memset(&tsi_eth_data, 0, sizeof(tsi_eth_data));
@@ -107,10 +107,10 @@ static int __init tsi108_eth_of_init(void)
107 goto err; 107 goto err;
108 } 108 }
109 109
110 mac_addr = get_property(np, "address", NULL); 110 mac_addr = of_get_property(np, "address", NULL);
111 memcpy(tsi_eth_data.mac_addr, mac_addr, 6); 111 memcpy(tsi_eth_data.mac_addr, mac_addr, 6);
112 112
113 ph = (phandle *) get_property(np, "phy-handle", NULL); 113 ph = of_get_property(np, "phy-handle", NULL);
114 phy = of_find_node_by_phandle(*ph); 114 phy = of_find_node_by_phandle(*ph);
115 115
116 if (phy == NULL) { 116 if (phy == NULL) {
@@ -118,8 +118,8 @@ static int __init tsi108_eth_of_init(void)
118 goto unreg; 118 goto unreg;
119 } 119 }
120 120
121 id = (u32 *) get_property(phy, "reg", NULL); 121 id = of_get_property(phy, "reg", NULL);
122 phy_id = (u32 *) get_property(phy, "phy-id", NULL); 122 phy_id = of_get_property(phy, "phy-id", NULL);
123 ret = of_address_to_resource(phy, 0, &res); 123 ret = of_address_to_resource(phy, 0, &res);
124 if (ret) { 124 if (ret) {
125 of_node_put(phy); 125 of_node_put(phy);
diff --git a/arch/powerpc/sysdev/tsi108_pci.c b/arch/powerpc/sysdev/tsi108_pci.c
index ae249c6bbbcf..58b9e7f8abf2 100644
--- a/arch/powerpc/sysdev/tsi108_pci.c
+++ b/arch/powerpc/sysdev/tsi108_pci.c
@@ -211,7 +211,7 @@ int __init tsi108_setup_pci(struct device_node *dev)
211 has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); 211 has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
212 212
213 /* Get bus range if any */ 213 /* Get bus range if any */
214 bus_range = get_property(dev, "bus-range", &len); 214 bus_range = of_get_property(dev, "bus-range", &len);
215 if (bus_range == NULL || len < 2 * sizeof(int)) { 215 if (bus_range == NULL || len < 2 * sizeof(int)) {
216 printk(KERN_WARNING "Can't get bus-range for %s, assume" 216 printk(KERN_WARNING "Can't get bus-range for %s, assume"
217 " bus 0\n", dev->full_name); 217 " bus 0\n", dev->full_name);