summaryrefslogtreecommitdiff
path: root/arch/sparc64/kernel/prom.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-06-30 00:07:40 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2006-06-30 14:13:41 -0700
commit6e990b50ed0b45d506ff6809034508d3e210497d (patch)
tree167fd890356b2c55b9f60c4940a8325d1daa42b5 /arch/sparc64/kernel/prom.c
parent93872ba21d1087cde1d5f9603f3265c1c54d471c (diff)
[SPARC64]: Kill sun4v virtual device layer.
Replace with a simple IRQ translater in the PROM device tree builder. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/prom.c')
-rw-r--r--arch/sparc64/kernel/prom.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c
index 8a70c52c0447..fa484d4f241e 100644
--- a/arch/sparc64/kernel/prom.c
+++ b/arch/sparc64/kernel/prom.c
@@ -1008,6 +1008,27 @@ static struct irq_trans pci_irq_trans_table[] = {
};
#endif
+static unsigned int sun4v_vdev_irq_build(struct device_node *dp,
+ unsigned int devino,
+ void *_data)
+{
+ u32 devhandle = (u32) (unsigned long) _data;
+
+ return sun4v_build_irq(devhandle, devino);
+}
+
+static void sun4v_vdev_irq_trans_init(struct device_node *dp)
+{
+ struct linux_prom64_registers *regs;
+
+ dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller));
+ dp->irq_trans->irq_build = sun4v_vdev_irq_build;
+
+ regs = of_get_property(dp, "reg", NULL);
+ dp->irq_trans->data = (void *) (unsigned long)
+ ((regs->phys_addr >> 32UL) & 0x0fffffff);
+}
+
static void irq_trans_init(struct device_node *dp)
{
const char *model;
@@ -1034,6 +1055,8 @@ static void irq_trans_init(struct device_node *dp)
#endif
if (!strcmp(dp->name, "central"))
return central_irq_trans_init(dp->child);
+ if (!strcmp(dp->name, "virtual-devices"))
+ return sun4v_vdev_irq_trans_init(dp);
}
static int is_root_node(const struct device_node *dp)