Received: from eggs.gnu.org ([2001:4830:134:3::10]:37008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRMow-0007Tf-9I for qemu-devel@nongnu.org; Tue, 09 Sep 2014 10:55:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRMor-0006z9-SN for qemu-devel@nongnu.org; Tue, 09 Sep 2014 10:55:02 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:46917) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRMor-0006xM-Mc for qemu-devel@nongnu.org; Tue, 09 Sep 2014 10:54:57 -0400 From: Peter Maydell Date: Tue, 9 Sep 2014 15:53:43 +0100 Message-Id: <1410274423-9461-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH] hw/arm/virt: fix pl011 and pl031 irq flags List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Rob Herring , Ard Biesheuvel , Christoffer Dall , patches@linaro.org The pl011 and pl031 devices both use level triggered interrupts, but the device tree we construct was incorrectly telling the kernel to configure the GIC to treat them as edge triggered. This meant that output from the pl011 would hang after a while. Signed-off-by: Peter Maydell Cc: qemu-stable@nongnu.org --- Thanks to Christoffer Dall for figuring out the cause of the hangs here. hw/arm/virt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index e8f231e..1b343f0 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -371,7 +371,7 @@ static void create_uart(const VirtBoardInfo *vbi, qemu_irq *pic) 2, base, 2, size); qemu_fdt_setprop_cells(vbi->fdt, nodename, "interrupts", GIC_FDT_IRQ_TYPE_SPI, irq, - GIC_FDT_IRQ_FLAGS_EDGE_LO_HI); + GIC_FDT_IRQ_FLAGS_LEVEL_HI); qemu_fdt_setprop_cells(vbi->fdt, nodename, "clocks", vbi->clock_phandle, vbi->clock_phandle); qemu_fdt_setprop(vbi->fdt, nodename, "clock-names", @@ -398,7 +398,7 @@ static void create_rtc(const VirtBoardInfo *vbi, qemu_irq *pic) 2, base, 2, size); qemu_fdt_setprop_cells(vbi->fdt, nodename, "interrupts", GIC_FDT_IRQ_TYPE_SPI, irq, - GIC_FDT_IRQ_FLAGS_EDGE_LO_HI); + GIC_FDT_IRQ_FLAGS_LEVEL_HI); qemu_fdt_setprop_cell(vbi->fdt, nodename, "clocks", vbi->clock_phandle); qemu_fdt_setprop_string(vbi->fdt, nodename, "clock-names", "apb_pclk"); g_free(nodename); -- 1.9.1