mips/malta: fix CBUS UART interrupt pin
PATCH 1/1 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.
--- hw/mips_malta.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
hw/mips_malta.c +2 -1
@@ -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);
Signature · 1 line
1.7.10.4
Quoted 38 lines
-----Original Message-----
From: [email protected] [mailto:qemu-devel- [email protected]] On Behalf Of Aurelien Jarno
Sent: Wednesday, November 14, 2012 6:38 AM
To: [email protected]
Cc: Aurelien Jarno
Subject: [Qemu-devel] [PATCH] mips/malta: fix CBUS UART interrupt pinAccording 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 <[email protected]>Signed-off-by Aurelien Jarno <[email protected]>--- hw/mips_malta.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)hw/mips_malta.c +2
-1@@ -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 ]);
Quoted 5 lines
/* Load firmware in flash / BIOS. */ dinfo = drive_get(IF_PFLASH, 0, fl_idx);--
1.7.10.4
I double checked with a Malta expert here. He verified that the CBUS UART is connected to the HW2 interrupt pin.
-Eric
Quoted 46 lines · Eric
Quoted 38 lines
-----Original Message-----
From: [email protected] [mailto:qemu-devel- [email protected]] On Behalf Of Aurelien Jarno
Sent: Wednesday, November 14, 2012 6:38 AM
To: [email protected]
Cc: Aurelien Jarno
Subject: [Qemu-devel] [PATCH] mips/malta: fix CBUS UART interrupt pinAccording 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 <[email protected]>Signed-off-by Aurelien Jarno <[email protected]>--- hw/mips_malta.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)hw/mips_malta.c +2
-1@@ -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 ]);Quoted 5 lines
/* Load firmware in flash / BIOS. */ dinfo = drive_get(IF_PFLASH, 0, fl_idx);--
1.7.10.4I double checked with a Malta expert here. He verified that the CBUS UART is connected to the HW2 interrupt pin.
Quoted 2 lines
Reviewed-by Eric Johnson <[email protected]>
Thanks for the review, I have applied the patch.
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net