From patchwork Mon Nov 27 04:49:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver O'Halloran X-Patchwork-Id: 841475 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ylZ8P5XWXz9sDB for ; Mon, 27 Nov 2017 15:49:25 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="tukqk43r"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3ylZ8P11gLzDrKS for ; Mon, 27 Nov 2017 15:49:25 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="tukqk43r"; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400e:c00::241; helo=mail-pf0-x241.google.com; envelope-from=oohall@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="tukqk43r"; dkim-atps=neutral Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3ylZ8H1XffzDr8S for ; Mon, 27 Nov 2017 15:49:18 +1100 (AEDT) Received: by mail-pf0-x241.google.com with SMTP id a84so16868294pfl.0 for ; Sun, 26 Nov 2017 20:49:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=2ZFVFWR0QexOQW/p0lVhA7bUCeJsSUqRxiaNu+LgVLc=; b=tukqk43rf/O+lW/f0HMR6CE6FYU+FhuZCOGNP7AcTFNYFr9aP/V5qu5rOLev9tPVVe MAHSNW1G0knKWPxyNZyFeUtudpcAK5iqlZ7iTRhvXX1M8TtLnp5G02qjtdDJSqwU2Ekc G8gIIjGcjFbshNAKjI++Pb6kPMDPpDeyGYWbVds2lHKa45XB5ae3qAVFkBApI3BYH3yE 09DW2t2Qn3HoQFF8RCVOhC5XCdtFDDUTCPoCiR6aC1Gth1RAvFZ7tasTiBp9kmYLaKBW 8Qk3HiXTEiJjiZgZJoancvnzGthTfm0zdru57sDoWzRZnjMU9B8F5GpRdIZGaWb66qSO /lKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=2ZFVFWR0QexOQW/p0lVhA7bUCeJsSUqRxiaNu+LgVLc=; b=rbBgWG0MUlx14AHq+4NdN8iP7v/05Y5MfZPoSnhRE5VXFWzMwtvZWnHrT1mH7E+42H zWfDcKZ+4segjC8EbMQxYniewzoq1hdfudH6UmZnsCBu7jrxLD3U5h/uLraGIX+V6k8s xrPgR2WXmQ0ofF5ylt81hnzpFKkxgyOsUnMzpANILw15jTlEEk/+ydCa7C5Rnaby4qqc 4TopDWC5dKpTOQz6OmSNL5s3mbJQPs2mba7ntZXdFF0btoCJQ91tTvv55nLZOQwf/FSX /3yH51c/MBoMG1HJe0IgjOWr2BghY9RXe1n5HDc+Du7TmzrsH/m3LqzHxK0gXeSG9MIp mGRw== X-Gm-Message-State: AJaThX4NGsbEjR9ctT8CpZ1/ZFbRfVTE/D7Xi7Wkt5WXzMVLKpGibMv0 7Eb1tM1azlXrLRVe6DnR18JeAA== X-Google-Smtp-Source: AGs4zMa7uYVkdKpxS5swBxWd3Y3HPwx1y8l8tDoKlcdWXI3/ZDmiCnhtu3U8UQXQJkBRSnnuF1Ptaw== X-Received: by 10.99.155.9 with SMTP id r9mr9517922pgd.202.1511758155746; Sun, 26 Nov 2017 20:49:15 -0800 (PST) Received: from flat-canetoad.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id u13sm38683234pgb.68.2017.11.26.20.49.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Nov 2017 20:49:15 -0800 (PST) From: Oliver O'Halloran To: skiboot@lists.ozlabs.org Date: Mon, 27 Nov 2017 15:49:04 +1100 Message-Id: <20171127044904.12861-1-oohall@gmail.com> X-Mailer: git-send-email 2.9.5 Subject: [Skiboot] [PATCH] lpc: Clear pending IRQs at boot X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" When we come in from hostboot the LPC master has the bus reset indicator set. This error isn't handled until the host kernel unmasks interrupts, at which point we get the following suprious error: [ 20.053560375,3] LPC: Got LPC reset on chip 0x0 ! [ 20.053564560,3] LPC[000]: Unknown LPC error Error address reg: 0x00000000 Fix this by clearing the various error bits in the LPC status register before we initalise the skiboot LPC bus driver. Signed-off-by: Oliver O'Halloran --- hw/lpc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/lpc.c b/hw/lpc.c index 663bffbcc18e..dbb2d4b211d4 100644 --- a/hw/lpc.c +++ b/hw/lpc.c @@ -1176,6 +1176,10 @@ static void lpc_init_chip_p9(struct dt_node *opb_node) /* Mask all interrupts for now */ opb_write(lpc, lpc_reg_opb_base + LPC_HC_IRQMASK, 0, 4); + /* Clear any stale LPC bus errors */ + opb_write(lpc, lpc_reg_opb_base + LPC_HC_IRQSTAT, + LPC_HC_IRQ_BASE_IRQS, 4); + /* Default with routing to PSI SerIRQ 0, this will be updated * later when interrupts are initialized. */