diff options
author | David S. Miller <davem@davemloft.net> | 2008-08-27 05:56:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-29 05:15:10 -0400 |
commit | 33c4655c00e6af3ec4023f2cafd63dd4a42de49b (patch) | |
tree | 4d693872eb9641035dc15efc709424c9983b1348 /arch/sparc/kernel/ioport.c | |
parent | 71d3721189c0f4fad105a81e052bddfb826b693b (diff) |
sparc: Kill SBUS layer IRQ hooks.
IRQs are obtained by drivers from the of_device struct.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/ioport.c')
-rw-r--r-- | arch/sparc/kernel/ioport.c | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index d65fb9b06688..0e478301e8e5 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -255,49 +255,6 @@ void sbus_set_sbus64(struct device *dev, int x) | |||
255 | printk("sbus_set_sbus64: unsupported\n"); | 255 | printk("sbus_set_sbus64: unsupported\n"); |
256 | } | 256 | } |
257 | 257 | ||
258 | extern unsigned int sun4d_build_irq(struct sbus_dev *sdev, int irq); | ||
259 | void __init sbus_fill_device_irq(struct sbus_dev *sdev) | ||
260 | { | ||
261 | struct linux_prom_irqs irqs[PROMINTR_MAX]; | ||
262 | int len; | ||
263 | |||
264 | len = prom_getproperty(sdev->prom_node, "intr", | ||
265 | (char *)irqs, sizeof(irqs)); | ||
266 | if (len != -1) { | ||
267 | sdev->num_irqs = len / 8; | ||
268 | if (sdev->num_irqs == 0) { | ||
269 | sdev->irqs[0] = 0; | ||
270 | } else if (sparc_cpu_model == sun4d) { | ||
271 | for (len = 0; len < sdev->num_irqs; len++) | ||
272 | sdev->irqs[len] = | ||
273 | sun4d_build_irq(sdev, irqs[len].pri); | ||
274 | } else { | ||
275 | for (len = 0; len < sdev->num_irqs; len++) | ||
276 | sdev->irqs[len] = irqs[len].pri; | ||
277 | } | ||
278 | } else { | ||
279 | int interrupts[PROMINTR_MAX]; | ||
280 | |||
281 | /* No "intr" node found-- check for "interrupts" node. | ||
282 | * This node contains SBus interrupt levels, not IPLs | ||
283 | * as in "intr", and no vector values. We convert | ||
284 | * SBus interrupt levels to PILs (platform specific). | ||
285 | */ | ||
286 | len = prom_getproperty(sdev->prom_node, "interrupts", | ||
287 | (char *)interrupts, sizeof(interrupts)); | ||
288 | if (len == -1) { | ||
289 | sdev->irqs[0] = 0; | ||
290 | sdev->num_irqs = 0; | ||
291 | } else { | ||
292 | sdev->num_irqs = len / sizeof(int); | ||
293 | for (len = 0; len < sdev->num_irqs; len++) { | ||
294 | sdev->irqs[len] = | ||
295 | sbint_to_irq(sdev, interrupts[len]); | ||
296 | } | ||
297 | } | ||
298 | } | ||
299 | } | ||
300 | |||
301 | /* | 258 | /* |
302 | * Allocate a chunk of memory suitable for DMA. | 259 | * Allocate a chunk of memory suitable for DMA. |
303 | * Typically devices use them for control blocks. | 260 | * Typically devices use them for control blocks. |
@@ -479,16 +436,6 @@ void __init sbus_setup_iommu(struct sbus_bus *sbus, struct device_node *dp) | |||
479 | #endif | 436 | #endif |
480 | } | 437 | } |
481 | 438 | ||
482 | void __init sbus_setup_arch_props(struct sbus_bus *sbus, struct device_node *dp) | ||
483 | { | ||
484 | if (sparc_cpu_model == sun4d) { | ||
485 | struct device_node *parent = dp->parent; | ||
486 | |||
487 | sbus->devid = of_getintprop_default(parent, "device-id", 0); | ||
488 | sbus->board = of_getintprop_default(parent, "board#", 0); | ||
489 | } | ||
490 | } | ||
491 | |||
492 | int __init sbus_arch_preinit(void) | 439 | int __init sbus_arch_preinit(void) |
493 | { | 440 | { |
494 | register_proc_sparc_ioport(); | 441 | register_proc_sparc_ioport(); |