From: Aurelien Jarno Date: Wed, 14 Nov 2012 14:04:42 +0000 (+0100) Subject: mips/malta: fix CBUS UART interrupt pin X-Git-Tag: v1.2.2~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f6b803df744f3b8fafd69fa8e8e0588ffd75f4ac;p=thirdparty%2Fqemu.git mips/malta: fix CBUS UART interrupt pin 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 Reviewed-by: Eric Johnson Signed-off-by: Aurelien Jarno (cherry picked from commit 68d001928b151a0c50f367c0bdca645b3d5e9ed3) Signed-off-by: Michael Roth --- diff --git a/hw/mips_malta.c b/hw/mips_malta.c index ad23f26e597..9289a28f7fa 100644 --- a/hw/mips_malta.c +++ b/hw/mips_malta.c @@ -860,7 +860,8 @@ void mips_malta_init (ram_addr_t ram_size, 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);