From patchwork Thu Mar 9 14:07:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Marussi X-Patchwork-Id: 13167519 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 A6E76C61DA4 for ; Thu, 9 Mar 2023 14:09:18 +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=vPzgZR2q1zrLDL0ggNJw4z1LWnnHj3HGD9m7AxnoQ1w=; b=Jz679GRKnppZO4 Kf5/DpYpRXv2XOM279Jrqw+Nj7EjfSlNix3dD2gIvGJ6BoiZ/08Ker9f6FM4y9HR8FX7O6ZoYKIa5 y9/Q3Apwu2evMG9pSqOdwTtPvvWS8oVY3RNMNkx0ZC/JEGVdAAXu98/Bx/RPxqDeW461FrfgNdwaa FBaNSBnn1CBkSOxFstcJ/qtckz3OKEwaZ67S5VkT7wEK1gSka2r6LeVZ5Mxwdb9/psRgSwCt+Wlw6 KTowXjQPPrUDj5HoPX0Op93LpulS/Y5eXDHjYs21/WJ/y4Cchua1WKeS3fbdimMKsOtd9kdSQoSJO 9tmcjH/yWXWGBtfYFGPw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1paGw5-00AMft-Vw; Thu, 09 Mar 2023 14:08:02 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1paGvx-00AMY7-CL for linux-arm-kernel@lists.infradead.org; Thu, 09 Mar 2023 14:07:57 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CF733AD7; Thu, 9 Mar 2023 06:08:27 -0800 (PST) Received: from e120937-lin.. (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 74F6A3F5A1; Thu, 9 Mar 2023 06:07:42 -0800 (PST) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Cc: sudeep.holla@arm.com, james.quinlan@broadcom.com, Jonathan.Cameron@Huawei.com, f.fainelli@gmail.com, vincent.guittot@linaro.org, tarek.el-sherbiny@arm.com, nicola.mazzucato@arm.com, souvik.chakravarty@arm.com, wleavitt@marvell.com, wbartczak@marvell.com, Cristian Marussi Subject: [PATCH v2 0/3] Add SCMI v3.2 Powercap disable support Date: Thu, 9 Mar 2023 14:07:21 +0000 Message-Id: <20230309140724.2152712-1-cristian.marussi@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230309_060753_523647_9D3754AA X-CRM114-Status: UNSURE ( 9.44 ) X-CRM114-Notice: Please train this message. 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 Hi, Upcoming SCMI v3.2 specification (publicly available as BETA at [1]) introduces support to disable powercapping as a whole on the desired zones. This small series at first add the needed support to the core SCMI Powercap protocol, exposing a couple more enable/disable protocol operations, and then wires such new ops in the related Powercap framework helpers. Based on v6.3-rc1. Thanks, Cristian [1]: https://developer.arm.com/documentation/den0056/e --- v1 -> v2 - rebased on v6.3-rc1 - simplified enable status check logic Cristian Marussi (3): firmware: arm_scmi: Refactor powercap get/set helpers firmware: arm_scmi: Add Powercap protocol enable support powercap: arm_scmi: Add support for disabling powercaps on a zone drivers/firmware/arm_scmi/powercap.c | 173 +++++++++++++++++++++++---- drivers/powercap/arm_scmi_powercap.c | 16 +++ include/linux/scmi_protocol.h | 18 +++ 3 files changed, 182 insertions(+), 25 deletions(-)