aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-06-20 18:23:28 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-06-24 02:15:00 -0400
commit8fae097debdf8ac9b66d220ac258535ea09f3898 (patch)
tree9c022cbf14e9174946a503b116fdf7376b8ce0ce /arch/sparc64/kernel
parentd384ea691fe4ea8c2dd5b9b8d9042eb181776f18 (diff)
[SBUS]: Start cleaning up generic sbus support layer.
In particular, move the IRQ probing out to sparc32/sparc64 arch specific code where it belongs. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r--arch/sparc64/kernel/sbus.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/sbus.c b/arch/sparc64/kernel/sbus.c
index 8812417247d..8f7877ac858 100644
--- a/arch/sparc64/kernel/sbus.c
+++ b/arch/sparc64/kernel/sbus.c
@@ -1225,3 +1225,24 @@ void __init sbus_iommu_init(int prom_node, struct sbus_bus *sbus)
1225 1225
1226 sysio_register_error_handlers(sbus); 1226 sysio_register_error_handlers(sbus);
1227} 1227}
1228
1229void sbus_fill_device_irq(struct sbus_dev *sdev)
1230{
1231 struct linux_prom_irqs irqs[PROMINTR_MAX];
1232 int len;
1233
1234 len = prom_getproperty(sdev->prom_node, "interrupts",
1235 (char *) irqs, sizeof(irqs));
1236 if (len == -1 || len == 0) {
1237 sdev->irqs[0] = 0;
1238 sdev->num_irqs = 0;
1239 } else {
1240 unsigned int pri = irqs[0].pri;
1241
1242 sdev->num_irqs = 1;
1243 if (pri < 0x20)
1244 pri += sdev->slot * 8;
1245
1246 sdev->irqs[0] = sbus_build_irq(sdev->bus, pri);
1247 }
1248}