From patchwork Tue Sep 9 14:53:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 37120 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6440320566 for ; Tue, 9 Sep 2014 14:54:53 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id tp5sf13676061ieb.9 for ; Tue, 09 Sep 2014 07:54:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=Eiv4wfww+zVBSK1VdCg6ejzeHd112WT5O07Q8r0TJcU=; b=AZS5V+EGEP1YZ78wW+G/FrUx877JgmTBuuDZakqB4Sz+LMBTOfY04s4A0R6nvmoAcF OzGympVS6knabGr4rkwIF1feyuqK09GnFjAxNbberm2HH/Wy1caXIy25CqD1uuagKKNZ 7h4sYEQ16Fj+laokwNJGRH/07PPCo2M2gwNOzaMZQ8xKAAx15yMlKpVG4fj+3tFvqOqF 4+I4C5rkreAZT5aKCaglZkdTD1beuaZlq9+FVL8uiTtdpKSTquyS1C/d3qVyMoL4ezWL kPSv4EBr4E33Zp92/2fXm7uGiFmvRJ7Hyzty2X9RnPVG6tABu/FihP5D7I6+q6Ugq8vf u1Uw== X-Gm-Message-State: ALoCoQn/Z5FfvJERRfyB4YfrDXDbH8ZswNPxM4MHIsk/cUEEY0oMJMxJ+7InqetCtrvIOpJXq3uJ X-Received: by 10.50.25.129 with SMTP id c1mr1836828igg.7.1410274493052; Tue, 09 Sep 2014 07:54:53 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.21.50 with SMTP id 47ls2184775qgk.6.gmail; Tue, 09 Sep 2014 07:54:53 -0700 (PDT) X-Received: by 10.221.26.70 with SMTP id rl6mr3311995vcb.0.1410274492975; Tue, 09 Sep 2014 07:54:52 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id xj13si5232278vcb.60.2014.09.09.07.54.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Sep 2014 07:54:52 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id la4so574424vcb.8 for ; Tue, 09 Sep 2014 07:54:52 -0700 (PDT) X-Received: by 10.220.169.72 with SMTP id x8mr6286472vcy.45.1410274492910; Tue, 09 Sep 2014 07:54:52 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp296334vcb; Tue, 9 Sep 2014 07:54:52 -0700 (PDT) X-Received: by 10.180.13.83 with SMTP id f19mr29988805wic.80.1410274491974; Tue, 09 Sep 2014 07:54:51 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id qp4si17629000wjc.19.2014.09.09.07.54.51 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 09 Sep 2014 07:54:51 -0700 (PDT) Received-SPF: none (google.com: pm215@archaic.org.uk does not designate permitted sender hosts) client-ip=81.2.115.146; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1XRMnf-0002T4-AS; Tue, 09 Sep 2014 15:53:43 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Ard Biesheuvel , Christoffer Dall , Rob Herring Subject: [PATCH] hw/arm/virt: fix pl011 and pl031 irq flags Date: Tue, 9 Sep 2014 15:53:43 +0100 Message-Id: <1410274423-9461-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 Acked-by: Christoffer Dall --- 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);