From patchwork Thu Jun 23 16:23:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 12892926 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 D0177C43334 for ; Thu, 23 Jun 2022 16:25:07 +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=my2ooGas9jX3Oyr5fCbo7n8oEkTV1eT+BQgvNh6/2yY=; b=nhRxfKVUk67stC J9Kau6rAIJCguyZUzJEnFJUnOxRxqN0SuM4gWPwLHHrefSXxvTQZvm4fupGaC51bVP+ZEGy8PEn8v LdA27BkogTm8UkdCz6l1imDqA1bDjEPKPCExt31Mk3uwLsaAduyfg+P8iry/KTftF8Vd4T1opHwcS Zixu7AW5u2ac6Q/bnHlJZlK2xqeYTczB/vTxPanD5ieZq0RGuXWnggivQ8ljLFVv6j4cBWke+RxMa 20DoLh9N5huBgmHYxjiU7s6VHhOT+y6e7QOHSqH9x0ZYgURIcB2I8T2Gbd2VNu8MzEBQ5ZJ0iyMC3 HDBUnWRi34Nb6TLYd+aw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4Pcn-00FrAr-EE; Thu, 23 Jun 2022 16:24:09 +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 1o4Pc2-00FqtA-Qt; Thu, 23 Jun 2022 16:23:24 +0000 Received: from jupiter.universe (unknown [95.33.159.255]) (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 924BC66017EC; Thu, 23 Jun 2022 17:23:21 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1656001401; bh=rEJ+pNRgdZef5+wO4r54ejoJ7KJfO0P7doJa8eL6Wuw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G3spGbQPVrVW2PSUDZt+0d5qibv1+qUxSR4VCXzgXQrG20CdlB4QvA1ivh+JH4J/C okthgekcwEi2chgOeNXwy4+F158i4vEihKT5o8IFEl6+iIfuVC1x8+rmjrfDM03W9M Ypn2CexeZn7pGemMjMAfbuSToNMZLeqTVhhkT98+kXzmk9HqOI4fz8RNWHLxaLEKfZ vhpoisqAgn28b08kC7B8qjzaDNuj5GtMRXPhbcPYO5GLwkqkzamBuq8toaphBFU8HN hdjQ+BQf1ACAghW0YwjU48R0vPHJIXGLr/cY/WGpIJCM+OsBPx4PfP+Kl52fMmoAR4 W/ZUykl9E5BEA== Received: by jupiter.universe (Postfix, from userid 1000) id 766C44805A1; Thu, 23 Jun 2022 18:23:16 +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: Thu, 23 Jun 2022 18:23:08 +0200 Message-Id: <20220623162309.243766-6-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220623162309.243766-1-sebastian.reichel@collabora.com> References: <20220623162309.243766-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-20220623_092323_065311_D4898053 X-CRM114-Status: GOOD ( 11.72 ) 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 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;