From patchwork Fri Aug 22 13:49:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 35822 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f200.google.com (mail-pd0-f200.google.com [209.85.192.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6E45820540 for ; Fri, 22 Aug 2014 13:50:52 +0000 (UTC) Received: by mail-pd0-f200.google.com with SMTP id w10sf80721829pde.3 for ; Fri, 22 Aug 2014 06:50:51 -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=2whsC9yn5dBMzpRhTBqK/o+mTbpyPUneT8t+kxJmo/k=; b=TzXuSEnk+mDeBSy8lMBHgfMsLHEmJLXfVWLz2/XT19v9ijPzLt9FXwDXAYkL1E4LoM yaF4W7rHbFOSDytKGUKFlaVvF072lRl1yxFbnRp8lfuB2MfMbEPmaVpM7Z/nxTD/M6Yh bkYUhaoDRov4WBtUy7PBAoSI7I/ToVr5ULuLEQ+DbLyomViYfuYaqeBG29VL0NZvfLVB RQ4cSCP4f3buq6+0iN6oE4PlnDKmOyFPDrkXqpIXRqgsdpJa5wpV3nK5fU0o83/s33B4 K/hs3bc9St8k+ANK6CQbSP3+xWWyH9XF25P8QY+zk/ECrtMJAZsfkdZ//3YU7f/JeLH7 iJaA== X-Gm-Message-State: ALoCoQl2RU7p4PTqA+KOUO+I1B1z9TSpxF+gydU77GeYvLy5csthLqSdGZ+aI1Hi8vpQE6gRwkUe X-Received: by 10.66.144.102 with SMTP id sl6mr3343543pab.17.1408715451506; Fri, 22 Aug 2014 06:50:51 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.106.34 with SMTP id d31ls373362qgf.93.gmail; Fri, 22 Aug 2014 06:50:51 -0700 (PDT) X-Received: by 10.220.247.3 with SMTP id ma3mr907559vcb.29.1408715451308; Fri, 22 Aug 2014 06:50:51 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id lo15si12425536vdb.13.2014.08.22.06.50.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 22 Aug 2014 06:50:51 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id ik5so12087095vcb.6 for ; Fri, 22 Aug 2014 06:50:51 -0700 (PDT) X-Received: by 10.52.141.76 with SMTP id rm12mr106351vdb.71.1408715451227; Fri, 22 Aug 2014 06:50:51 -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 uj3csp18519vcb; Fri, 22 Aug 2014 06:50:50 -0700 (PDT) X-Received: by 10.70.128.164 with SMTP id np4mr4290301pdb.168.1408715450323; Fri, 22 Aug 2014 06:50:50 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g7si40950125pat.194.2014.08.22.06.50.49 for ; Fri, 22 Aug 2014 06:50:50 -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 S1756536AbaHVNuV (ORCPT + 21 others); Fri, 22 Aug 2014 09:50:21 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:58068 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756262AbaHVNuQ (ORCPT ); Fri, 22 Aug 2014 09:50:16 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s7MDnpId013172; 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 s7MDnp8c006158; 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 s7MDnpFh004026; 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 7/7] ARM: OMAP4+: PM: Use only valid low power state for CPU hotplug Date: Fri, 22 Aug 2014 08:49:33 -0500 Message-ID: <1408715373-25791-8-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.175 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: , Not all SoCs support OFF mode - for example DRA74/72. So, use valid power state during CPU hotplug. Signed-off-by: Nishanth Menon --- arch/arm/mach-omap2/omap-mpuss-lowpower.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c index 4001325..e9cdacf 100644 --- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c +++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c @@ -298,6 +298,10 @@ int omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state) if (omap_rev() == OMAP4430_REV_ES1_0) return -ENXIO; + /* Use the achievable power state for the domain */ + power_state = pwrdm_get_valid_lp_state(pm_info->pwrdm, + false, power_state); + if (power_state == PWRDM_POWER_OFF) cpu_state = 1;