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>
}
EXPORT_SYMBOL(of_n_addr_cells);
-int
-prom_n_size_cells(struct device_node* np)
+int of_n_size_cells(struct device_node* np)
{
const int* ip;
do {
/* No #size-cells property for the root node, default to 1 */
return 1;
}
-EXPORT_SYMBOL(prom_n_size_cells);
+EXPORT_SYMBOL(of_n_size_cells);
/**
* Construct and return a list of the device_nodes with a given name.
if (addrc)
*addrc = of_n_addr_cells(dev);
if (sizec)
- *sizec = prom_n_size_cells(dev);
+ *sizec = of_n_size_cells(dev);
}
static u64 of_bus_default_map(u32 *addr, const u32 *range,
dma_window += cells;
prop = get_property(dn, "ibm,#dma-size-cells", NULL);
- cells = prop ? *(u32 *)prop : prom_n_size_cells(dn);
+ cells = prop ? *(u32 *)prop : of_n_size_cells(dn);
*size = of_read_number(dma_window, cells);
}
const unsigned int *ireg;
num_addr_cell = of_n_addr_cells(dn);
- num_size_cell = prom_n_size_cells(dn);
+ num_size_cell = of_n_size_cells(dn);
ireg = get_property(dn, "ibm,lrdr-capacity", NULL);
panic("numa.c: No memory nodes found!");
*n_addr_cells = of_n_addr_cells(memory);
- *n_size_cells = prom_n_size_cells(memory);
+ *n_size_cells = of_n_size_cells(memory);
of_node_put(memory);
}
reg = get_property(dn, "reg", ®len);
naddrc = of_n_addr_cells(dn);
- nsizec = prom_n_size_cells(dn);
+ nsizec = of_n_size_cells(dn);
of_node_put(dn);
#define get_property(a, b, c) of_get_property((a), (b), (c))
extern void print_properties(struct device_node *node);
extern int of_n_addr_cells(struct device_node* np);
-extern int prom_n_size_cells(struct device_node* np);
+extern int of_n_size_cells(struct device_node* np);
extern int prom_n_intr_cells(struct device_node* np);
extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
extern int prom_add_property(struct device_node* np, struct property* prop);