From patchwork Fri Aug 22 13:49:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 35820 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oi0-f70.google.com (mail-oi0-f70.google.com [209.85.218.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 34A6320540 for ; Fri, 22 Aug 2014 13:50:27 +0000 (UTC) Received: by mail-oi0-f70.google.com with SMTP id u20sf54706849oif.9 for ; Fri, 22 Aug 2014 06:50:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=CX8ziraMhRokHPgQeB11Slf0xee57zb3mrswWNmhnTk=; b=fkcPUmmkz/ZuFHJlcLD9gFG0RDxluJfSFYN/nQu/c/t4vxqwUYq7I1DZGOziZPx04q RoaZXrHHLCFZI82LPyzMoLtE658zk3Dot/Gq1FU567+7uwjW1mvEkiJh9wrRDsY4k/yp TsGLFHHWLKQewlVLESxBuljNb66vM/zYnc0fg20hAXJlacBtcOLIj7CLEpfCCQqgAOKB ho82nF5S7mUWgDWJ1as43eQyN2JDWk5UEzjjDDfY5yaqLveKMUoLkKjRKHeNo3XZcQsz s8h7tpqYZ/zLYglp9nPn/cXOBpekD5g/UOPDD8jZCtibSpBvad26cdk8jIhQvNdLxdTT fpMg== X-Gm-Message-State: ALoCoQksW1gOmQs8yxQNY5h6InTtanZWWzDE1s467eH3ajEw78HVr9eSzZJWlWEJ4FQhbJicx0SK X-Received: by 10.182.135.194 with SMTP id pu2mr3112882obb.35.1408715426655; Fri, 22 Aug 2014 06:50:26 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.40.134 with SMTP id x6ls1144933qgx.45.gmail; Fri, 22 Aug 2014 06:50:26 -0700 (PDT) X-Received: by 10.220.116.196 with SMTP id n4mr4170717vcq.6.1408715426529; Fri, 22 Aug 2014 06:50:26 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id xi6si13594957vdb.85.2014.08.22.06.50.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 22 Aug 2014 06:50:26 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.169 as permitted sender) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id le20so12481014vcb.28 for ; Fri, 22 Aug 2014 06:50:26 -0700 (PDT) X-Received: by 10.220.167.9 with SMTP id o9mr4188359vcy.8.1408715426367; Fri, 22 Aug 2014 06:50:26 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp18482vcb; Fri, 22 Aug 2014 06:50:25 -0700 (PDT) X-Received: by 10.70.54.164 with SMTP id k4mr6470916pdp.127.1408715425278; Fri, 22 Aug 2014 06:50:25 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pn7si40881017pbc.0.2014.08.22.06.50.24 for ; Fri, 22 Aug 2014 06:50:25 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756550AbaHVNuW (ORCPT + 21 others); Fri, 22 Aug 2014 09:50:22 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:60928 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756310AbaHVNuR (ORCPT ); Fri, 22 Aug 2014 09:50:17 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s7MDnpYC013846; Fri, 22 Aug 2014 08:49:51 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s7MDnp8d006158; Fri, 22 Aug 2014 08:49:51 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Fri, 22 Aug 2014 08:49:51 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s7MDnpEl019975; Fri, 22 Aug 2014 08:49:51 -0500 From: Nishanth Menon To: Tony Lindgren CC: Kevin Hilman , Tero Kristo , Paul Walmsley , , , , Keerthy , =?UTF-8?q?Beno=C3=AEt=20Cousson?= , Santosh Shilimkar , Nishanth Menon Subject: [PATCH 5/7] ARM: OMAP4+: PM: Make logic state programmable Date: Fri, 22 Aug 2014 08:49:31 -0500 Message-ID: <1408715373-25791-6-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1408715373-25791-1-git-send-email-nm@ti.com> References: <1408715373-25791-1-git-send-email-nm@ti.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: nm@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Move the logic state as different for each power domain. This allows us to customize the deepest power state we should target over all for each powerdomain in the follow on patches. Signed-off-by: Nishanth Menon --- arch/arm/mach-omap2/pm44xx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c index 0dda6cf..b377b03 100644 --- a/arch/arm/mach-omap2/pm44xx.c +++ b/arch/arm/mach-omap2/pm44xx.c @@ -29,6 +29,7 @@ u16 pm44xx_errata; struct power_state { struct powerdomain *pwrdm; u32 next_state; + u32 next_logic_state; #ifdef CONFIG_SUSPEND u32 saved_state; u32 saved_logic_state; @@ -54,7 +55,7 @@ static int omap4_pm_suspend(void) /* Set targeted power domain states by suspend */ list_for_each_entry(pwrst, &pwrst_list, node) { omap_set_pwrdm_state(pwrst->pwrdm, pwrst->next_state); - pwrdm_set_logic_retst(pwrst->pwrdm, PWRDM_POWER_OFF); + pwrdm_set_logic_retst(pwrst->pwrdm, pwrst->next_logic_state); } /* @@ -121,6 +122,8 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused) pwrst->pwrdm = pwrdm; pwrst->next_state = PWRDM_POWER_RET; + pwrst->next_logic_state = PWRDM_POWER_OFF; + list_add(&pwrst->node, &pwrst_list); return omap_set_pwrdm_state(pwrst->pwrdm, pwrst->next_state);