|
@@ -323,10 +323,10 @@ static void __init build_device_resources(struct of_device *op,
|
|
return;
|
|
return;
|
|
|
|
|
|
p_op = to_of_device(parent);
|
|
p_op = to_of_device(parent);
|
|
- bus = of_match_bus(p_op->node);
|
|
|
|
- bus->count_cells(op->node, &na, &ns);
|
|
|
|
|
|
+ bus = of_match_bus(p_op->dev.of_node);
|
|
|
|
+ bus->count_cells(op->dev.of_node, &na, &ns);
|
|
|
|
|
|
- preg = of_get_property(op->node, bus->addr_prop_name, &num_reg);
|
|
|
|
|
|
+ preg = of_get_property(op->dev.of_node, bus->addr_prop_name, &num_reg);
|
|
if (!preg || num_reg == 0)
|
|
if (!preg || num_reg == 0)
|
|
return;
|
|
return;
|
|
|
|
|
|
@@ -340,7 +340,7 @@ static void __init build_device_resources(struct of_device *op,
|
|
if (num_reg > PROMREG_MAX) {
|
|
if (num_reg > PROMREG_MAX) {
|
|
printk(KERN_WARNING "%s: Too many regs (%d), "
|
|
printk(KERN_WARNING "%s: Too many regs (%d), "
|
|
"limiting to %d.\n",
|
|
"limiting to %d.\n",
|
|
- op->node->full_name, num_reg, PROMREG_MAX);
|
|
|
|
|
|
+ op->dev.of_node->full_name, num_reg, PROMREG_MAX);
|
|
num_reg = PROMREG_MAX;
|
|
num_reg = PROMREG_MAX;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -348,8 +348,8 @@ static void __init build_device_resources(struct of_device *op,
|
|
struct resource *r = &op->resource[index];
|
|
struct resource *r = &op->resource[index];
|
|
u32 addr[OF_MAX_ADDR_CELLS];
|
|
u32 addr[OF_MAX_ADDR_CELLS];
|
|
const u32 *reg = (preg + (index * ((na + ns) * 4)));
|
|
const u32 *reg = (preg + (index * ((na + ns) * 4)));
|
|
- struct device_node *dp = op->node;
|
|
|
|
- struct device_node *pp = p_op->node;
|
|
|
|
|
|
+ struct device_node *dp = op->dev.of_node;
|
|
|
|
+ struct device_node *pp = p_op->dev.of_node;
|
|
struct of_bus *pbus, *dbus;
|
|
struct of_bus *pbus, *dbus;
|
|
u64 size, result = OF_BAD_ADDR;
|
|
u64 size, result = OF_BAD_ADDR;
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
@@ -397,7 +397,7 @@ static void __init build_device_resources(struct of_device *op,
|
|
|
|
|
|
if (of_resource_verbose)
|
|
if (of_resource_verbose)
|
|
printk("%s reg[%d] -> %llx\n",
|
|
printk("%s reg[%d] -> %llx\n",
|
|
- op->node->full_name, index,
|
|
|
|
|
|
+ op->dev.of_node->full_name, index,
|
|
result);
|
|
result);
|
|
|
|
|
|
if (result != OF_BAD_ADDR) {
|
|
if (result != OF_BAD_ADDR) {
|
|
@@ -408,7 +408,7 @@ static void __init build_device_resources(struct of_device *op,
|
|
r->end = result + size - 1;
|
|
r->end = result + size - 1;
|
|
r->flags = flags;
|
|
r->flags = flags;
|
|
}
|
|
}
|
|
- r->name = op->node->name;
|
|
|
|
|
|
+ r->name = op->dev.of_node->name;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -530,7 +530,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
|
|
struct device *parent,
|
|
struct device *parent,
|
|
unsigned int irq)
|
|
unsigned int irq)
|
|
{
|
|
{
|
|
- struct device_node *dp = op->node;
|
|
|
|
|
|
+ struct device_node *dp = op->dev.of_node;
|
|
struct device_node *pp, *ip;
|
|
struct device_node *pp, *ip;
|
|
unsigned int orig_irq = irq;
|
|
unsigned int orig_irq = irq;
|
|
int nid;
|
|
int nid;
|
|
@@ -575,7 +575,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
|
|
|
|
|
|
if (of_irq_verbose)
|
|
if (of_irq_verbose)
|
|
printk("%s: Apply [%s:%x] imap --> [%s:%x]\n",
|
|
printk("%s: Apply [%s:%x] imap --> [%s:%x]\n",
|
|
- op->node->full_name,
|
|
|
|
|
|
+ op->dev.of_node->full_name,
|
|
pp->full_name, this_orig_irq,
|
|
pp->full_name, this_orig_irq,
|
|
(iret ? iret->full_name : "NULL"), irq);
|
|
(iret ? iret->full_name : "NULL"), irq);
|
|
|
|
|
|
@@ -594,7 +594,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
|
|
if (of_irq_verbose)
|
|
if (of_irq_verbose)
|
|
printk("%s: PCI swizzle [%s] "
|
|
printk("%s: PCI swizzle [%s] "
|
|
"%x --> %x\n",
|
|
"%x --> %x\n",
|
|
- op->node->full_name,
|
|
|
|
|
|
+ op->dev.of_node->full_name,
|
|
pp->full_name, this_orig_irq,
|
|
pp->full_name, this_orig_irq,
|
|
irq);
|
|
irq);
|
|
|
|
|
|
@@ -611,11 +611,11 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
|
|
if (!ip)
|
|
if (!ip)
|
|
return orig_irq;
|
|
return orig_irq;
|
|
|
|
|
|
- irq = ip->irq_trans->irq_build(op->node, irq,
|
|
|
|
|
|
+ irq = ip->irq_trans->irq_build(op->dev.of_node, irq,
|
|
ip->irq_trans->data);
|
|
ip->irq_trans->data);
|
|
if (of_irq_verbose)
|
|
if (of_irq_verbose)
|
|
printk("%s: Apply IRQ trans [%s] %x --> %x\n",
|
|
printk("%s: Apply IRQ trans [%s] %x --> %x\n",
|
|
- op->node->full_name, ip->full_name, orig_irq, irq);
|
|
|
|
|
|
+ op->dev.of_node->full_name, ip->full_name, orig_irq, irq);
|
|
|
|
|
|
out:
|
|
out:
|
|
nid = of_node_to_nid(dp);
|
|
nid = of_node_to_nid(dp);
|
|
@@ -640,10 +640,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
|
|
return NULL;
|
|
return NULL;
|
|
|
|
|
|
sd = &op->dev.archdata;
|
|
sd = &op->dev.archdata;
|
|
- sd->prom_node = dp;
|
|
|
|
sd->op = op;
|
|
sd->op = op;
|
|
|
|
|
|
- op->node = dp;
|
|
|
|
|
|
+ op->dev.of_node = dp;
|
|
|
|
|
|
op->clock_freq = of_getintprop_default(dp, "clock-frequency",
|
|
op->clock_freq = of_getintprop_default(dp, "clock-frequency",
|
|
(25*1000*1000));
|
|
(25*1000*1000));
|