aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-15 22:48:54 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 04:13:05 -0500
commit9d29a3fafd06534ad73427fee3c968c094d05b9b (patch)
tree4afd7455d6249d9143acea6c4704f69aa98d311a /drivers/serial
parent7890f794e0e6f7dce2a5f4a03ba64b0b3fe306bd (diff)
[SPARC64]: Decode virtual-devices interrupts correctly.
Need to translate through the interrupt-map{,-mask] properties. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/sunhv.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c
index 71c70d7a998c..cc46206a1065 100644
--- a/drivers/serial/sunhv.c
+++ b/drivers/serial/sunhv.c
@@ -21,6 +21,7 @@
21#include <asm/hypervisor.h> 21#include <asm/hypervisor.h>
22#include <asm/spitfire.h> 22#include <asm/spitfire.h>
23#include <asm/vdev.h> 23#include <asm/vdev.h>
24#include <asm/oplib.h>
24#include <asm/irq.h> 25#include <asm/irq.h>
25 26
26#if defined(CONFIG_MAGIC_SYSRQ) 27#if defined(CONFIG_MAGIC_SYSRQ)
@@ -427,7 +428,6 @@ static unsigned int __init get_interrupt(void)
427 const char *cons_str = "console"; 428 const char *cons_str = "console";
428 const char *compat_str = "compatible"; 429 const char *compat_str = "compatible";
429 int node = prom_getchild(sun4v_vdev_root); 430 int node = prom_getchild(sun4v_vdev_root);
430 unsigned int irq;
431 char buf[64]; 431 char buf[64];
432 int err, len; 432 int err, len;
433 433
@@ -449,12 +449,7 @@ static unsigned int __init get_interrupt(void)
449 /* Ok, the this is the OBP node for the sun4v hypervisor 449 /* Ok, the this is the OBP node for the sun4v hypervisor
450 * console device. Decode the interrupt. 450 * console device. Decode the interrupt.
451 */ 451 */
452 err = prom_getproperty(node, "interrupts", 452 return sun4v_vdev_device_interrupt(node);
453 (char *) &irq, sizeof(irq));
454 if (err == -1)
455 return 0;
456
457 return sun4v_build_irq(sun4v_vdev_devhandle, irq, 4, 0);
458} 453}
459 454
460static u32 sunhv_irq; 455static u32 sunhv_irq;
@@ -487,8 +482,8 @@ static int __init sunhv_init(void)
487 return -ENODEV; 482 return -ENODEV;
488 } 483 }
489 484
490 printk("SUNHV: SUN4V virtual console, IRQ[%08x]\n", 485 printk("SUNHV: SUN4V virtual console, IRQ %s\n",
491 sunhv_irq); 486 __irq_itoa(sunhv_irq));
492 487
493 sunhv_reg.minor = sunserial_current_minor; 488 sunhv_reg.minor = sunserial_current_minor;
494 sunhv_reg.nr = 1; 489 sunhv_reg.nr = 1;
@@ -520,7 +515,6 @@ static void __exit sunhv_exit(void)
520 515
521 uart_remove_one_port(&sunhv_reg, port); 516 uart_remove_one_port(&sunhv_reg, port);
522 free_irq(sunhv_irq, port); 517 free_irq(sunhv_irq, port);
523
524 sunserial_current_minor -= 1; 518 sunserial_current_minor -= 1;
525 519
526 uart_unregister_driver(&sunhv_reg); 520 uart_unregister_driver(&sunhv_reg);