aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/pseries')
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c10
-rw-r--r--arch/powerpc/platforms/pseries/eeh_driver.c4
-rw-r--r--arch/powerpc/platforms/pseries/eeh_event.c2
-rw-r--r--arch/powerpc/platforms/pseries/firmware.c2
-rw-r--r--arch/powerpc/platforms/pseries/hotplug-cpu.c4
-rw-r--r--arch/powerpc/platforms/pseries/iommu.c12
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c6
-rw-r--r--arch/powerpc/platforms/pseries/nvram.c2
-rw-r--r--arch/powerpc/platforms/pseries/pci.c2
-rw-r--r--arch/powerpc/platforms/pseries/ras.c2
-rw-r--r--arch/powerpc/platforms/pseries/rtasd.c2
-rw-r--r--arch/powerpc/platforms/pseries/setup.c8
-rw-r--r--arch/powerpc/platforms/pseries/xics.c15
13 files changed, 36 insertions, 35 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index a56be71d1ede..48fbd442e9df 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -789,10 +789,10 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
789 unsigned int rets[3]; 789 unsigned int rets[3];
790 struct eeh_early_enable_info *info = data; 790 struct eeh_early_enable_info *info = data;
791 int ret; 791 int ret;
792 const char *status = get_property(dn, "status", NULL); 792 const char *status = of_get_property(dn, "status", NULL);
793 const u32 *class_code = get_property(dn, "class-code", NULL); 793 const u32 *class_code = of_get_property(dn, "class-code", NULL);
794 const u32 *vendor_id = get_property(dn, "vendor-id", NULL); 794 const u32 *vendor_id = of_get_property(dn, "vendor-id", NULL);
795 const u32 *device_id = get_property(dn, "device-id", NULL); 795 const u32 *device_id = of_get_property(dn, "device-id", NULL);
796 const u32 *regs; 796 const u32 *regs;
797 int enable; 797 int enable;
798 struct pci_dn *pdn = PCI_DN(dn); 798 struct pci_dn *pdn = PCI_DN(dn);
@@ -835,7 +835,7 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
835 835
836 /* Ok... see if this device supports EEH. Some do, some don't, 836 /* Ok... see if this device supports EEH. Some do, some don't,
837 * and the only way to find out is to check each and every one. */ 837 * and the only way to find out is to check each and every one. */
838 regs = get_property(dn, "reg", NULL); 838 regs = of_get_property(dn, "reg", NULL);
839 if (regs) { 839 if (regs) {
840 /* First register entry is addr (00BBSS00) */ 840 /* First register entry is addr (00BBSS00) */
841 /* Try to enable eeh */ 841 /* Try to enable eeh */
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c
index 8cc331eecc9d..3170e003f76a 100644
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -314,14 +314,14 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
314 314
315 if (!frozen_dn) { 315 if (!frozen_dn) {
316 316
317 location = get_property(event->dn, "ibm,loc-code", NULL); 317 location = of_get_property(event->dn, "ibm,loc-code", NULL);
318 location = location ? location : "unknown"; 318 location = location ? location : "unknown";
319 printk(KERN_ERR "EEH: Error: Cannot find partition endpoint " 319 printk(KERN_ERR "EEH: Error: Cannot find partition endpoint "
320 "for location=%s pci addr=%s\n", 320 "for location=%s pci addr=%s\n",
321 location, pci_name(event->dev)); 321 location, pci_name(event->dev));
322 return NULL; 322 return NULL;
323 } 323 }
324 location = get_property(frozen_dn, "ibm,loc-code", NULL); 324 location = of_get_property(frozen_dn, "ibm,loc-code", NULL);
325 location = location ? location : "unknown"; 325 location = location ? location : "unknown";
326 326
327 /* There are two different styles for coming up with the PE. 327 /* There are two different styles for coming up with the PE.
diff --git a/arch/powerpc/platforms/pseries/eeh_event.c b/arch/powerpc/platforms/pseries/eeh_event.c
index 221dec8c16bd..ddb80f5d850b 100644
--- a/arch/powerpc/platforms/pseries/eeh_event.c
+++ b/arch/powerpc/platforms/pseries/eeh_event.c
@@ -126,7 +126,7 @@ int eeh_send_failure_event (struct device_node *dn,
126 126
127 if (!mem_init_done) { 127 if (!mem_init_done) {
128 printk(KERN_ERR "EEH: event during early boot not handled\n"); 128 printk(KERN_ERR "EEH: event during early boot not handled\n");
129 location = get_property(dn, "ibm,loc-code", NULL); 129 location = of_get_property(dn, "ibm,loc-code", NULL);
130 printk(KERN_ERR "EEH: device node = %s\n", dn->full_name); 130 printk(KERN_ERR "EEH: device node = %s\n", dn->full_name);
131 printk(KERN_ERR "EEH: PCI location = %s\n", location); 131 printk(KERN_ERR "EEH: PCI location = %s\n", location);
132 return 1; 132 return 1;
diff --git a/arch/powerpc/platforms/pseries/firmware.c b/arch/powerpc/platforms/pseries/firmware.c
index 90522e3c9d46..29bf83bfb1f0 100644
--- a/arch/powerpc/platforms/pseries/firmware.c
+++ b/arch/powerpc/platforms/pseries/firmware.c
@@ -80,7 +80,7 @@ void __init fw_feature_init(void)
80 goto out; 80 goto out;
81 } 81 }
82 82
83 hypertas = get_property(dn, "ibm,hypertas-functions", &len); 83 hypertas = of_get_property(dn, "ibm,hypertas-functions", &len);
84 if (hypertas == NULL) 84 if (hypertas == NULL)
85 goto out; 85 goto out;
86 86
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index f460b9cbfd46..9711eb0d5496 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
@@ -143,7 +143,7 @@ static int pseries_add_processor(struct device_node *np)
143 int err = -ENOSPC, len, nthreads, i; 143 int err = -ENOSPC, len, nthreads, i;
144 const u32 *intserv; 144 const u32 *intserv;
145 145
146 intserv = get_property(np, "ibm,ppc-interrupt-server#s", &len); 146 intserv = of_get_property(np, "ibm,ppc-interrupt-server#s", &len);
147 if (!intserv) 147 if (!intserv)
148 return 0; 148 return 0;
149 149
@@ -203,7 +203,7 @@ static void pseries_remove_processor(struct device_node *np)
203 int len, nthreads, i; 203 int len, nthreads, i;
204 const u32 *intserv; 204 const u32 *intserv;
205 205
206 intserv = get_property(np, "ibm,ppc-interrupt-server#s", &len); 206 intserv = of_get_property(np, "ibm,ppc-interrupt-server#s", &len);
207 if (!intserv) 207 if (!intserv)
208 return; 208 return;
209 209
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index f9510a5a3e21..66665c82415c 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -253,8 +253,8 @@ static void iommu_table_setparms(struct pci_controller *phb,
253 253
254 node = (struct device_node *)phb->arch_data; 254 node = (struct device_node *)phb->arch_data;
255 255
256 basep = get_property(node, "linux,tce-base", NULL); 256 basep = of_get_property(node, "linux,tce-base", NULL);
257 sizep = get_property(node, "linux,tce-size", NULL); 257 sizep = of_get_property(node, "linux,tce-size", NULL);
258 if (basep == NULL || sizep == NULL) { 258 if (basep == NULL || sizep == NULL) {
259 printk(KERN_ERR "PCI_DMA: iommu_table_setparms: %s has " 259 printk(KERN_ERR "PCI_DMA: iommu_table_setparms: %s has "
260 "missing tce entries !\n", dn->full_name); 260 "missing tce entries !\n", dn->full_name);
@@ -404,7 +404,7 @@ static void pci_dma_bus_setup_pSeriesLP(struct pci_bus *bus)
404 404
405 /* Find nearest ibm,dma-window, walking up the device tree */ 405 /* Find nearest ibm,dma-window, walking up the device tree */
406 for (pdn = dn; pdn != NULL; pdn = pdn->parent) { 406 for (pdn = dn; pdn != NULL; pdn = pdn->parent) {
407 dma_window = get_property(pdn, "ibm,dma-window", NULL); 407 dma_window = of_get_property(pdn, "ibm,dma-window", NULL);
408 if (dma_window != NULL) 408 if (dma_window != NULL)
409 break; 409 break;
410 } 410 }
@@ -499,7 +499,7 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev)
499 499
500 for (pdn = dn; pdn && PCI_DN(pdn) && !PCI_DN(pdn)->iommu_table; 500 for (pdn = dn; pdn && PCI_DN(pdn) && !PCI_DN(pdn)->iommu_table;
501 pdn = pdn->parent) { 501 pdn = pdn->parent) {
502 dma_window = get_property(pdn, "ibm,dma-window", NULL); 502 dma_window = of_get_property(pdn, "ibm,dma-window", NULL);
503 if (dma_window) 503 if (dma_window)
504 break; 504 break;
505 } 505 }
@@ -548,7 +548,7 @@ static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long acti
548 switch (action) { 548 switch (action) {
549 case PSERIES_RECONFIG_REMOVE: 549 case PSERIES_RECONFIG_REMOVE:
550 if (pci && pci->iommu_table && 550 if (pci && pci->iommu_table &&
551 get_property(np, "ibm,dma-window", NULL)) 551 of_get_property(np, "ibm,dma-window", NULL))
552 iommu_free_table(np); 552 iommu_free_table(np);
553 break; 553 break;
554 default: 554 default:
@@ -565,7 +565,7 @@ static struct notifier_block iommu_reconfig_nb = {
565/* These are called very early. */ 565/* These are called very early. */
566void iommu_init_early_pSeries(void) 566void iommu_init_early_pSeries(void)
567{ 567{
568 if (of_chosen && get_property(of_chosen, "linux,iommu-off", NULL)) { 568 if (of_chosen && of_get_property(of_chosen, "linux,iommu-off", NULL)) {
569 /* Direct I/O, IOMMU off */ 569 /* Direct I/O, IOMMU off */
570 ppc_md.pci_dma_dev_setup = NULL; 570 ppc_md.pci_dma_dev_setup = NULL;
571 ppc_md.pci_dma_bus_setup = NULL; 571 ppc_md.pci_dma_bus_setup = NULL;
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 843ee9643211..3a70e8ad7bc8 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -209,13 +209,13 @@ void __init find_udbg_vterm(void)
209 /* find the boot console from /chosen/stdout */ 209 /* find the boot console from /chosen/stdout */
210 if (!of_chosen) 210 if (!of_chosen)
211 return; 211 return;
212 name = get_property(of_chosen, "linux,stdout-path", NULL); 212 name = of_get_property(of_chosen, "linux,stdout-path", NULL);
213 if (name == NULL) 213 if (name == NULL)
214 return; 214 return;
215 stdout_node = of_find_node_by_path(name); 215 stdout_node = of_find_node_by_path(name);
216 if (!stdout_node) 216 if (!stdout_node)
217 return; 217 return;
218 name = get_property(stdout_node, "name", NULL); 218 name = of_get_property(stdout_node, "name", NULL);
219 if (!name) { 219 if (!name) {
220 printk(KERN_WARNING "stdout node missing 'name' property!\n"); 220 printk(KERN_WARNING "stdout node missing 'name' property!\n");
221 goto out; 221 goto out;
@@ -226,7 +226,7 @@ void __init find_udbg_vterm(void)
226 /* Check if it's a virtual terminal */ 226 /* Check if it's a virtual terminal */
227 if (strncmp(name, "vty", 3) != 0) 227 if (strncmp(name, "vty", 3) != 0)
228 goto out; 228 goto out;
229 termno = get_property(stdout_node, "reg", NULL); 229 termno = of_get_property(stdout_node, "reg", NULL);
230 if (termno == NULL) 230 if (termno == NULL)
231 goto out; 231 goto out;
232 vtermno = termno[0]; 232 vtermno = termno[0];
diff --git a/arch/powerpc/platforms/pseries/nvram.c b/arch/powerpc/platforms/pseries/nvram.c
index 64163cecdf93..f68903e15bd5 100644
--- a/arch/powerpc/platforms/pseries/nvram.c
+++ b/arch/powerpc/platforms/pseries/nvram.c
@@ -130,7 +130,7 @@ int __init pSeries_nvram_init(void)
130 if (nvram == NULL) 130 if (nvram == NULL)
131 return -ENODEV; 131 return -ENODEV;
132 132
133 nbytes_p = get_property(nvram, "#bytes", &proplen); 133 nbytes_p = of_get_property(nvram, "#bytes", &proplen);
134 if (nbytes_p == NULL || proplen != sizeof(unsigned int)) 134 if (nbytes_p == NULL || proplen != sizeof(unsigned int))
135 return -EIO; 135 return -EIO;
136 136
diff --git a/arch/powerpc/platforms/pseries/pci.c b/arch/powerpc/platforms/pseries/pci.c
index 5c54ff9521c8..2c6ded29f73d 100644
--- a/arch/powerpc/platforms/pseries/pci.c
+++ b/arch/powerpc/platforms/pseries/pci.c
@@ -40,7 +40,7 @@ void pcibios_name_device(struct pci_dev *dev)
40 */ 40 */
41 dn = pci_device_to_OF_node(dev); 41 dn = pci_device_to_OF_node(dev);
42 if (dn) { 42 if (dn) {
43 char *loc_code = get_property(dn, "ibm,loc-code", 0); 43 const char *loc_code = of_get_property(dn, "ibm,loc-code", 0);
44 if (loc_code) { 44 if (loc_code) {
45 int loc_len = strlen(loc_code); 45 int loc_len = strlen(loc_code);
46 if (loc_len < sizeof(dev->dev.name)) { 46 if (loc_len < sizeof(dev->dev.name)) {
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c
index edc038873113..53aa04101ced 100644
--- a/arch/powerpc/platforms/pseries/ras.c
+++ b/arch/powerpc/platforms/pseries/ras.c
@@ -85,7 +85,7 @@ static void request_ras_irqs(struct device_node *np,
85 * map those interrupts using the default interrupt host and default 85 * map those interrupts using the default interrupt host and default
86 * trigger 86 * trigger
87 */ 87 */
88 opicprop = get_property(np, "open-pic-interrupt", &opicplen); 88 opicprop = of_get_property(np, "open-pic-interrupt", &opicplen);
89 if (opicprop) { 89 if (opicprop) {
90 opicplen /= sizeof(u32); 90 opicplen /= sizeof(u32);
91 for (i = 0; i < opicplen; i++) { 91 for (i = 0; i < opicplen; i++) {
diff --git a/arch/powerpc/platforms/pseries/rtasd.c b/arch/powerpc/platforms/pseries/rtasd.c
index 77d0937d5c07..9797b10b2935 100644
--- a/arch/powerpc/platforms/pseries/rtasd.c
+++ b/arch/powerpc/platforms/pseries/rtasd.c
@@ -363,7 +363,7 @@ static int get_eventscan_parms(void)
363 363
364 node = of_find_node_by_path("/rtas"); 364 node = of_find_node_by_path("/rtas");
365 365
366 ip = get_property(node, "rtas-event-scan-rate", NULL); 366 ip = of_get_property(node, "rtas-event-scan-rate", NULL);
367 if (ip == NULL) { 367 if (ip == NULL) {
368 printk(KERN_ERR "rtasd: no rtas-event-scan-rate\n"); 368 printk(KERN_ERR "rtasd: no rtas-event-scan-rate\n");
369 of_node_put(node); 369 of_node_put(node);
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 54e93eb8a8ee..e2fcd2307e67 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -93,7 +93,7 @@ static void pSeries_show_cpuinfo(struct seq_file *m)
93 93
94 root = of_find_node_by_path("/"); 94 root = of_find_node_by_path("/");
95 if (root) 95 if (root)
96 model = get_property(root, "model", NULL); 96 model = of_get_property(root, "model", NULL);
97 seq_printf(m, "machine\t\t: CHRP %s\n", model); 97 seq_printf(m, "machine\t\t: CHRP %s\n", model);
98 of_node_put(root); 98 of_node_put(root);
99} 99}
@@ -140,7 +140,7 @@ static void __init pseries_mpic_init_IRQ(void)
140 140
141 np = of_find_node_by_path("/"); 141 np = of_find_node_by_path("/");
142 naddr = of_n_addr_cells(np); 142 naddr = of_n_addr_cells(np);
143 opprop = get_property(np, "platform-open-pic", &opplen); 143 opprop = of_get_property(np, "platform-open-pic", &opplen);
144 if (opprop != 0) { 144 if (opprop != 0) {
145 openpic_addr = of_read_number(opprop, naddr); 145 openpic_addr = of_read_number(opprop, naddr);
146 printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr); 146 printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr);
@@ -189,7 +189,7 @@ static void __init pseries_mpic_init_IRQ(void)
189 break; 189 break;
190 if (strcmp(np->name, "pci") != 0) 190 if (strcmp(np->name, "pci") != 0)
191 continue; 191 continue;
192 addrp = get_property(np, "8259-interrupt-acknowledge", 192 addrp = of_get_property(np, "8259-interrupt-acknowledge",
193 NULL); 193 NULL);
194 if (addrp == NULL) 194 if (addrp == NULL)
195 continue; 195 continue;
@@ -226,7 +226,7 @@ static void __init pseries_discover_pic(void)
226 226
227 for (np = NULL; (np = of_find_node_by_name(np, 227 for (np = NULL; (np = of_find_node_by_name(np,
228 "interrupt-controller"));) { 228 "interrupt-controller"));) {
229 typep = get_property(np, "compatible", NULL); 229 typep = of_get_property(np, "compatible", NULL);
230 if (strstr(typep, "open-pic")) { 230 if (strstr(typep, "open-pic")) {
231 pSeries_mpic_node = of_node_get(np); 231 pSeries_mpic_node = of_node_get(np);
232 ppc_md.init_IRQ = pseries_mpic_init_IRQ; 232 ppc_md.init_IRQ = pseries_mpic_init_IRQ;
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index f0795faada91..896cbf340c42 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -576,7 +576,7 @@ static void __init xics_init_one_node(struct device_node *np,
576 * This happens to be the case so far but we are playing with fire... 576 * This happens to be the case so far but we are playing with fire...
577 * should be fixed one of these days. -BenH. 577 * should be fixed one of these days. -BenH.
578 */ 578 */
579 ireg = get_property(np, "ibm,interrupt-server-ranges", NULL); 579 ireg = of_get_property(np, "ibm,interrupt-server-ranges", NULL);
580 580
581 /* Do that ever happen ? we'll know soon enough... but even good'old 581 /* Do that ever happen ? we'll know soon enough... but even good'old
582 * f80 does have that property .. 582 * f80 does have that property ..
@@ -588,7 +588,7 @@ static void __init xics_init_one_node(struct device_node *np,
588 */ 588 */
589 *indx = *ireg; 589 *indx = *ireg;
590 } 590 }
591 ireg = get_property(np, "reg", &ilen); 591 ireg = of_get_property(np, "reg", &ilen);
592 if (!ireg) 592 if (!ireg)
593 panic("xics_init_IRQ: can't find interrupt reg property"); 593 panic("xics_init_IRQ: can't find interrupt reg property");
594 594
@@ -640,7 +640,7 @@ static void __init xics_setup_8259_cascade(void)
640 break; 640 break;
641 if (strcmp(np->name, "pci") != 0) 641 if (strcmp(np->name, "pci") != 0)
642 continue; 642 continue;
643 addrp = get_property(np, "8259-interrupt-acknowledge", NULL); 643 addrp = of_get_property(np, "8259-interrupt-acknowledge", NULL);
644 if (addrp == NULL) 644 if (addrp == NULL)
645 continue; 645 continue;
646 naddr = of_n_addr_cells(np); 646 naddr = of_n_addr_cells(np);
@@ -664,10 +664,11 @@ static struct device_node *cpuid_to_of_node(int cpu)
664 int i, len; 664 int i, len;
665 const u32 *intserv; 665 const u32 *intserv;
666 666
667 intserv = get_property(np, "ibm,ppc-interrupt-server#s", &len); 667 intserv = of_get_property(np, "ibm,ppc-interrupt-server#s",
668 &len);
668 669
669 if (!intserv) 670 if (!intserv)
670 intserv = get_property(np, "reg", &len); 671 intserv = of_get_property(np, "reg", &len);
671 672
672 i = len / sizeof(u32); 673 i = len / sizeof(u32);
673 674
@@ -709,7 +710,7 @@ void __init xics_init_IRQ(void)
709 /* Find the server numbers for the boot cpu. */ 710 /* Find the server numbers for the boot cpu. */
710 np = cpuid_to_of_node(boot_cpuid); 711 np = cpuid_to_of_node(boot_cpuid);
711 BUG_ON(!np); 712 BUG_ON(!np);
712 ireg = get_property(np, "ibm,ppc-interrupt-gserver#s", &ilen); 713 ireg = of_get_property(np, "ibm,ppc-interrupt-gserver#s", &ilen);
713 if (!ireg) 714 if (!ireg)
714 goto skip_gserver_check; 715 goto skip_gserver_check;
715 i = ilen / sizeof(int); 716 i = ilen / sizeof(int);
@@ -725,7 +726,7 @@ void __init xics_init_IRQ(void)
725 default_server = hcpuid; 726 default_server = hcpuid;
726 default_distrib_server = ireg[j+1]; 727 default_distrib_server = ireg[j+1];
727 728
728 isize = get_property(np, 729 isize = of_get_property(np,
729 "ibm,interrupt-server#-size", NULL); 730 "ibm,interrupt-server#-size", NULL);
730 if (isize) 731 if (isize)
731 interrupt_server_size = *isize; 732 interrupt_server_size = *isize;