From patchwork Tue Sep 30 12:43:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 38139 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0D01B2032C for ; Tue, 30 Sep 2014 12:44:09 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id ho1sf3609208wib.8 for ; Tue, 30 Sep 2014 05:44:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=f2Bnno0bcv26mO79qsfEaIm2qIQKu5FiXqm+FQicGlc=; b=R/6y41lUHxKpb9FNN3vejF4OOgEu2JSXIW8OW2apG0vkQghmA2G0TEOe0cF5ugBOGN FI1bMPf12gwJziPl2z2x0m6D63ioCy8yrS8OEePr4x1Jbu587Q8emAUHXcU7Lnkzh/sw 58yBAc9plTZIT8Qdiglvxx/5hqn/k95HUU8jgXpqBQPbuWqj454+SzsprzEZArq9VBHw bp/GzcbYYnhZb1pZdn7L/6x8NllEb1X4KDQT3Dni4Ti9egxX0UapsSo5VAvIVeb9FAcN kZK5DjKBtEU1gurztIyiwSsyGtTUWZJ95SDITD5/Ldkx3QXX+d7z6VSsJBjQYAk49kl4 isWQ== X-Gm-Message-State: ALoCoQmJW7kbecioHDitT+AYF9ukw46E0xD42Q7dkq4pkya48EisDYdlBs+fobSjmfsX4HZhwNF3 X-Received: by 10.112.89.8 with SMTP id bk8mr6860428lbb.6.1412081048361; Tue, 30 Sep 2014 05:44:08 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.7.169 with SMTP id k9ls36841laa.91.gmail; Tue, 30 Sep 2014 05:44:08 -0700 (PDT) X-Received: by 10.112.130.129 with SMTP id oe1mr43932341lbb.4.1412081048233; Tue, 30 Sep 2014 05:44:08 -0700 (PDT) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com [209.85.215.41]) by mx.google.com with ESMTPS id ms6si22680188lbb.19.2014.09.30.05.44.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 30 Sep 2014 05:44:08 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by mail-la0-f41.google.com with SMTP id pn19so4736338lab.0 for ; Tue, 30 Sep 2014 05:44:08 -0700 (PDT) X-Received: by 10.152.204.231 with SMTP id lb7mr46529883lac.44.1412081048165; Tue, 30 Sep 2014 05:44:08 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.130.169 with SMTP id of9csp338441lbb; Tue, 30 Sep 2014 05:44:07 -0700 (PDT) X-Received: by 10.112.130.168 with SMTP id of8mr45235201lbb.5.1412081047737; Tue, 30 Sep 2014 05:44:07 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com [209.85.215.52]) by mx.google.com with ESMTPS id e9si22515582lbc.128.2014.09.30.05.44.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 30 Sep 2014 05:44:07 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by mail-la0-f52.google.com with SMTP id hz20so3468488lab.25 for ; Tue, 30 Sep 2014 05:44:07 -0700 (PDT) X-Received: by 10.152.88.16 with SMTP id bc16mr27192099lab.56.1412081047019; Tue, 30 Sep 2014 05:44:07 -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 mn4sm6034586lbb.4.2014.09.30.05.44.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 30 Sep 2014 05:44:06 -0700 (PDT) From: Ulf Hansson To: "Rafael J. Wysocki" , Len Brown , Pavel Machek , linux-pm@vger.kernel.org Cc: Geert Uytterhoeven , Kevin Hilman , Tomasz Figa , Philipp Zabel , Russell King , Mark Brown , Wolfram Sang , Greg Kroah-Hartman , Dmitry Torokhov , Jack Dai , Jinkun Hong , Ulf Hansson Subject: [PATCH 2/4] ARM: exynos: Ensure PM domains are powered at initialization Date: Tue, 30 Sep 2014 14:43:51 +0200 Message-Id: <1412081033-8136-3-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1412081033-8136-1-git-send-email-ulf.hansson@linaro.org> References: <1412081033-8136-1-git-send-email-ulf.hansson@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 are no increased power consumption over time. 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); }