From patchwork Thu Jun 23 12:47:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Marussi X-Patchwork-Id: 12892336 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 734A6C43334 for ; Thu, 23 Jun 2022 12:49:11 +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=t8ELRdEzS3eetmWd5lm0mRFSjGfAow981Tb4+rcEJEg=; b=Ln5wqaroqXD65g pAL0Dem3YNBQju+3fDq2KhIzgVkbhmtvmLPolKdf6d1Z3OvL5uPdZEgRqKgRRujYr8TP5EkUvyuGv 60CbVOPHsj0WHi4lxPFCNeg2DzV3jFsqlEb2tsbZNLpjSk+ZpZ/b7CiXLQ2bR0NewayuUqWCLCzmU WiXix4J1SIILJLTO8rVeNmeUKlGkv5ikI50OS4FSNjHu+JnfRTGGvxHsk09jG0bkbO9Hzrsm/YTqM DXX/eyRV87V0NsN6OoMFqA4Nb0bQmIVenL9IrhQFKW/BGib6fpH6g27A9gVjlaNUCaIYn1UgeL9Po LQOmZ52PpsO0+1YdA5Sg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4MFs-00F4iq-C8; Thu, 23 Jun 2022 12:48:16 +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 1o4MFg-00F4co-O1 for linux-arm-kernel@lists.infradead.org; Thu, 23 Jun 2022 12:48:06 +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 6CB7312FC; Thu, 23 Jun 2022 05:47:58 -0700 (PDT) Received: from e120937-lin.home (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5824C3F534; Thu, 23 Jun 2022 05:47:57 -0700 (PDT) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: sudeep.holla@arm.com, vincent.guittot@linaro.org, f.fainelli@gmail.com, Cristian Marussi Subject: [PATCH 0/5] Introduce SCMI System Power Control driver Date: Thu, 23 Jun 2022 13:47:37 +0100 Message-Id: <20220623124742.2492164-1-cristian.marussi@arm.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220623_054804_846580_ED7F67D8 X-CRM114-Status: GOOD ( 12.11 ) 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, This series is a respin of an old series[0] parked for a while waiting for a required SCMI specification change to be published. The series, building on top of the SCMI System Power Protocol, adds a new SCMI driver which, registering for SystemPower notifications, takes care to satisfy SCMI plaform system-transitions graceful requests like shutdown or reboot involving userspace interactions as needed. Interaction with userspace boils down to the same orderly_ Kernel methods used by ACPI to handle similar shutdown requests. The latest SCMI v3.1 specification [1], which adds a new timeout field to the graceful notifications payload, let the platform advertise for how long it will possibly wait for the requested system state transition to happen before forcibly enforcing it. As a part of the series, patch 2/3 enforces, at the SCMI core level, the creation of one single SCMI SystemPower device, to avoid promoting the design of systems in which multiple SCMI platforms can advertise the concurrent support of SystemPower protocol: when multiple SCMI platform are defined, only one of them should be in charge of SystemPower comms with the OSPM, so only one such SystemPower device across all platforms is allowed to be created. Thanks, Cristian [0]:https://lore.kernel.org/linux-arm-kernel/20210204165913.42582-1-cristian.marussi@arm.com/ [1]:https://developer.arm.com/documentation/den0056/d/?lang=en Cristian Marussi (5): firmware: arm_scmi: Remove deprecated ida_simple_ calls firmware: arm_scmi: Support only one single SystemPower device firmware: arm_scmi: Add SCMIv3.1 SystemPower extensions firmware: arm_scmi: Add devm_protocol_acquire helper firmware: arm_scmi: Add SCMI System Power Control driver drivers/firmware/arm_scmi/Kconfig | 12 + drivers/firmware/arm_scmi/Makefile | 1 + drivers/firmware/arm_scmi/bus.c | 37 +- drivers/firmware/arm_scmi/driver.c | 70 +++- .../firmware/arm_scmi/scmi_power_control.c | 362 ++++++++++++++++++ drivers/firmware/arm_scmi/system.c | 17 +- include/linux/scmi_protocol.h | 7 + 7 files changed, 486 insertions(+), 20 deletions(-) create mode 100644 drivers/firmware/arm_scmi/scmi_power_control.c