Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2510330rwb; Mon, 3 Oct 2022 01:37:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5IXOk8ojRkdtuG8nZFtcVaKTc6KfM35AkSJZC5kIhwrEdMDaNqkzhc/REpMJbEHO8xWL30 X-Received: by 2002:a17:90a:aa8c:b0:205:98b8:f8d5 with SMTP id l12-20020a17090aaa8c00b0020598b8f8d5mr11199369pjq.159.1664786243080; Mon, 03 Oct 2022 01:37:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664786243; cv=none; d=google.com; s=arc-20160816; b=QuqnozCnH8FI1HCBVDkPMycyMxv6BtpLosBdyledslVz6V8y8LMXXOjlTV5ZNNh7FN iq3f3BPOA0BiDIv5zyrT4aNx2pxThW+jACOZeMcjJoB8pAUvOO0GTwmC4zwaaCc/yXyS BQ2aMix5H4FPz8n6lTxtnVlCvn8kYOjtdHAPWHo3p3e44DrNqLRIFmyk8Y9IBHcB1tsv 2NX0JNmiHPyQ+F/3EfWWB8xVdVdIme/Clgshhn9l+EImJTMcsuhLeBtmdsIFmFpwSscu LisKO8PcNDkYCiBQzTmEBYwcnwLFKg+MrKdrC7OHDF8+78O9wfOysacC5dW3+4lMUjH8 YTFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=I4eQDP/rmZltf5EajU1jYNbQ47mZeqibOjP4Nek6v6w=; b=H8wTZEyKMHQxWStzA0OZnBFiaW5F1rR8MZpxnShwfg9ijez/0H+ND3fzYe69M542PL ZWS/4jPN5KlWPUFmgpE/Z3onbMISv76Ere1Zw798Zicf45OePy0t0CFiZR+kxb8hkoSB hA5Mxh+HRj7TQkIoisBu349n+LuP/EdMbV/Oct3pKGfsWjL1RFxqqLw1R2gLUi1JCHNz BbV4Fc9l8clCDDjv+z2xI0AQvW/eFolnjG3hapK7UE2st6e9dFCf7ochyY07EnIC7b4Y trm/brA2ko10FWMm1zLvaC6lV/1vjdZJl9XWiuDAc42CwkeYe5TnsZEWzToW3Fml/KTV VexA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RbNAxzqm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id je15-20020a170903264f00b001782ec0988esi9533648plb.495.2022.10.03.01.37.10; Mon, 03 Oct 2022 01:37:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RbNAxzqm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231184AbiJCH3X (ORCPT + 99 others); Mon, 3 Oct 2022 03:29:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231224AbiJCH2Q (ORCPT ); Mon, 3 Oct 2022 03:28:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3859310; Mon, 3 Oct 2022 00:19:34 -0700 (PDT) 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 43E5A60FC1; Mon, 3 Oct 2022 07:17:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56466C433C1; Mon, 3 Oct 2022 07:17:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664781442; bh=vV6J72lgCKZaW1qd9qddBQY27IkQVHpqMFO4vnJKAs8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RbNAxzqm3xKZzuwvBJ+MlRWuBlyTFzaoOYhP6Uipg7iaQmhTu409haxEMkKQ53nu+ cV4rKXttLmhMn4WNKsENOctfjJiKNiuiVOO88ald14SB9WUq2C2khSMQfWRt48gSIu ygkcB4u+7Dl70uDuMgX7hSXZDLJ6ohi6jz5adD1c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicolas Pitre , Ulf Hansson , Peng Fan , Sudeep Holla Subject: [PATCH 5.15 21/83] Revert "firmware: arm_scmi: Add clock management to the SCMI power domain" Date: Mon, 3 Oct 2022 09:10:46 +0200 Message-Id: <20221003070722.518396983@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221003070721.971297651@linuxfoundation.org> References: <20221003070721.971297651@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ulf Hansson commit 3c6656337852e9f1a4079d172f3fddfbf00868f9 upstream. This reverts commit a3b884cef873 ("firmware: arm_scmi: Add clock management to the SCMI power domain"). Using the GENPD_FLAG_PM_CLK tells genpd to gate/ungate the consumer device's clock(s) during runtime suspend/resume through the PM clock API. More precisely, in genpd_runtime_resume() the clock(s) for the consumer device would become ungated prior to the driver-level ->runtime_resume() callbacks gets invoked. This behaviour isn't a good fit for all platforms/drivers. For example, a driver may need to make some preparations of its device in its ->runtime_resume() callback, like calling clk_set_rate() before the clock(s) should be ungated. In these cases, it's easier to let the clock(s) to be managed solely by the driver, rather than at the PM domain level. For these reasons, let's drop the use GENPD_FLAG_PM_CLK for the SCMI PM domain, as to enable it to be more easily adopted across ARM platforms. Fixes: a3b884cef873 ("firmware: arm_scmi: Add clock management to the SCMI power domain") Cc: Nicolas Pitre Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson Tested-by: Peng Fan Acked-by: Sudeep Holla Link: https://lore.kernel.org/r/20220919122033.86126-1-ulf.hansson@linaro.org Signed-off-by: Greg Kroah-Hartman --- drivers/firmware/arm_scmi/scmi_pm_domain.c | 26 -------------------------- 1 file changed, 26 deletions(-) --- a/drivers/firmware/arm_scmi/scmi_pm_domain.c +++ b/drivers/firmware/arm_scmi/scmi_pm_domain.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include @@ -53,27 +52,6 @@ static int scmi_pd_power_off(struct gene return scmi_pd_power(domain, false); } -static int scmi_pd_attach_dev(struct generic_pm_domain *pd, struct device *dev) -{ - int ret; - - ret = pm_clk_create(dev); - if (ret) - return ret; - - ret = of_pm_clk_add_clks(dev); - if (ret >= 0) - return 0; - - pm_clk_destroy(dev); - return ret; -} - -static void scmi_pd_detach_dev(struct generic_pm_domain *pd, struct device *dev) -{ - pm_clk_destroy(dev); -} - static int scmi_pm_domain_probe(struct scmi_device *sdev) { int num_domains, i; @@ -124,10 +102,6 @@ static int scmi_pm_domain_probe(struct s scmi_pd->genpd.name = scmi_pd->name; scmi_pd->genpd.power_off = scmi_pd_power_off; scmi_pd->genpd.power_on = scmi_pd_power_on; - scmi_pd->genpd.attach_dev = scmi_pd_attach_dev; - scmi_pd->genpd.detach_dev = scmi_pd_detach_dev; - scmi_pd->genpd.flags = GENPD_FLAG_PM_CLK | - GENPD_FLAG_ACTIVE_WAKEUP; pm_genpd_init(&scmi_pd->genpd, NULL, state == SCMI_POWER_STATE_GENERIC_OFF);