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 21584C43334 for ; Wed, 20 Jul 2022 20:38:25 +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=C4SmtIT542il5x1vRuCiIA1Suo1yfYWKrx4vaIz4vdY=; b=sPn8DhDBVov0qd oihydTQOMkYZeLf/H1apitNPB3G5ffwAkdqVHYROgnMNRBZAC1/AIT3uISvgWeZt1/cuXsKhr4ACa 0whKaOkOTC1KkrhBaqa2dbK/rKV+e3IHcFTJDXeBjh74ttFhDkXDwK3aNX8UV/x1Ba9LByT5Gsl8E PqR7xfH1cZmU4ZJpVTv8koclOJ88aT1fNqblxHB1N5ZXdMpKhCu1poP4XehlcKENGfzbmLCB0f16w RqT6WT0EyTPmB7GAae379Hemgfq5+XF5ksbUWROtxaIKwxiQNg734wtwPZ5W+q78/LBBc0ChY9YHD drvpM4w+e0H0TkALdXTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEGRb-00Apzy-Re; Wed, 20 Jul 2022 20:37:19 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEGRY-00Apu3-QA; Wed, 20 Jul 2022 20:37:18 +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 D9F69B821ED; Wed, 20 Jul 2022 20:37:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4630DC3411E; Wed, 20 Jul 2022 20:37:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658349427; bh=7PpBRv20MvSwwE36jMplF6JP0iKXxREOK8LZEaor688=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=jMAx2T3KOeZbhoBtYHqIwmEVTobmpeXTtp999f/G+GjFUkZPwlQBR+OBog38tBgJU q1LOLTUmlq6cBIZmoM7azA/nb0LXgzjM3AV/YmfrZOAZI+THEjnWIfOgAPfx7AQWXc 5BCjiLggpScM0Zx1Ml7T5/hCU7TTOw+U0rMkAyV2DRHHK81ZQrLninPD15othpv4HB 2VWsRzC11A7tk9m/n28R4+d2liQywt8OB4SvK2x4FdvRqBTAjSFCYKmCV9s/ZqOXMx D1XIGIT1Ci3jMSu05hNJxs93f3TRymkZFCwpfaWboobEzGH2BpMyWUR6/wD+FGwts4 1FtgbYp8na7iQ== Date: Wed, 20 Jul 2022 15:37:05 -0500 From: Bjorn Helgaas To: Jim Quinlan Cc: linux-pci@vger.kernel.org, Nicolas Saenz Julienne , Bjorn Helgaas , Lorenzo Pieralisi , Cyril Brulebois , bcm-kernel-feedback-list@broadcom.com, james.quinlan@broadcom.com, 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: <20220720203705.GA1654821@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220718224033.GA1450714@bhelgaas> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220720_133717_037635_709728DB X-CRM114-Status: GOOD ( 21.23 ) 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 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 (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. Bjorn _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel