aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-04-02 20:56:50 -0400
committerPaul Mackerras <paulus@samba.org>2007-04-12 13:55:18 -0400
commita8bda5dd4f99d6469f3c0dc362db3cce8a4d6416 (patch)
tree513cb0896e142b5eca6fd445cde11b651f408824 /arch
parent7a92f74f98bde8498c98aad6cac5da5a87dd0bf4 (diff)
[POWERPC] Rename prom_n_addr_cells to of_n_addr_cells
This is more consistent and gets us closer to the Sparc code. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/pci_32.c2
-rw-r--r--arch/powerpc/kernel/pci_64.c2
-rw-r--r--arch/powerpc/kernel/prom.c5
-rw-r--r--arch/powerpc/kernel/prom_parse.c4
-rw-r--r--arch/powerpc/kernel/setup-common.c2
-rw-r--r--arch/powerpc/mm/numa.c2
-rw-r--r--arch/powerpc/platforms/chrp/setup.c4
-rw-r--r--arch/powerpc/platforms/maple/setup.c2
-rw-r--r--arch/powerpc/platforms/pasemi/setup.c2
-rw-r--r--arch/powerpc/platforms/pseries/setup.c4
-rw-r--r--arch/powerpc/platforms/pseries/xics.c2
11 files changed, 15 insertions, 16 deletions
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index d8ef2e100505..ecc765819305 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -895,7 +895,7 @@ pci_process_bridge_OF_ranges(struct pci_controller *hose,
895 int rlen = 0, orig_rlen; 895 int rlen = 0, orig_rlen;
896 int memno = 0; 896 int memno = 0;
897 struct resource *res; 897 struct resource *res;
898 int np, na = prom_n_addr_cells(dev); 898 int np, na = of_n_addr_cells(dev);
899 np = na + 5; 899 np = na + 5;
900 900
901 /* First we try to merge ranges to fix a problem with some pmacs 901 /* First we try to merge ranges to fix a problem with some pmacs
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index db1d40ef7d60..84b4f66e98b6 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -957,7 +957,7 @@ void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
957 int rlen = 0; 957 int rlen = 0;
958 int memno = 0; 958 int memno = 0;
959 struct resource *res; 959 struct resource *res;
960 int np, na = prom_n_addr_cells(dev); 960 int np, na = of_n_addr_cells(dev);
961 unsigned long pci_addr, cpu_phys_addr; 961 unsigned long pci_addr, cpu_phys_addr;
962 962
963 np = na + 5; 963 np = na + 5;
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index d2840b66c8c1..08d619756d33 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -1041,8 +1041,7 @@ void __init early_init_devtree(void *params)
1041 1041
1042#undef printk 1042#undef printk
1043 1043
1044int 1044int of_n_addr_cells(struct device_node* np)
1045prom_n_addr_cells(struct device_node* np)
1046{ 1045{
1047 const int *ip; 1046 const int *ip;
1048 do { 1047 do {
@@ -1055,7 +1054,7 @@ prom_n_addr_cells(struct device_node* np)
1055 /* No #address-cells property for the root node, default to 1 */ 1054 /* No #address-cells property for the root node, default to 1 */
1056 return 1; 1055 return 1;
1057} 1056}
1058EXPORT_SYMBOL(prom_n_addr_cells); 1057EXPORT_SYMBOL(of_n_addr_cells);
1059 1058
1060int 1059int
1061prom_n_size_cells(struct device_node* np) 1060prom_n_size_cells(struct device_node* np)
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index 91b443c9a488..e3d036fa6059 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -68,7 +68,7 @@ static void of_bus_default_count_cells(struct device_node *dev,
68 int *addrc, int *sizec) 68 int *addrc, int *sizec)
69{ 69{
70 if (addrc) 70 if (addrc)
71 *addrc = prom_n_addr_cells(dev); 71 *addrc = of_n_addr_cells(dev);
72 if (sizec) 72 if (sizec)
73 *sizec = prom_n_size_cells(dev); 73 *sizec = prom_n_size_cells(dev);
74} 74}
@@ -654,7 +654,7 @@ void of_parse_dma_window(struct device_node *dn, const void *dma_window_prop,
654 if (!prop) 654 if (!prop)
655 prop = get_property(dn, "#address-cells", NULL); 655 prop = get_property(dn, "#address-cells", NULL);
656 656
657 cells = prop ? *(u32 *)prop : prom_n_addr_cells(dn); 657 cells = prop ? *(u32 *)prop : of_n_addr_cells(dn);
658 *phys = of_read_number(dma_window, cells); 658 *phys = of_read_number(dma_window, cells);
659 659
660 dma_window += cells; 660 dma_window += cells;
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index d44db58e8a81..f7ef5a97c0ea 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -379,7 +379,7 @@ void __init smp_setup_cpu_maps(void)
379 int num_addr_cell, num_size_cell, maxcpus; 379 int num_addr_cell, num_size_cell, maxcpus;
380 const unsigned int *ireg; 380 const unsigned int *ireg;
381 381
382 num_addr_cell = prom_n_addr_cells(dn); 382 num_addr_cell = of_n_addr_cells(dn);
383 num_size_cell = prom_n_size_cells(dn); 383 num_size_cell = prom_n_size_cells(dn);
384 384
385 ireg = get_property(dn, "ibm,lrdr-capacity", NULL); 385 ireg = get_property(dn, "ibm,lrdr-capacity", NULL);
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index e86c37c82cfd..119cef99a2b0 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -201,7 +201,7 @@ static void __init get_n_mem_cells(int *n_addr_cells, int *n_size_cells)
201 if (!memory) 201 if (!memory)
202 panic("numa.c: No memory nodes found!"); 202 panic("numa.c: No memory nodes found!");
203 203
204 *n_addr_cells = prom_n_addr_cells(memory); 204 *n_addr_cells = of_n_addr_cells(memory);
205 *n_size_cells = prom_n_size_cells(memory); 205 *n_size_cells = prom_n_size_cells(memory);
206 of_node_put(memory); 206 of_node_put(memory);
207} 207}
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
index 7bdfa6269aaf..044ad3f1e04a 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -361,7 +361,7 @@ static void __init chrp_find_openpic(void)
361 root = of_find_node_by_path("/"); 361 root = of_find_node_by_path("/");
362 if (root) { 362 if (root) {
363 opprop = get_property(root, "platform-open-pic", &oplen); 363 opprop = get_property(root, "platform-open-pic", &oplen);
364 na = prom_n_addr_cells(root); 364 na = of_n_addr_cells(root);
365 } 365 }
366 if (opprop && oplen >= na * sizeof(unsigned int)) { 366 if (opprop && oplen >= na * sizeof(unsigned int)) {
367 opaddr = opprop[na-1]; /* assume 32-bit */ 367 opaddr = opprop[na-1]; /* assume 32-bit */
@@ -468,7 +468,7 @@ static void __init chrp_find_8259(void)
468 468
469 if (addrp == NULL) 469 if (addrp == NULL)
470 continue; 470 continue;
471 chrp_int_ack = addrp[prom_n_addr_cells(np)-1]; 471 chrp_int_ack = addrp[of_n_addr_cells(np)-1];
472 break; 472 break;
473 } 473 }
474 if (np == NULL) 474 if (np == NULL)
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c
index 9389d29cd0be..f21add0e4786 100644
--- a/arch/powerpc/platforms/maple/setup.c
+++ b/arch/powerpc/platforms/maple/setup.c
@@ -248,7 +248,7 @@ static void __init maple_init_IRQ(void)
248 248
249 /* Find address list in /platform-open-pic */ 249 /* Find address list in /platform-open-pic */
250 root = of_find_node_by_path("/"); 250 root = of_find_node_by_path("/");
251 naddr = prom_n_addr_cells(root); 251 naddr = of_n_addr_cells(root);
252 opprop = get_property(root, "platform-open-pic", &opplen); 252 opprop = get_property(root, "platform-open-pic", &opplen);
253 if (opprop != 0) { 253 if (opprop != 0) {
254 openpic_addr = of_read_number(opprop, naddr); 254 openpic_addr = of_read_number(opprop, naddr);
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index 449cf1a08291..d4fd61328c8b 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -136,7 +136,7 @@ static __init void pas_init_IRQ(void)
136 136
137 /* Find address list in /platform-open-pic */ 137 /* Find address list in /platform-open-pic */
138 root = of_find_node_by_path("/"); 138 root = of_find_node_by_path("/");
139 naddr = prom_n_addr_cells(root); 139 naddr = of_n_addr_cells(root);
140 opprop = get_property(root, "platform-open-pic", &opplen); 140 opprop = get_property(root, "platform-open-pic", &opplen);
141 if (!opprop) { 141 if (!opprop) {
142 printk(KERN_ERR "No platform-open-pic property.\n"); 142 printk(KERN_ERR "No platform-open-pic property.\n");
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index ff87b1ad8ce9..54e93eb8a8ee 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -139,7 +139,7 @@ static void __init pseries_mpic_init_IRQ(void)
139 struct mpic *mpic; 139 struct mpic *mpic;
140 140
141 np = of_find_node_by_path("/"); 141 np = of_find_node_by_path("/");
142 naddr = prom_n_addr_cells(np); 142 naddr = of_n_addr_cells(np);
143 opprop = get_property(np, "platform-open-pic", &opplen); 143 opprop = 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);
@@ -193,7 +193,7 @@ static void __init pseries_mpic_init_IRQ(void)
193 NULL); 193 NULL);
194 if (addrp == NULL) 194 if (addrp == NULL)
195 continue; 195 continue;
196 naddr = prom_n_addr_cells(np); 196 naddr = of_n_addr_cells(np);
197 intack = addrp[naddr-1]; 197 intack = addrp[naddr-1];
198 if (naddr > 1) 198 if (naddr > 1)
199 intack |= ((unsigned long)addrp[naddr-2]) << 32; 199 intack |= ((unsigned long)addrp[naddr-2]) << 32;
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index 81d172d65038..f0795faada91 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -643,7 +643,7 @@ static void __init xics_setup_8259_cascade(void)
643 addrp = get_property(np, "8259-interrupt-acknowledge", NULL); 643 addrp = get_property(np, "8259-interrupt-acknowledge", NULL);
644 if (addrp == NULL) 644 if (addrp == NULL)
645 continue; 645 continue;
646 naddr = prom_n_addr_cells(np); 646 naddr = of_n_addr_cells(np);
647 intack = addrp[naddr-1]; 647 intack = addrp[naddr-1];
648 if (naddr > 1) 648 if (naddr > 1)
649 intack |= ((unsigned long)addrp[naddr-2]) << 32; 649 intack |= ((unsigned long)addrp[naddr-2]) << 32;