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 E0ABDC43334 for ; Mon, 18 Jul 2022 13:12:40 +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:References: 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: List-Owner; bh=jJ1njTop95kXysDg6ULKDwdZtGezGVX2ZQgd14qRnio=; b=QxbPYHj2bqdzh4 7p+EgV1uwPbYgsRMwDau/O6beLh9/cWkmgcgNSAf2AGvEUerdYjgxejhZ26DdQvO7c6nzsP5OrIYH WkxBNbfhz9MfOT/hUdJkKAEm+vZEG93OZxGnAZA7yCRmBU6K8CY5YK5UF7rwlUz1bUAvyOduxBK3v zGr4sIhM3j6s0PdCS/vWTc9R6hdbQRNLGtHBrZXXAqqm8XGDr6LsemrlipVO8vzBWF2ZBKO1fXx7N wg2q4EJZnHymg6bJ9je1ohFuPQnw4a6UmGrInyNTNtClYo8C+QRxai0QSZLfabapH8whaWa2ph4Kd i3PBdiwKdCWjhrM7mBiA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oDQXI-00Dc0b-23; Mon, 18 Jul 2022 13:11:44 +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 1oDQXC-00Dbww-7u; Mon, 18 Jul 2022 13:11:42 +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 E6875B81608; Mon, 18 Jul 2022 13:11:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C460C341C0; Mon, 18 Jul 2022 13:11:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658149894; bh=MhGofgDoMMDBdAYGoofIPmQh3z/yVJHsZX4HZNkNyqU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ChJF1Wyq7nDl3fBXZP72NQONyySuxH8CVGQp/Ro3xH6Wpl2RCdplHf8pIwjn12+Oj HfMgZY5rGxRQ9uAn9xNq2/bXVppk2Ws//EAF7y55ZYXazqv0a3d1U2qJLae6jz0Wna 0MA1/oKD9LCHWfujdie9UM3oJeuoBXCXrFaZSRtInlCQH3Qt5hO4iBpCZDaYX//ZDB o9H1j7ZVZXrcMcCskmXSHIuK5U1NvCpYJcKDC0B8fRP1ubDfOB4kdhe42nuR4xoqRb xgzC5MWMTXWe9e+Q4EB9upyUcMFsw3CGHrL4z8MldwjVPM3gGHvgkEC21meim5MmVe /If+vjgPIDAIQ== Received: by pali.im (Postfix) id 58BAF7FD; Mon, 18 Jul 2022 15:11:31 +0200 (CEST) Date: Mon, 18 Jul 2022 15:11:31 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= 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: <20220718131131.dclndpkkh7yojhj4@pali> References: <20220716222454.29914-1-jim2101024@gmail.com> <20220716222454.29914-3-jim2101024@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220716222454.29914-3-jim2101024@gmail.com> User-Agent: NeoMutt/20180716 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220718_061138_445264_A6AA64A8 X-CRM114-Status: GOOD ( 13.43 ) 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 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. 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