Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3570561imw; Mon, 18 Jul 2022 10:24:25 -0700 (PDT) X-Google-Smtp-Source: AGRyM1twiu54t4DVHIfeOqIYRHWIN7hpgDN1cP+F3N+wpDHRf+Z/L8aUzP0ZpHPsF1vpyRquYfeR X-Received: by 2002:a05:6402:1003:b0:43a:75d8:a0e with SMTP id c3-20020a056402100300b0043a75d80a0emr39121906edu.303.1658165065611; Mon, 18 Jul 2022 10:24:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658165065; cv=none; d=google.com; s=arc-20160816; b=SQ9csJV55X9l4oxtFsgaYowbPHzzA7oLScS4kuYlBtp0OhHwiIv0E+9ImtlCAw0H4B P1eqD2dsyu/68Qwtuj3/RGYOPzwe365TN+SUpWibFMyoiyG7cusY8/EmTajdW3o6+oPi nY4hvLyflopi2h9rT0t4LjDZs2HwEPrdC9MDVvs+lChNWBaHkmR5h8mCJ+dmSPgxMQnY /fYAOsU3rPwJZJkDN8uXHwsWD+UcRuGPdJ+CZMOGvU50/wZeXVfgzbiD57QgxTo9s1dB YMFoqFxx8xrbpsqWaWeElK8nkKHK/kWpd00V9QPlnGBtOLbXZMVTitmu9J2B6+H2Zsyo S+ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=QyhG5mOOmHJjmlJvhObucaSOhiSLRl6u/RRFks8+txg=; b=E1oRKXBMHFxATBMNhO8pUPhH+4qDyLj9SNAfjFSeUX+QxvcLYvSoggFmHl1gNlwNJ8 a/92Ht7JuwUKcBz18po0KPouazC2Fp+kmpsjZe3hx/9KNJDwJY//DTCqMldKtbCWV/NS 87kCCF6vdy082jEotL+5lj7obJ5Y1cg43D6mNojmjVrLmBN2uXijXDIyc7XSkwT4V9Zq fgkBHEC7TskWkbrAZj33DM0E6Hr4RVcGM6B9Q/G7h9qB5GBCo3XfXV0DTKRjAeLQWDBY FuZqx/w/2IR9U/9RXDAuvL5k8drGLwaIiYLYYp8udPrZ2QLRPZZGEI/ctGQlZbGR9RNp tdaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AE38lBIH; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne35-20020a1709077ba300b006febfa8bf0asi10770366ejc.509.2022.07.18.10.24.00; Mon, 18 Jul 2022 10:24:25 -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=@kernel.org header.s=k20201202 header.b=AE38lBIH; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235551AbiGRRFf (ORCPT + 99 others); Mon, 18 Jul 2022 13:05:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232158AbiGRRFe (ORCPT ); Mon, 18 Jul 2022 13:05:34 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04D032B622; Mon, 18 Jul 2022 10:05:33 -0700 (PDT) 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 9A022B815EB; Mon, 18 Jul 2022 17:05:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12D44C341C0; Mon, 18 Jul 2022 17:05:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658163930; bh=NpNHG6pmchwQ409hpbZwAVUVi/yVIIYsl+KgN+lpnlI=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=AE38lBIHjYZUAcQjGP65ivuC3zFT70BRn55zJRJLO+EDqJWv6XvD2Aln3csyBv2yj ALPdR3ZWOthySxaF3vXDNZkC1+EtUdGVw5iN1p9tp/hy+oujtxakaOUPnZ7izPhVdZ gyU51VqfZkG3ukwoLt8aHK/ZrlKuynUidMW2w9n9z9fQ77Tx9rfkXrm4wKemYtzyjs 41fialOYtviXGgdOS7MgCD6BpYl3FpWYHS4HBXWfdtXyzysCC5Z1rI3Q8OZhzX1kEk PaUj43SnrdYpqAAMyuYmYpw8bCEau106BLimuubh1X7OfJW5IeoBNup4wyLSyGYdLU hl/M49kndjenQ== Date: Mon, 18 Jul 2022 12:05:28 -0500 From: Bjorn Helgaas To: Jim Quinlan Cc: Pali =?iso-8859-1?Q?Roh=E1r?= , 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: <20220718170528.GA1426959@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 On Mon, Jul 18, 2022 at 09:37:08AM -0400, Jim Quinlan wrote: > On Mon, Jul 18, 2022 at 9:11 AM Pali Roh?r wrote: > > > > Hello! > > > > On Saturday 16 July 2022 18:24:49 Jim Quinlan wrote: > > > @@ -948,6 +941,40 @@ static int brcm_pcie_setup(struct brcm_pcie *pcie) > > > if (pcie->gen) > > > brcm_pcie_set_gen(pcie, pcie->gen); > > > > > > + /* Don't advertise L0s capability if 'aspm-no-l0s' */ > > > + aspm_support = PCIE_LINK_STATE_L1; > > > + if (!of_property_read_bool(pcie->np, "aspm-no-l0s")) > > > + aspm_support |= PCIE_LINK_STATE_L0S; > > > + tmp = readl(base + PCIE_RC_CFG_PRIV1_LINK_CAPABILITY); > > > + u32p_replace_bits(&tmp, aspm_support, > > > + PCIE_RC_CFG_PRIV1_LINK_CAPABILITY_ASPM_SUPPORT_MASK); > > > + writel(tmp, base + PCIE_RC_CFG_PRIV1_LINK_CAPABILITY); > > > + > > > + /* > > > + * For config space accesses on the RC, show the right class for > > > + * a PCIe-PCIe bridge (the default setting is to be EP mode). > > > + */ > > > + tmp = readl(base + PCIE_RC_CFG_PRIV1_ID_VAL3); > > > + u32p_replace_bits(&tmp, 0x060400, > > > > There is already macro PCI_CLASS_BRIDGE_PCI_NORMAL, so please use it > > instead of magic constant. > > Will do, thanks. I can fix that up locally. > > I introduced it recently in commit: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=904b10fb189cc15376e9bfce1ef0282e68b0b004 > > > > > + PCIE_RC_CFG_PRIV1_ID_VAL3_CLASS_CODE_MASK); > > > + writel(tmp, base + PCIE_RC_CFG_PRIV1_ID_VAL3); > > > + > > > + return 0; > > > +} > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel