Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965393AbcJXWRp (ORCPT ); Mon, 24 Oct 2016 18:17:45 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:36130 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965299AbcJXWRl (ORCPT ); Mon, 24 Oct 2016 18:17:41 -0400 From: Ray Jui To: Bjorn Helgaas , Bjorn Helgaas Cc: linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-pci@vger.kernel.org, Alex Barba , Oza Oza , Ray Jui , Ray Jui , Ray Jui Subject: [PATCH 02/12] PCI: iproc: Do not reset PAXC when initializing the driver Date: Mon, 24 Oct 2016 15:17:02 -0700 Message-Id: <1477347432-17656-3-git-send-email-ray.jui@broadcom.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1477347432-17656-1-git-send-email-ray.jui@broadcom.com> References: <1477347432-17656-1-git-send-email-ray.jui@broadcom.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1412 Lines: 41 During initialization, the current iProc PCIe host driver resets PAXC and the downstream internal endpoint device that PAXC connects to. If the endpoint device is already loaded with firmware and has started running from the bootloader stage, this downstream reset causes the endpoint device to stop working Signed-off-by: Ray Jui Reviewed-by: Scott Branden --- drivers/pci/host/pcie-iproc.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c index a9b9cd8..3f4884a 100644 --- a/drivers/pci/host/pcie-iproc.c +++ b/drivers/pci/host/pcie-iproc.c @@ -243,16 +243,13 @@ static void iproc_pcie_reset(struct iproc_pcie *pcie) { u32 val; - if (pcie->ep_is_internal) { - val = iproc_pcie_read_reg(pcie, IPROC_PCIE_CLK_CTRL); - val &= ~PAXC_RESET_MASK; - iproc_pcie_write_reg(pcie, IPROC_PCIE_CLK_CTRL, val); - udelay(100); - val |= PAXC_RESET_MASK; - iproc_pcie_write_reg(pcie, IPROC_PCIE_CLK_CTRL, val); - udelay(100); + /* + * PAXC and the internal emulated endpoint device downstream should not + * be reset. If firmware has been loaded on the endpoint device at an + * earlier boot stage, reset here causes issues + */ + if (pcie->ep_is_internal) return; - } /* * Select perst_b signal as reset source. Put the device into reset, -- 2.1.4