From patchwork Thu Jun 22 16:22:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 779595 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 3wtn3L15yLz9sNv for ; Fri, 23 Jun 2017 02:24:30 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3wtn3K6NxjzDr53 for ; Fri, 23 Jun 2017 02:24:29 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3wtn1x0MnTzDr4w for ; Fri, 23 Jun 2017 02:23:16 +1000 (AEST) Received: from pasglop.austin.ibm.com (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id v5MGMaCN024844; Thu, 22 Jun 2017 11:22:46 -0500 From: Benjamin Herrenschmidt To: skiboot@lists.ozlabs.org Date: Thu, 22 Jun 2017 11:22:04 -0500 Message-Id: <20170622162225.26344-3-benh@kernel.crashing.org> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170622162225.26344-1-benh@kernel.crashing.org> References: <20170622162225.26344-1-benh@kernel.crashing.org> Subject: [Skiboot] [PATCH 03/24] phb4: Workaround bug in spec 053 X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.23 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" Wait for DLP PGRESET to clear *after* lifting the PCIe core reset Signed-off-by: Benjamin Herrenschmidt --- hw/phb4.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/phb4.c b/hw/phb4.c index 5e709fe..d3e170a 100644 --- a/hw/phb4.c +++ b/hw/phb4.c @@ -3544,8 +3544,7 @@ static void phb4_init_hw(struct phb4 *p, bool first_init) in_be64(p->regs + PHB_PCIE_SCR)); /* Init_5 - Wait for DLP PGRESET to clear */ - if (!phb4_wait_dlp_reset(p)) - goto failed; + /* This is broken in spec 053, moving that step to after Init_16 */ /* Init_6 - deassert CFG reset */ creset = in_be64(p->regs + PHB_PCIE_CRESET); @@ -3582,6 +3581,10 @@ static void phb4_init_hw(struct phb4 *p, bool first_init) creset |= PHB_PCIE_CRESET_PIPE_N; out_be64(p->regs + PHB_PCIE_CRESET, creset); + /* (Moved from Init_5) */ + if (!phb4_wait_dlp_reset(p)) + goto failed; + /* Init_17 - PHB Control */ val = PHB_CTRLR_IRQ_PGSZ_64K; if (p->rev == PHB4_REV_NIMBUS_DD10) {