Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2534639rwb; Mon, 19 Sep 2022 06:33:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4HGrjQuV9SUX3JV/b8zPLBT0jIHJj2GbPUya5AIV04KAM0sodgQ7F2lQ5Gyl4MYmooUEua X-Received: by 2002:a63:1508:0:b0:438:eb90:52d1 with SMTP id v8-20020a631508000000b00438eb9052d1mr16092684pgl.252.1663594397339; Mon, 19 Sep 2022 06:33:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663594397; cv=none; d=google.com; s=arc-20160816; b=ZM3a/342hG45nlvI8OGHz7ZjzYsWKvrWD5FYHzM70noxK/mB5z/OfazGXuqAQ4XiF/ bZZYwIyGMO13VTnAKCk2sAuJAP8WidLnJRzNhAReXR2+rNY1gj7pC2vtrhJZoRKYt3sD 1A/aWUYxa7sEPDvs+TNXgdbvIvzEBcS1qY5DpAUhx8TXtoNSTCUKaWtLw7oYG4XCaTsx gZ6HafmHHRyPxrTPktei449VJfhiBRUt25U7TPsa9VWkTlGir5owgRmJNRzXJaYxQ3T2 ClCcNLHOvZ1CdfFppfKcy+uaYQnotyhR1Bre876ajkSb10vV7QZheo8dZ1og4ar+PRlx aHZg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=akAS+M555MDELlIlmpkVGxe1Ko+lvv67Qe46MFIs5R8=; b=QbCbW08GRsm8rQbsGYInj3ihcg4152krtNGAbp5SYjVhpWQbt02NLewGI1DBs4M1nP zpUpQ6rETi9KnJCwVXX7YraZH+G1olNzGJ/dIzr8sIVUqvpu+VMwQIM+l4aocvQ28YxV CpYuoyy0BGsNu6Bes/U+4gpqSrhyid4L8v7ibAo1EyBlr+SmfEkNOR07CLAziSHYiFba WaZ8oSXepcQiwUV24zoR4dX6TXUMwqSHPMzjh/sXTC01mEAe411k9vuuz0jfczoT+vcw WEf4Fn404rC0Br29sDvUUGWfEcl1RBmOqlZ7Ya9DhmcydoCmUylE6w4xvTn0Dfh9YFnD hXrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rFI2tguD; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b8-20020a056a000cc800b0052e677b7056si32293435pfv.279.2022.09.19.06.33.05; Mon, 19 Sep 2022 06:33:17 -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=@linaro.org header.s=google header.b=rFI2tguD; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229745AbiISMVP (ORCPT + 99 others); Mon, 19 Sep 2022 08:21:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229725AbiISMVB (ORCPT ); Mon, 19 Sep 2022 08:21:01 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1A1815A2B for ; Mon, 19 Sep 2022 05:20:59 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id p5so33598329ljc.13 for ; Mon, 19 Sep 2022 05:20:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=akAS+M555MDELlIlmpkVGxe1Ko+lvv67Qe46MFIs5R8=; b=rFI2tguDUwytQi2FpeVgljcxNVQj0L+/eVs8qHfX1/a02A5BbT1uiV2P0lUJL9ki2d rLFoZIhTOwQVtPB471K2MSYXWZ80g30wiw/9UimCZ4pVmsjdvqYB+3YcxVHhg+ULhLQ/ VBKkzbvBn0Kl2MDsZuwEGg2mSxjGJ5JW8E7rg6O3YSQnOsbr51uoAkGO6OOp/dfZdfem iA0wvP0TPTAyq8acqHbygY/mJCxINniEc3EmT8c+NAD8K7hNRvSlxkfQGaomV2ox0g6l 7VUFHet78Y7InqoGHEu+eDfkvh2MHWjEsQWXF+NCxrEo4u0tRNAkDAjMaZctdiGh8qh4 67qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=akAS+M555MDELlIlmpkVGxe1Ko+lvv67Qe46MFIs5R8=; b=eb+8UkindeDfv6e9yyx3hWarIH1BLpqJLpEpjr/+hpMZIT+ifEkoNJ3kJryJ0IKTkZ HXp9UHgxYZoQHNXX/HqvTi+VLd6f8dskL3dJZX6B3422UmtdBzyGiZ1gkfDRLVoJgpcl 0GhZNDCT2ucoG9PnnWgQ5nxsHGcFNJhjunj7zc7YnttuKB26dVGXo+uE6hzHA7dhmhLH hk3yW9EXV2iJSOdwvn+iMFPYu8bovxYheh6u5XVbWyN/VCzBK9FoaftdYIm+f0ysnA8t cP4YZ6PX4vW5zBld2XJmIGzC+AauszXvrmgK+BQKnCcSuTTKtb/CHChIuGsPADwbrXan sJZA== X-Gm-Message-State: ACrzQf1jLU1MIzXn5nuGRbx9LMAFy3Ddkw84sXJGdsnTz1a81UFQ1PHJ EOAmVB+WDNNjiOou2m6DX1lE4w== X-Received: by 2002:a05:651c:1503:b0:24c:81df:e1f2 with SMTP id e3-20020a05651c150300b0024c81dfe1f2mr4761445ljf.182.1663590058203; Mon, 19 Sep 2022 05:20:58 -0700 (PDT) Received: from uffe-XPS13.. (h-94-254-63-18.NA.cust.bahnhof.se. [94.254.63.18]) by smtp.gmail.com with ESMTPSA id be19-20020a056512251300b0049f53d53235sm2003950lfb.50.2022.09.19.05.20.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Sep 2022 05:20:57 -0700 (PDT) From: Ulf Hansson To: Sudeep Holla , Cristian Marussi , linux-arm-kernel@lists.infradead.org Cc: Peng Fan , Geert Uytterhoeven , Dien Pham , Gaku Inami , Nicolas Pitre , Ulf Hansson , linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH] Revert "firmware: arm_scmi: Add clock management to the SCMI power domain" Date: Mon, 19 Sep 2022 14:20:33 +0200 Message-Id: <20220919122033.86126-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 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 --- To get some more background to $subject patch, please have a look at the lore-link below. https://lore.kernel.org/all/DU0PR04MB94173B45A2CFEE3BF1BD313A88409@DU0PR04MB9417.eurprd04.prod.outlook.com/ Kind regards Ulf Hansson --- drivers/firmware/arm_scmi/scmi_pm_domain.c | 26 ---------------------- 1 file changed, 26 deletions(-) diff --git a/drivers/firmware/arm_scmi/scmi_pm_domain.c b/drivers/firmware/arm_scmi/scmi_pm_domain.c index 581d34c95769..d5dee625de78 100644 --- 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 generic_pm_domain *domain) 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 scmi_device *sdev) 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); -- 2.34.1