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 CE1C0C43334 for ; Thu, 21 Jul 2022 16:11:26 +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=tYWdovQ/exeJUY2EfW+2cVmJEqgxAqQ/h+P4yS2GxdQ=; b=uwRUXgLopU7JdV E06kMtX+oPvWzITYffkfdOXj8kz5Vx95Szk0fdjjSmZMk4pwxM9xheCNIq6IcpXtvQsLYYQvgMhZX ZEcoVkWYg2jVj2jlNbqRvWUvKSfNbAL7QJMAsk8bG489rW5U6FRMrV90uCp1zez0NZEb4evahP3bf fVIRDGsxH/dnkfNLv9fL1M5GrM+wsKf7l3Z09JdEwOHdJ84JJNR2WhrZYjDGo58nirqXlV/10IyrS Hw8F7Wtm8U18bDMvGYivI2l48Yj+J2pqbTgeXXikO0N2RJio+MGbKcS0yoy3xhjnlHk+OLdyJkGxo i/x53haNdhNEDFcrGgRg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEYko-009e0h-SZ; Thu, 21 Jul 2022 16:10:23 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEYkk-009dxe-3U; Thu, 21 Jul 2022 16:10:19 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 69C08B825A1; Thu, 21 Jul 2022 16:10:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7A13C341CE; Thu, 21 Jul 2022 16:10:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658419814; bh=zjEMXxvQfsb7nOkZ6WVZ/odfEb3wozMXvOYlBekZ6gA=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=XxIXrS3HIIKOKkGycN0c93jk/96JsOl5hmSGPiTEpF3eLDb9gTevw6jtwszfSoDro RrbC6SLOStxwUzGWa7v94cs7xpAkG4GSumD5tSUeyQdHHrDTP/sK5zswYvwzSDT/5h 5XN4p9QSYWgdvR4cgKXPQONld0/EN0pTBLRj3Mh8puX6vPpPMMRkIg1js9ybBPLOPN 3E83BYNlalWK/l+1KqAfQ1rHgbB1ausOpakX+qlPgyI4VAFv0dW6KV6Spm/heicwAB odXTFriKVie4M2pXlndqjErPjbB4rjMyRyZlQbKtstKVnmjWvXvpYy5JmPm4oVmapB BVG7UnISXkaHw== Date: Thu, 21 Jul 2022 11:10:13 -0500 From: Bjorn Helgaas To: Jim Quinlan Cc: Jim Quinlan , "open list:PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS" , Nicolas Saenz Julienne , Bjorn Helgaas , Lorenzo Pieralisi , Cyril Brulebois , "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" , Florian Fainelli , Lorenzo Pieralisi , Rob Herring , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , open list Subject: Re: [PATCH v2 2/6] PCI: brcmstb: Split brcm_pcie_setup() into two funcs Message-ID: <20220721161013.GA1725073@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220721_091018_462541_03DF07E6 X-CRM114-Status: GOOD ( 29.97 ) 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 On Thu, Jul 21, 2022 at 10:56:53AM -0400, Jim Quinlan wrote: > On Wed, Jul 20, 2022 at 4:37 PM Bjorn Helgaas wrote: > > On Mon, Jul 18, 2022 at 05:40:33PM -0500, Bjorn Helgaas wrote: > > > On Mon, Jul 18, 2022 at 01:14:25PM -0500, Bjorn Helgaas wrote: > > > > ... > > > > > > > So I think brcm_pcie_setup() does initialization that doesn't depend > > > > on the link or any downstream devices, and brcm_pcie_start_link() does > > > > things that depend on the link being up. Right? > > > > > > > > If so, "start_link" might be a slight misnomer since AFAICT > > > > brcm_pcie_start_link() doesn't do anything to initiate link-up except > > > > maybe deasserting fundamental reset. Some drivers start the LTSSM or > > > > explicitly enable link training, but brcm_pcie_start_link() doesn't > > > > seem to do anything like that. > > > > > > > > brcm_pcie_start_link() still does brcm_pcie_set_outbound_win(). Does > > > > that really depend on the link being up? If that only affects the > > > > Root Port, maybe it could be done before link-up? > > > > > > What about the /* PCIe->SCB endian mode for BAR */ thing? Does that > > > depend on the link being up? > > > > > > And the "Refclk from RC should be gated with CLKREQ#" part? Does that > > > depend on the link being up? > > > > > > It seems obvious that brcm_pcie_set_ssc() and reading the negotiated > > > link speed and width depend on the link being up. > > > > Can we close on this? Splitting into > > Absolutely. > > > (a) stuff that can be initialized before the link is available and > > (b) stuff that depends on the link > > > > makes good sense, but then (b) should only contain stuff that actually > > depends on the link. > > > > The "PCIe->SCB endian mode for BAR" *sounds* like something related to > > the primary side of the RP, not the link. > > > > Not sure about "Refclk from RC". RC would certainly be primary side, > > but ASPM has to do with secondary (link) side. > > I get the feedback, submission coming soon -- I was waiting for the > email thread to conclude. I don't expect a new posting of the patches in response to every question, but hopefully this is a conversation that goes both ways, and there's no need to slow down the conversation. It's more than acceptable to simply ask and answer questions and post updated patches later. We're running out of runway and I want to make sure we get this thing done this cycle. Bjorn _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel