Just another pass through arch/powerpc for old usages.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
if (!np)
return -ENODEV;
- size = get_property(np, "ibm,cbe-ptcal-size", NULL);
+ size = of_get_property(np, "ibm,cbe-ptcal-size", NULL);
if (!size)
return -ENODEV;
/* support for older device tree - use cpu nodes */
for_each_node_by_type(np, "cpu") {
- const u32 *nid = get_property(np, "node-id", NULL);
+ const u32 *nid = of_get_property(np, "node-id", NULL);
if (!nid) {
printk(KERN_ERR "%s: node %s is missing node-id?\n",
__FUNCTION__, np->full_name);
static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy)
{
- u32 *max_freq;
+ const u32 *max_freqp;
+ u32 max_freq;
int i, cur_astate;
struct resource res;
struct device_node *cpu, *dn;
pr_debug("init cpufreq on CPU %d\n", policy->cpu);
- max_freq = (u32*) get_property(cpu, "clock-frequency", NULL);
- if (!max_freq) {
+ max_freqp = of_get_property(cpu, "clock-frequency", NULL);
+ if (!max_freqp) {
err = -EINVAL;
goto out_unmap_sdcpwr;
}
/* we need the freq in kHz */
- *max_freq /= 1000;
+ max_freq = *max_freqp / 1000;
- pr_debug("max clock-frequency is at %u kHz\n", *max_freq);
+ pr_debug("max clock-frequency is at %u kHz\n", max_freq);
pr_debug("initializing frequency table\n");
/* initialize frequency table */
new_bus->write = &gpio_mdio_write,
new_bus->reset = &gpio_mdio_reset,
- prop = get_property(np, "reg", NULL);
+ prop = of_get_property(np, "reg", NULL);
new_bus->id = *prop;
new_bus->priv = priv;
new_bus->irq[i] = irq_create_mapping(NULL, 10);
- prop = get_property(np, "mdc-pin", NULL);
+ prop = of_get_property(np, "mdc-pin", NULL);
priv->mdc_pin = *prop;
- prop = get_property(np, "mdio-pin", NULL);
+ prop = of_get_property(np, "mdio-pin", NULL);
priv->mdio_pin = *prop;
new_bus->dev = dev;
memset(uic, 0, sizeof(*uic));
spin_lock_init(&uic->lock);
uic->of_node = of_node_get(node);
- indexp = get_property(node, "cell-index", &len);
+ indexp = of_get_property(node, "cell-index", &len);
if (!indexp || (len != sizeof(u32))) {
printk(KERN_ERR "uic: Device node %s has missing or invalid "
"cell-index property\n", node->full_name);
}
uic->index = *indexp;
- dcrreg = get_property(node, "dcr-reg", &len);
+ dcrreg = of_get_property(node, "dcr-reg", &len);
if (!dcrreg || (len != 2*sizeof(u32))) {
printk(KERN_ERR "uic: Device node %s has missing or invalid "
"dcr-reg property\n", node->full_name);
np = of_find_compatible_node(NULL, NULL, "ibm,uic");
while (np) {
- interrupts = get_property(np, "interrupts", NULL);
+ interrupts = of_get_property(np, "interrupts", NULL);
if (! interrupts)
break;
/* The scan again for cascaded UICs */
np = of_find_compatible_node(NULL, NULL, "ibm,uic");
while (np) {
- interrupts = get_property(np, "interrupts", NULL);
+ interrupts = of_get_property(np, "interrupts", NULL);
if (interrupts) {
/* Secondary UIC */
int cascade_virq;