diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-06-30 03:07:40 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-30 17:13:41 -0400 |
commit | 6e990b50ed0b45d506ff6809034508d3e210497d (patch) | |
tree | 167fd890356b2c55b9f60c4940a8325d1daa42b5 /arch/sparc64/kernel/prom.c | |
parent | 93872ba21d1087cde1d5f9603f3265c1c54d471c (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.c | 23 |
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[] = { | |||
1008 | }; | 1008 | }; |
1009 | #endif | 1009 | #endif |
1010 | 1010 | ||
1011 | static unsigned int sun4v_vdev_irq_build(struct device_node *dp, | ||
1012 | unsigned int devino, | ||
1013 | void *_data) | ||
1014 | { | ||
1015 | u32 devhandle = (u32) (unsigned long) _data; | ||
1016 | |||
1017 | return sun4v_build_irq(devhandle, devino); | ||
1018 | } | ||
1019 | |||
1020 | static void sun4v_vdev_irq_trans_init(struct device_node *dp) | ||
1021 | { | ||
1022 | struct linux_prom64_registers *regs; | ||
1023 | |||
1024 | dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller)); | ||
1025 | dp->irq_trans->irq_build = sun4v_vdev_irq_build; | ||
1026 | |||
1027 | regs = of_get_property(dp, "reg", NULL); | ||
1028 | dp->irq_trans->data = (void *) (unsigned long) | ||
1029 | ((regs->phys_addr >> 32UL) & 0x0fffffff); | ||
1030 | } | ||
1031 | |||
1011 | static void irq_trans_init(struct device_node *dp) | 1032 | static void irq_trans_init(struct device_node *dp) |
1012 | { | 1033 | { |
1013 | const char *model; | 1034 | const char *model; |
@@ -1034,6 +1055,8 @@ static void irq_trans_init(struct device_node *dp) | |||
1034 | #endif | 1055 | #endif |
1035 | if (!strcmp(dp->name, "central")) | 1056 | if (!strcmp(dp->name, "central")) |
1036 | return central_irq_trans_init(dp->child); | 1057 | return central_irq_trans_init(dp->child); |
1058 | if (!strcmp(dp->name, "virtual-devices")) | ||
1059 | return sun4v_vdev_irq_trans_init(dp); | ||
1037 | } | 1060 | } |
1038 | 1061 | ||
1039 | static int is_root_node(const struct device_node *dp) | 1062 | static int is_root_node(const struct device_node *dp) |