From patchwork Wed May 31 15:20:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Marussi X-Patchwork-Id: 13262435 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 65083C77B7A for ; Wed, 31 May 2023 15:21:37 +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=zD0W5y3HUZnBDrLgTjOv4uXuxQCkYFXuvdQihYigEXg=; b=YYHcGJ3wIr8aBS xp+xcaEOZFg3Wdt2jLz13vKQ6AhMboFgGlcJpXsA8SBoEtJpjabyTlHkMP4RdKC7wATkt126t1RxK yoQXXFooqbhYh9ujE269wYZTd/8+8q7CDnohwqO/G4ReK3ef4fbqszbYNECs4bBUcivQWk42F+zDo Ymhcc6JmFmuf57N5ktmMNVmtUXRAmHil6WNagDRPJYnPa5xA4IFh+VBEJxFqdylA0kdU69DTwb7kf IOp9TSrLAuhuhyXzvccqcrWu+if2paydsAD9Xw3B9YASbHYLaGhK0x6qNQt4lp0cmqkhBDlbfWvRw jUfxF7BC0swLM5Nduj2w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q4NdU-000H9f-1W; Wed, 31 May 2023 15:21:16 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q4NdR-000H8n-1r for linux-arm-kernel@lists.infradead.org; Wed, 31 May 2023 15:21:15 +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 52CF91042; Wed, 31 May 2023 08:21:55 -0700 (PDT) Received: from e120937-lin.. (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1CCA63F663; Wed, 31 May 2023 08:21:08 -0700 (PDT) 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 v3 0/3] Add SCMI v3.2 Powercap disable support Date: Wed, 31 May 2023 16:20:36 +0100 Message-Id: <20230531152039.2363181-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-20230531_082113_684193_0E3FDBFA X-CRM114-Status: UNSURE ( 9.77 ) 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.4-rc4. Thanks, Cristian [1]: https://developer.arm.com/documentation/den0056/e --- v2 --> v3 - rebased on v6.4-rc4 - added tags 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(-)