From patchwork Wed Aug 31 18:26:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 12961274 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 206FBECAAD3 for ; Wed, 31 Aug 2022 18:28:49 +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:References:In-Reply-To: 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: List-Owner; bh=7pQgeC43rSEDcogqSv1qnLNLBCN2Px8l0pK8yA7nTow=; b=sBy4wFtb0ccyb+ iFfqNfRDiPdE/7S+W3qRJJHEraiHflgCldZKEwi8MMPio2jQELrNGjRfK7vWnCG7WchYMd+OTUxub SVy9gnRQeLo84dmOZH9TYqS6xCEzcIZceMTYDgzGrT7t5JX/jWBNdf+e8KxK+WsztZTpII9tCS3h7 PHfZw4vSZLfYKsZumzX1o1YaliwmkY2hzvB96HZZW3GkFOCkXWmXb+5bbgyBq3rdNeOfqPSeWDY7J /OcrqwiRVCT7rZByN5XUcKQc27i14hHw6MoWS9y28UzThJusE362dtAfPzAqsKg7xjnV1fZe0EVFC Ef5XYKpctOegiB/VQtKw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTSS3-007ZgK-Fl; Wed, 31 Aug 2022 18:28:35 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTSQG-007YeX-RV; Wed, 31 Aug 2022 18:26:46 +0000 Received: from jupiter.universe (dyndsl-091-096-057-024.ewe-ip-backbone.de [91.96.57.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sre) by madras.collabora.co.uk (Postfix) with ESMTPSA id 7FC7D6601DF6; Wed, 31 Aug 2022 19:26:40 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1661970400; bh=rEJ+pNRgdZef5+wO4r54ejoJ7KJfO0P7doJa8eL6Wuw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VHybXy1rG+cbGD+ICJoUBg8mvnLGc2CxECqsl43aXPn0vn1ebyPefRiY1x4C/uRzH kYyUKvQ4iVgMVARiw2StM5aTmm4eO5CEaMyp8ebzBTWAj61y0wDngUFnYIhkZPYgO0 XQtnxX/su3lbvoqsQGIrtpNhwfRkx5IDAI0VTXAt5S8jTiyEZsmDeAzRuDiuqJsAd3 2JpfU41NFuiR7PH9BQ2tSQt0NR1XtFm8Ue9n2mdBVvKzXLU+UpMkMfyBjc6a1Zgeq4 TJKa2bQGYP9Iw1cSJbsjTFfa3rlcQiswYnkVqDxUJJkSPK1pAoaSPRtBo/q7Mmh0t1 ZC+LHGyJtetHw== Received: by jupiter.universe (Postfix, from userid 1000) id C794B4805C5; Wed, 31 Aug 2022 20:26:35 +0200 (CEST) From: Sebastian Reichel To: Heiko Stuebner Cc: Rob Herring , Krzysztof Kozlowski , linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Elaine Zhang , kernel@collabora.com, Sebastian Reichel Subject: [PATCH 5/6] soc: rockchip: power-domain: do not enable PD Date: Wed, 31 Aug 2022 20:26:28 +0200 Message-Id: <20220831182629.79255-6-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220831182629.79255-1-sebastian.reichel@collabora.com> References: <20220831182629.79255-1-sebastian.reichel@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220831_112645_059325_2AF3ECCF X-CRM114-Status: GOOD ( 12.33 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Elaine Zhang It's not need to power on all pd when add pm domain. Instead use PD's real status in pm_genpd_init(). Signed-off-by: Elaine Zhang Signed-off-by: Sebastian Reichel --- drivers/soc/rockchip/pm_domains.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c index 89795abac951..a59aa3b89a72 100644 --- a/drivers/soc/rockchip/pm_domains.c +++ b/drivers/soc/rockchip/pm_domains.c @@ -595,14 +595,6 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu, } } - error = rockchip_pd_power(pd, true); - if (error) { - dev_err(pmu->dev, - "failed to power on domain '%pOFn': %d\n", - node, error); - goto err_unprepare_clocks; - } - if (pd->info->name) pd->genpd.name = pd->info->name; else @@ -614,7 +606,7 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu, pd->genpd.flags = GENPD_FLAG_PM_CLK; if (pd_info->active_wakeup) pd->genpd.flags |= GENPD_FLAG_ACTIVE_WAKEUP; - pm_genpd_init(&pd->genpd, NULL, false); + pm_genpd_init(&pd->genpd, NULL, !rockchip_pmu_domain_is_on(pd)); pmu->genpd_data.domains[id] = &pd->genpd; return 0;