From patchwork Tue Jan 21 07:28:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver O'Halloran X-Patchwork-Id: 1226270 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4820YH2tJQz9sPJ for ; Tue, 21 Jan 2020 18:29:55 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=XLAIZ44o; 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 4820YH1FkZzDqWh for ; Tue, 21 Jan 2020 18:29:55 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::1042; helo=mail-pj1-x1042.google.com; envelope-from=oohall@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=XLAIZ44o; dkim-atps=neutral Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4820X93VxzzDqTJ for ; Tue, 21 Jan 2020 18:28:57 +1100 (AEDT) Received: by mail-pj1-x1042.google.com with SMTP id d5so934315pjz.5 for ; Mon, 20 Jan 2020 23:28:57 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=OCdOGoWy0NNlIIuhhS2ZQ5LnYFwE1AgWZvzS3WrJAHM=; b=XLAIZ44o3nSAPzH6TL0TDpPWG3p6jlAZ0XSCrxj5f2riV90AM/AYvcOwF4IseyxpM/ 8jL+Da05DFoHvXrryWFUGSVL5hyIw4Hga+81cOfmxRXDBdQp2ZmGPu8YVd4hNygUHAsu DSGrHTwQv/VsuqaXnhFNN09Y+RpeQlARQvb7HhBLsHWtfx251fyXtHHU3aT7kzGf7niI pRyIGbhVFVpdDvib8IH0+STCnd7oIClMHxWmE0QoxN9ZL1tCBmSB8KwjWQGzu50as54N YshPo0Rxj6ELqvdLiVolB4jZVm2adnQAMVRYWqgZAi+TBMNUEKS8EQ+Oi2ZosIgp+xEN MHnw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=OCdOGoWy0NNlIIuhhS2ZQ5LnYFwE1AgWZvzS3WrJAHM=; b=bXBjbtME/GUAle5IAjr8BtUl4orgiWpJ+xUVWNPT1+3I7DmGeKrrsq0S0VgWj1onWU qFmtn5Uzr9VlxzA+7YB8WvOE6/x4OfI6pEeUFgoMqzECpuqa63WWY+gWg2KqBzp8XAc9 wFQIVcb151rO5HuQCNVlG3xHX69/j4KwkdAbnGOd0VsgOfjxZhT3cxw3LjwYSELWodBR BpVgshwqYbwHrzKKWod3PHT7jVD9CaXLZX+RhregJ088K0No0vBye8yH148nUvx26Y1A ep3tNhhz2yg2sAUGzIBlhTG9bEIZ87RMhImPrbTL1gOmJD3oWxC9QQmaWDN3M5/AxjjV 9jRw== X-Gm-Message-State: APjAAAWqfhBkEt32PatcVqNtnb6w9yYkdSAnjW6vcwb+lNVm14vFVbvv 01BGhf4MBsKUCwMJrI4g2SE+EX3U X-Google-Smtp-Source: APXvYqzFjdDHsSb8QQ/sxpiEDKbGWIdcSPEpzXNt8/Ym2xQQi6j7u+GjRjWRkfBby19YNOl0jCu1Ug== X-Received: by 2002:a17:902:b78b:: with SMTP id e11mr4149200pls.129.1579591735439; Mon, 20 Jan 2020 23:28:55 -0800 (PST) Received: from wafer.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id u3sm41027750pga.72.2020.01.20.23.28.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2020 23:28:55 -0800 (PST) From: Oliver O'Halloran To: skiboot@lists.ozlabs.org Date: Tue, 21 Jan 2020 18:28:37 +1100 Message-Id: <20200121072838.2771-4-oohall@gmail.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200121072838.2771-1-oohall@gmail.com> References: <20200121072838.2771-1-oohall@gmail.com> MIME-Version: 1.0 Subject: [Skiboot] [PATCH 4/5] hw/phb4: Factor out interrupt setup X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Move the unmasking (enabling) of the various PHB error and informational interrupts out of the main init sequence. We'll need this elsewhere to enable the PHB error interrupts. Signed-off-by: Oliver O'Halloran --- hw/phb4.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/hw/phb4.c b/hw/phb4.c index 7bbed8a8a829..5f8b9b8f7ac8 100644 --- a/hw/phb4.c +++ b/hw/phb4.c @@ -3501,6 +3501,16 @@ static struct pci_slot *phb4_slot_create(struct phb *phb) return slot; } +static void phb4_int_unmask_all(struct phb4 *p) +{ + /* Init_126..130 - Re-enable error interrupts */ + out_be64(p->regs + PHB_ERR_IRQ_ENABLE, 0xca8880cc00000000ull); + out_be64(p->regs + PHB_TXE_ERR_IRQ_ENABLE, 0x2008400e08200000ull); + out_be64(p->regs + PHB_RXE_ARB_ERR_IRQ_ENABLE, 0xc40038fc01804070ull); + out_be64(p->regs + PHB_RXE_MRG_ERR_IRQ_ENABLE, 0x00006100008000a8ull); + out_be64(p->regs + PHB_RXE_TCE_ERR_IRQ_ENABLE, 0x60510050c0000000ull); +} + static uint64_t phb4_get_pesta(struct phb4 *p, uint64_t pe_number) { uint64_t pesta; @@ -5302,11 +5312,7 @@ static void phb4_init_hw(struct phb4 *p) PCI_CFG_STAT_RECV_PERR); /* Init_126..130 - Re-enable error interrupts */ - out_be64(p->regs + PHB_ERR_IRQ_ENABLE, 0xca8880cc00000000ull); - out_be64(p->regs + PHB_TXE_ERR_IRQ_ENABLE, 0x2008400e08200000ull); - out_be64(p->regs + PHB_RXE_ARB_ERR_IRQ_ENABLE, 0xc40038fc01804070ull); - out_be64(p->regs + PHB_RXE_MRG_ERR_IRQ_ENABLE, 0x00006100008000a8ull); - out_be64(p->regs + PHB_RXE_TCE_ERR_IRQ_ENABLE, 0x60510050c0000000ull); + phb4_int_unmask_all(p); /* Init_131 - Re-enable LEM error mask */ out_be64(p->regs + PHB_LEM_ERROR_MASK, 0x0000000000000000ull);