From patchwork Wed Oct 1 14:41:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 5012301 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 844C5BEEA6 for ; Wed, 1 Oct 2014 14:44:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C07AE2026C for ; Wed, 1 Oct 2014 14:44:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9909920221 for ; Wed, 1 Oct 2014 14:44:47 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XZL7D-00054g-H0; Wed, 01 Oct 2014 14:42:51 +0000 Received: from mail-lb0-f177.google.com ([209.85.217.177]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XZL6k-0004Kz-J3 for linux-arm-kernel@lists.infradead.org; Wed, 01 Oct 2014 14:42:23 +0000 Received: by mail-lb0-f177.google.com with SMTP id w7so459184lbi.36 for ; Wed, 01 Oct 2014 07:41:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kitSgwIE5UQC83MAOHLw04vv4M9EGCDIjrtTCngudkI=; b=Ulw6qnZB1l2YI9HJMmK0ozDlKpI7GZunJSRzq4dOgogXV/iCyEgq4rrKVu5JuvD0Cl Gi/AVWSunz3T5gXMoPJUvxp2e+9dAJoCpnvJfu55jpe3rFV+d6IEVNSJx/tu531AaL4D xqIwivLqrzha+SN92KNiCeMc6/HgzLIWAyAoKa+6YhMWa5oN1tchKv6oT/n7lEtWbuPb JOkVGHY467KXHyAxw0d30jsB00vSHU/Dx+ka0+qLvWtpFHNKKXO2pu9rp6ujgUuH0khb qA5/PebcVVJl4hRPDst6MStAbsocz5tbXohUtpwYEposplQ9tB7ziF8d6CQVt7rh0slh bwoA== X-Gm-Message-State: ALoCoQnSYJmsbOT9CvntuF+/fpcJpSNvFLoLxD5alwSv7YNiGwShes8f2mNrapTnl29jGiuYViqy X-Received: by 10.112.171.229 with SMTP id ax5mr45341186lbc.25.1412174519616; Wed, 01 Oct 2014 07:41:59 -0700 (PDT) Received: from uffe-Latitude-E6430s.lan (90-231-160-185-no158.tbcn.telia.com. [90.231.160.185]) by mx.google.com with ESMTPSA id rl6sm485466lac.17.2014.10.01.07.41.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Oct 2014 07:41:58 -0700 (PDT) From: Ulf Hansson To: "Rafael J. Wysocki" , Len Brown , Pavel Machek , linux-pm@vger.kernel.org Subject: [PATCH v2 2/4] ARM: exynos: Ensure PM domains are powered at initialization Date: Wed, 1 Oct 2014 16:41:32 +0200 Message-Id: <1412174494-15346-3-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1412174494-15346-1-git-send-email-ulf.hansson@linaro.org> References: <1412174494-15346-1-git-send-email-ulf.hansson@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141001_074222_822875_CDEC8031 X-CRM114-Status: GOOD ( 12.67 ) X-Spam-Score: -0.7 (/) Cc: Simon Horman , Ulf Hansson , Kevin Hilman , Russell King , Philipp Zabel , Geert Uytterhoeven , Wolfram Sang , Greg Kroah-Hartman , Mark Brown , Dmitry Torokhov , Magnus Damm , Tomasz Figa , linux-samsung-soc@vger.kernel.org, Alan Stern , Ben Dooks , Jinkun Hong , Kukjin Kim , Jack Dai , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP At ->probe() it's common practice for drivers/subsystems to bring their devices to full power and without depending on CONFIG_PM_RUNTIME. We could also expect that drivers/subsystems requires their device's corresponding PM domains to be powered, to successfully complete a ->probe() sequence. Align to the behavior above, by ensuring all PM domains are powered prior initialization of a generic PM domain. Do note, since the generic PM domain will try to power off unused PM domains at late_init, there should be no increased power consumption over time, but potentially during boot. Signed-off-by: Ulf Hansson --- arch/arm/mach-exynos/pm_domains.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c index 20f2671..58e18e9 100644 --- a/arch/arm/mach-exynos/pm_domains.c +++ b/arch/arm/mach-exynos/pm_domains.c @@ -112,7 +112,7 @@ static __init int exynos4_pm_init_power_domain(void) for_each_compatible_node(np, NULL, "samsung,exynos4210-pd") { struct exynos_pm_domain *pd; - int on, i; + int i; struct device *dev; pdev = of_find_device_by_node(np); @@ -155,9 +155,10 @@ static __init int exynos4_pm_init_power_domain(void) clk_put(pd->oscclk); no_clk: - on = __raw_readl(pd->base + 0x4) & INT_LOCAL_PWR_EN; + if (!(__raw_readl(pd->base + 0x4) & INT_LOCAL_PWR_EN)) + exynos_pd_power_on(&pd->pd); - pm_genpd_init(&pd->pd, NULL, !on); + pm_genpd_init(&pd->pd, NULL, false); of_genpd_add_provider_simple(np, &pd->pd); }