From patchwork Tue Apr 12 09:49:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 12810261 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 790A3C433F5 for ; Tue, 12 Apr 2022 09:52:01 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=zY8lojfAsiatsI5M+YxsXaBk6HJH+J6Jb6Dy1xKZicE=; b=oHie1AIIC/y8as nqMbqxJjKiZVbzcYoGPvjE9HF7HPJDlrWci4cyXO0YFt/Ip7FvB4hBFL3sd7BGiLvY/dqRzNzt3UW ubrKBwO5MOTHarAuJESFjPMpMjfQKEjSEEsh5JKGF+W4oy7V/CQcDcNUUIVOcYKPAIRSYwEk1yNBm WnKzcepRYA0NBmssHQfswrMR7HVStpNNFgWOiXsRS+ZDgbm8a/t23Ta7pXpNNsDL3tUVlyC1SLGNl EheTK2dg/0Tplkj5wNGpv4SwTYFnYcx/5glNvacvLSr9WvnpBy/0WDf5sZiMO0H7lwnm2ydfDoJfs bMnbpw7OproSUnmNVQqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1neDAV-00D3FR-B1; Tue, 12 Apr 2022 09:50:40 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1neDAN-00D3CB-Mr for linux-arm-kernel@lists.infradead.org; Tue, 12 Apr 2022 09:50: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 F2D5E6185A; Tue, 12 Apr 2022 09:50:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D1FDC385AB; Tue, 12 Apr 2022 09:50:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649757030; bh=big4IiYwCUrp5tFic5/ifdQ2CpsrM8sTB+lb/TU8tAw=; h=From:To:Cc:Subject:Date:From; b=P2QjXjkTYafeccqtUTLaoYUtvLkYeVp5QaSleN+WSHm6miGw4Q6TmrfOldma4PHDa 9106N9V3OFyhaU7NSYvzBgUMvmmhFv54V6qRHKzVcyUCUp+2NHrUl5mTMlD1FeM4Fa r/R5uyKZGHVFGJnox/Iki6u8Ob6fB8jTknKmusMRCU+oPWx7glvlhQfqxO2t2w8itw AitupK+oP+zt0aD8z0RuyA/OS0YHOZ7gjnoNeCg6jcEwpWwqEEDR5eRL5vTudD1MbW sRmn0bDAGeM2ycKVMJq1a+2MSMoePkMS5lUd7wwLINsG7D0XVTEEAVBRvBqEJeut+u 25NKDyAX0atQA== Received: by pali.im (Postfix) id 7BB9DA75; Tue, 12 Apr 2022 11:50:27 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Lorenzo Pieralisi , Bjorn Helgaas , Rob Herring , Andrew Lunn , Thomas Petazzoni , =?utf-8?q?Krzysztof_Wilczy?= =?utf-8?q?=C5=84ski?= , =?utf-8?q?Marek_Beh=C3=BAn?= , Russell King Cc: linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 0/4] PCI: mvebu: Slot support Date: Tue, 12 Apr 2022 11:49:42 +0200 Message-Id: <20220412094946.27069-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220412_025031_810513_AD705D0C X-CRM114-Status: GOOD ( 12.67 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch series add slot support to pci-mvebu.c driver. Changes in v5: * Fix compile error due to wrong patch rebasing Changes in v4: * Set 239 W when DT slot-power-limit-milliwatt is between 239 W and 250 W * Fix returning power limit value Changes in v3: * Set 600 W when DT slot-power-limit-milliwatt > 600 W Changes in v2: * Dropped patch with PCI_EXP_SLTCAP_*_SHIFT macros as it is not needed anymore * Dropped patch "ARM: dts: turris-omnia: Set PCIe slot-power-limit-milliwatt properties" which was applied * Added support for PCIe 6.0 slot power limit encodings * Round down slot power limit value * Fix handling of slot power limit with scale x1.0 (0x00 value) * Use FIELD_PREP instead of _SHIFT macros * Changed commit message to Bjorn's suggestion * Changed comments in the code to match PCIe spec * Preserve user settings of PCI_EXP_SLTCTL_ASPL_DISABLE bit Pali Rohár (4): PCI: Add PCI_EXP_SLTCTL_ASPL_DISABLE macro dt-bindings: Add 'slot-power-limit-milliwatt' PCIe port property PCI: Add function for parsing 'slot-power-limit-milliwatt' DT property PCI: mvebu: Add support for sending Set_Slot_Power_Limit message Documentation/devicetree/bindings/pci/pci.txt | 6 ++ drivers/pci/controller/pci-mvebu.c | 97 ++++++++++++++++++- drivers/pci/of.c | 70 +++++++++++++ drivers/pci/pci.h | 15 +++ include/uapi/linux/pci_regs.h | 1 + 5 files changed, 184 insertions(+), 5 deletions(-)