Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp642281imi; Thu, 21 Jul 2022 08:09:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t7CSTY5N6q31T0c+Qf3g6RCSFjKvfugWvwV7hOCU4RYibIWJ775q+0xsyuyAraCYKhwJW6 X-Received: by 2002:a17:906:8456:b0:72b:88c6:a374 with SMTP id e22-20020a170906845600b0072b88c6a374mr40865148ejy.615.1658416194872; Thu, 21 Jul 2022 08:09:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658416194; cv=none; d=google.com; s=arc-20160816; b=uybpqOC5Dhu3cZY7UQaoDeC0xcuIBaS7sYZ5gvPceKsVHo4NvKaj++dTQozHup1m0j XH1pCbH74WWP7g0mjBUxyFn4wM8E0EDWamfajGyjVJuwWY5sZLTy0QbAJ3r0n99oJrA+ dGC3E1UPUYeuNuXfhGrkc2A86ihCgxNUVAxjiJl09Zkyr799QCXGojPjuSK1Ysr6AQfx dw4Q17xfPmBlWV7zYQnySp2AwBOEqCBK0ctp3C8IBr2VbisWstcXnSykP3HynfEGoL4n FLAuY5dSUIKNi01QQJkBgMIYz5IC1midns6oREDqrw1JF8hzVKGhg4dV4E6hcFpxfzRt A3uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=exCI3TR0kc6ObjwGiSEPtQxiqL802InWe30/x4Adv3Q=; b=wyD3nZSh7fZTMQzOm4tO+x4hA47NEUuhWwxHABhAkBh425m4yHNeOqn9iLm015SCif GZao+x2ZrSjvqbncSH1HOlbKSgtzmnrUqjnT5CIc4lHE+0THfEWs40oaQ+tUavdENtJR cqcqntZijBMOAr9CqIsYa1aa2r85n6Zwq5wl+CXoU0XikQnKYcmIrn3u7KTGWDzz5m+9 y+oOeTP33r+NFaiDwp57+EEaHVTSHiZiZpwJpfbLVg5mfhOftRVbSeEzs9rc6K//jeKh xM4GtXRBxOF1u+OqNWrYpIGzrkdWf8jAVZae8BoPKIXPUIpvBP+JkZpXiX1OHxqFPI63 258Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=KMNnYZj3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i1-20020a05640242c100b0043b9ed65c15si3131659edc.625.2022.07.21.08.09.29; Thu, 21 Jul 2022 08:09:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=KMNnYZj3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232411AbiGUO5K (ORCPT + 99 others); Thu, 21 Jul 2022 10:57:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231639AbiGUO5I (ORCPT ); Thu, 21 Jul 2022 10:57:08 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9883D49 for ; Thu, 21 Jul 2022 07:57:07 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id b11so3556461eju.10 for ; Thu, 21 Jul 2022 07:57:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=exCI3TR0kc6ObjwGiSEPtQxiqL802InWe30/x4Adv3Q=; b=KMNnYZj3gibuOQuztf8X+aPeMkdVs0vHBowELYbMwZ4++ad1Gyt0+6PFYzNwatRWy2 Z2EAws1rLlIuy1G5RiyLrfaynLIGS7EVkW2jheD9SFoAE8FWNFNVNxGNHdO+svmhi02C idm/DAOZAS5Y7OWXvvciBPFMR/JQF7/cC7SWU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=exCI3TR0kc6ObjwGiSEPtQxiqL802InWe30/x4Adv3Q=; b=ybHkpmSB9YMnynu9l+ofquPMjDL0kVtMWm+fpPOJod0OEYOnnnq0lHBG+MD/ifRVh4 UYdfvSPv3SEI0Ch6226PWKnG8k2Z2crtUHjPZgGUsUEBapm8tDObWTyOSG27xBLI+nVW fYjArl6U7LC16rqpneiHswopW++O8qlpq45fYxcQxCNZ7/akqz4Qy8smN9w/IkabZ7tG 9HXMiMt15ecXj2aBM+eu4BQRzRrk8lVL99LVCPQPFVaRT9pSmMihpU6OXNUqUx9uJkcT PYOYu5C8zt3Ly7A05sv6gwY2YSNHXnhxKbPhcp0AWzqGwNEapXavmQ4XNfMzgz3Dwaz2 r2ww== X-Gm-Message-State: AJIora9417pHRTpEVCxdSXVGhqrZU7v3jfc0xasCiyn3+RTkLbIV3/bt aG1dNn8tmOe7/+JgZW4XaAcPIKso4N8AA1+BYz0zAA== X-Received: by 2002:a17:906:106:b0:715:7cdf:400f with SMTP id 6-20020a170906010600b007157cdf400fmr41073145eje.1.1658415425127; Thu, 21 Jul 2022 07:57:05 -0700 (PDT) MIME-Version: 1.0 References: <20220718224033.GA1450714@bhelgaas> <20220720203705.GA1654821@bhelgaas> In-Reply-To: <20220720203705.GA1654821@bhelgaas> From: Jim Quinlan Date: Thu, 21 Jul 2022 10:56:53 -0400 Message-ID: Subject: Re: [PATCH v2 2/6] PCI: brcmstb: Split brcm_pcie_setup() into two funcs To: Bjorn Helgaas 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 , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , open list Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="00000000000061bdff05e451ee1d" X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --00000000000061bdff05e451ee1d Content-Type: text/plain; charset="UTF-8" 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. Regards, Jim Quinlan Broadcom STB > > Bjorn --00000000000061bdff05e451ee1d Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQbgYJKoZIhvcNAQcCoIIQXzCCEFsCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg3FMIIFDTCCA/WgAwIBAgIQeEqpED+lv77edQixNJMdADANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA5MTYwMDAwMDBaFw0yODA5MTYwMDAwMDBaMFsxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTEwLwYDVQQDEyhHbG9iYWxTaWduIEdDQyBS MyBQZXJzb25hbFNpZ24gMiBDQSAyMDIwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA vbC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