From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C1E8CC48BC1 for ; Wed, 14 Feb 2024 19:13:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=xPXUcncLbFdP/UB3yY9JS1uVd5Y0xwfCYeMwfEeEeF8=; b=YD//AhYtn8RCIG VjTLhum/8Rb4DuxcAf62Ptge/hGdIbk+UQwkjtsTqzN0kvaUJczfIqdIq+/n01qECz1qY1igaoqeO 3PkXfFfI3bVMC0BkToUOHYM9Q8H6ijEGru+rTAV8k9B8e0Hrnslxsy3IVacSq2zENYvNOOW7YE1bc BZ1hC7NP+iyT7pMVh1JmGp9K6/NzXQQTdrblkLJDg7eJJfpIAOM4UAlnFo2EC6Pq5pfHooMV9prmh uGfx2rOOevfL/RHFd0q5MLigWoLNnshEG4uJvLe8sHRTzeDIPM0TthQMm/xzK9qPYfbLT67DPxWAW uO5GytXvD8OWy4eEQsDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raKgi-0000000E2qu-0MI4; Wed, 14 Feb 2024 19:12:56 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1raKgf-0000000E2qZ-1AQI for linux-arm-kernel@lists.infradead.org; Wed, 14 Feb 2024 19:12:54 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id A2CBBCE2281; Wed, 14 Feb 2024 19:12:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99C9DC433C7; Wed, 14 Feb 2024 19:12:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707937970; bh=GaNW4qJLhcZQPDq6m88xXy4RMPI4Vwk6x2NaA/U2ssA=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=F4cChNzyKBXOwwfxXYohSyCAMg1dlwLd7cLrxNDuPtwGDI382Mp2mpUlZQn8prFf/ NdIU32bTxG4qoylo01LS3cDpCML72NtUL+SNhUdTb+GZev1zuUtUCZi8Zy+LNtKy4z tDEhQZZmpodutqmmBYham8OPm8HxdjIaaNgDx72vr/VowZGVFLXa4fOGHEl8cnUFXt EpU6rWFIc7mrdCoeTkIrjPPgXfFkXD6jMz4T8kFCmOoLHIZuQ9fJISSddWwaMewxMA n8Ox+OnzOe4tapu+/U0GoqEvw13IhuXjYdVFhTAy6fJU6pcSA/PFN+h1Op4gvLaT4S h7NGbTQbsSSFA== Date: Wed, 14 Feb 2024 13:12:49 -0600 From: Bjorn Helgaas To: Vidya Sagar Cc: Lorenzo Pieralisi , bhelgaas@google.com, robh+dt@kernel.org, mark.rutland@arm.com, thierry.reding@gmail.com, jonathanh@nvidia.com, Kishon Vijay Abraham I , catalin.marinas@arm.com, Will Deacon , jingoohan1@gmail.com, gustavo.pimentel@synopsys.com, digetx@gmail.com, mperttunen@nvidia.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kthota@nvidia.com, mmaddireddy@nvidia.com, sagar.tv@gmail.com Subject: Re: [PATCH V16 13/13] PCI: tegra: Add Tegra194 PCIe support Message-ID: <20240214191249.GA1263222@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190813113627.27251-14-vidyas@nvidia.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240214_111253_693188_E48FA61D X-CRM114-Status: GOOD ( 18.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Vidya, question about ancient history: On Tue, Aug 13, 2019 at 05:06:27PM +0530, Vidya Sagar wrote: > Add support for Synopsys DesignWare core IP based PCIe host controller > present in Tegra194 SoC. > ... > +static int tegra_pcie_dw_host_init(struct pcie_port *pp) > +{ > + struct dw_pcie *pci = to_dw_pcie_from_pp(pp); > + struct tegra_pcie_dw *pcie = to_tegra_pcie(pci); > + u32 val, tmp, offset, speed; > + > + tegra_pcie_prepare_host(pp); > + > + if (dw_pcie_wait_for_link(pci)) { > + /* > + * There are some endpoints which can't get the link up if > + * root port has Data Link Feature (DLF) enabled. > + * Refer Spec rev 4.0 ver 1.0 sec 3.4.2 & 7.7.4 for more info > + * on Scaled Flow Control and DLF. > + * So, need to confirm that is indeed the case here and attempt > + * link up once again with DLF disabled. This comment suggests that there's an issue with *Endpoints*, not an issue with the Root Port. If so, it seems like this problem could occur with all Root Ports, not just Tegra194. Do you remember any details about this? I don't remember hearing about any similar issues, and this driver is the only place PCI_EXT_CAP_ID_DLF is referenced, so maybe it is actually something related to Tegra194? > + val = appl_readl(pcie, APPL_DEBUG); > + val &= APPL_DEBUG_LTSSM_STATE_MASK; > + val >>= APPL_DEBUG_LTSSM_STATE_SHIFT; > + tmp = appl_readl(pcie, APPL_LINK_STATUS); > + tmp &= APPL_LINK_STATUS_RDLH_LINK_UP; > + if (!(val == 0x11 && !tmp)) { > + /* Link is down for all good reasons */ > + return 0; > + } > + > + dev_info(pci->dev, "Link is down in DLL"); > + dev_info(pci->dev, "Trying again with DLFE disabled\n"); > + /* Disable LTSSM */ > + val = appl_readl(pcie, APPL_CTRL); > + val &= ~APPL_CTRL_LTSSM_EN; > + appl_writel(pcie, val, APPL_CTRL); > + > + reset_control_assert(pcie->core_rst); > + reset_control_deassert(pcie->core_rst); > + > + offset = dw_pcie_find_ext_capability(pci, PCI_EXT_CAP_ID_DLF); > + val = dw_pcie_readl_dbi(pci, offset + PCI_DLF_CAP); > + val &= ~PCI_DLF_EXCHANGE_ENABLE; > + dw_pcie_writel_dbi(pci, offset, val); > + > + tegra_pcie_prepare_host(pp); > + > + if (dw_pcie_wait_for_link(pci)) > + return 0; > + } > + > + speed = dw_pcie_readw_dbi(pci, pcie->pcie_cap_base + PCI_EXP_LNKSTA) & > + PCI_EXP_LNKSTA_CLS; > + clk_set_rate(pcie->core_clk, pcie_gen_freq[speed - 1]); > + > + tegra_pcie_enable_interrupts(pp); > + > + return 0; > +} _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel