From patchwork Fri Aug 22 13:49:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 35825 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 40D0120540 for ; Fri, 22 Aug 2014 13:51:50 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id tr6sf24557244ieb.2 for ; Fri, 22 Aug 2014 06:51:49 -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=w3kkwnCDrn0uVDuIAZ9H8HpAZpvM6BaR5HczdY0Viwo=; b=a7RkC18w384On/VEppgKqrALijyY0twz46pNrrrglqFBU3BT/OuEeVU3DW8iByiqD/ mruBLXrLhYxNJfILu+NkMxtO8z10OCw5CdRmNbhzpobHIXZhXFxyZuCLsk4JKo0V7UGz 62usyqKFG02TzYuGEi0boUSw73kd5HvL9uBDarsQTm8KUIDW7an0CWHlxPXWDbosmGdK p9dxE9xuZjvMrVzMYOhlCVa/ASj/3lbeRL2rcvfKpPLkVz0mXGpWIKZchPml3+4iiHRn UXh/zrDRQ5oXRlGXnMIvhQBQOPA7R5H1Fi7NxGwDDdE+Se4IcxWH4K8WAjpPG6G6p3Sc kE4g== X-Gm-Message-State: ALoCoQkFwWZM54DJk6xHLtwid4n/xPIN4Of5Dk97Dfy9ynPAdhDh/EVyg1PbZp1rKZz4Q3d41jkn X-Received: by 10.43.64.202 with SMTP id xj10mr6872551icb.0.1408715509805; Fri, 22 Aug 2014 06:51:49 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.91.132 with SMTP id z4ls1081656qgd.99.gmail; Fri, 22 Aug 2014 06:51:49 -0700 (PDT) X-Received: by 10.220.182.73 with SMTP id cb9mr4117979vcb.9.1408715509584; Fri, 22 Aug 2014 06:51:49 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id wc6si13604755vdb.42.2014.08.22.06.51.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 22 Aug 2014 06:51:49 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id im17so12342751vcb.17 for ; Fri, 22 Aug 2014 06:51:49 -0700 (PDT) X-Received: by 10.220.7.131 with SMTP id d3mr154998vcd.49.1408715509450; Fri, 22 Aug 2014 06:51:49 -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 uj3csp18593vcb; Fri, 22 Aug 2014 06:51:48 -0700 (PDT) X-Received: by 10.68.220.71 with SMTP id pu7mr6921616pbc.22.1408715508518; Fri, 22 Aug 2014 06:51:48 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o17si32984029pdl.21.2014.08.22.06.51.47 for ; Fri, 22 Aug 2014 06:51:48 -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 S1756607AbaHVNvd (ORCPT + 21 others); Fri, 22 Aug 2014 09:51:33 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:33330 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756448AbaHVNuS (ORCPT ); Fri, 22 Aug 2014 09:50:18 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s7MDnpl0000625; 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 s7MDnp8b006158; Fri, 22 Aug 2014 08:49:51 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) 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 dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s7MDnpQ1004023; 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 6/7] ARM: OMAP4+: PM: use only valid low power state for suspend Date: Fri, 22 Aug 2014 08:49:32 -0500 Message-ID: <1408715373-25791-7-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.172 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: , We are using power domain state as RET and logic state as OFF. This state is OSWR. This may not always be supported on ALL power domains. In fact, on certain power domains, this might result in a hang on certain platforms. Instead, depend on powerdomain data to provide accurate information about the supported powerdomain states and use the appropriate function to query and use it as part of suspend path. Signed-off-by: Nishanth Menon --- arch/arm/mach-omap2/pm44xx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c index b377b03..0bfce38 100644 --- a/arch/arm/mach-omap2/pm44xx.c +++ b/arch/arm/mach-omap2/pm44xx.c @@ -121,8 +121,10 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused) return -ENOMEM; pwrst->pwrdm = pwrdm; - pwrst->next_state = PWRDM_POWER_RET; - pwrst->next_logic_state = PWRDM_POWER_OFF; + pwrst->next_state = pwrdm_get_valid_lp_state(pwrdm, false, + PWRDM_POWER_RET); + pwrst->next_logic_state = pwrdm_get_valid_lp_state(pwrdm, true, + PWRDM_POWER_OFF); list_add(&pwrst->node, &pwrst_list);