mips/malta: fix CBUS UART interrupt pin
authorAurelien Jarno <aurelien@aurel32.net>
Wed, 14 Nov 2012 14:04:42 +0000 (15:04 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Thu, 15 Nov 2012 13:37:55 +0000 (14:37 +0100)
According to the MIPS Malta Developement Platform User's Manual, the
i8259 interrupt controller is supposed to be connected to the hardware
IRQ0, and the CBUS UART to the hardware interrupt 2.

In QEMU they are both connected to hardware interrupt 0, the CBUS UART
interrupt being wrong. This patch fixes that. It should be noted that
the irq array in QEMU includes the software interrupts, hence
env->irq[2] is the first hardware interrupt.

Cc: Ralf Baechle <ralf@linux-mips.org>
Reviewed-by: Eric Johnson <ericj@mips.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
hw/mips_malta.c

index 0571d58908b6fa5d47a9eb88cc4e8656d4e11e75..4d2464a02cc2a1f4b3cbef894d6df290dd1fb410 100644 (file)
@@ -861,7 +861,8 @@ void mips_malta_init(QEMUMachineInitArgs *args)
     be = 0;
 #endif
     /* FPGA */
-    malta_fpga_init(system_memory, FPGA_ADDRESS, env->irq[2], serial_hds[2]);
+    /* The CBUS UART is attached to the MIPS CPU INT2 pin, ie interrupt 4 */
+    malta_fpga_init(system_memory, FPGA_ADDRESS, env->irq[4], serial_hds[2]);
 
     /* Load firmware in flash / BIOS. */
     dinfo = drive_get(IF_PFLASH, 0, fl_idx);