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 CA7E9C433EF for ; Mon, 18 Jul 2022 17:06:43 +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=SdY7OT24cHcG3V7sojUkN79rvI6XWudoINX26ECj1dY=; b=NM1Aw3twgQaD93 +I8bjXFsj1Xh86GfenpoerWPnFlO16R3sxBAtc74fRml5UlBqlmbqSQpli+yGvmhLY7xO0vmh+wla 58N3jueYJY03YiU6/x6iS1iZwK+h1MncyZhfBQtadStOs3MG7Mgpz9iykyKUC7YpkfhSpFazGf1PH +Vygl7fB3MgojvcvOYioE63LOknjOQ2ry9/Y6L2iqe+U/bQIhzVD5lBp6nvGKEIQlRYh71xKaqtvg dMugKrbSwj4kGQQG4K2Shzgr9bsVoPDh0VxdCmsj/cYplnFDyBZWzXlaIfYD8EupW9E7BUYF3kmdH avWk2bg/3QWhppUFDvhw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oDUBc-00GzZ9-Uq; Mon, 18 Jul 2022 17:05:37 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oDUBX-00GzX8-Tf; Mon, 18 Jul 2022 17:05:33 +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 dfw.source.kernel.org (Postfix) with ESMTPS id 339A96154C; 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-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220718_100532_061798_F4755A69 X-CRM114-Status: GOOD ( 18.54 ) 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="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 09:37:08AM -0400, Jim Quinlan wrote: > On Mon, Jul 18, 2022 at 9:11 AM Pali Roh=E1r 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 *pci= e) > > > if (pcie->gen) > > > brcm_pcie_set_gen(pcie, pcie->gen); > > > > > > + /* Don't advertise L0s capability if 'aspm-no-l0s' */ > > > + aspm_support =3D PCIE_LINK_STATE_L1; > > > + if (!of_property_read_bool(pcie->np, "aspm-no-l0s")) > > > + aspm_support |=3D PCIE_LINK_STATE_L0S; > > > + tmp =3D 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 =3D 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/comm= it/?id=3D904b10fb189cc15376e9bfce1ef0282e68b0b004 > > > > > + 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel