From patchwork Wed Nov 19 10:17:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 41119 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6324520CBB for ; Wed, 19 Nov 2014 10:18:20 +0000 (UTC) Received: by mail-la0-f71.google.com with SMTP id s18sf190350lam.10 for ; Wed, 19 Nov 2014 02:18:19 -0800 (PST) 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:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=ZUgGD3+5MG59GsFPhTW6CVG31+mAMTKM9UHtihjs8uE=; b=auvyX006QhJ0Fkl4/vghrtviYzmTEWIwffLJQIVJQKwGudz66j44vpLv93wBFSn86S YYCD40RMUR8p8RVYPl1cmHMzgTSBGJwVNlHi9Pjj9WG14+8IFJVi+jG2b1RFToCWJtGd +LbtH5m/QdA8y+ITdM/6FujgcF5fjFlDtUpRnFFvx9wPRNs6hOlCFN3JgTn56T8k6yp0 S3AhJ45CBaYRYxNUA6atKR5JOfo6R33aX2jglVg4OdGB5v9ZVCjSMb5xEa7yEfBYdGC7 2mYvtTwNHqhyRQac/LwwiUu/eLQKZrCPOaOq/IWJ2fgOuivHLxe+LaRTk4U8V8aUfpML MRWQ== X-Gm-Message-State: ALoCoQlBKoJnjpdN6QsBj36REjntcaPHp/nqUKjSum7CypFbPZLghSGCu2KuqXxgO837G4I4Tn/8 X-Received: by 10.112.138.234 with SMTP id qt10mr3062066lbb.4.1416392299379; Wed, 19 Nov 2014 02:18:19 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.206.102 with SMTP id ln6ls410318lac.95.gmail; Wed, 19 Nov 2014 02:18:19 -0800 (PST) X-Received: by 10.112.50.133 with SMTP id c5mr4496270lbo.54.1416392299006; Wed, 19 Nov 2014 02:18:19 -0800 (PST) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id jl10si1280054lbc.96.2014.11.19.02.18.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Nov 2014 02:18:18 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by mail-la0-f48.google.com with SMTP id s18so220407lam.35 for ; Wed, 19 Nov 2014 02:18:18 -0800 (PST) X-Received: by 10.112.45.102 with SMTP id l6mr4476233lbm.46.1416392298886; Wed, 19 Nov 2014 02:18:18 -0800 (PST) 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.112.184.201 with SMTP id ew9csp57571lbc; Wed, 19 Nov 2014 02:18:18 -0800 (PST) X-Received: by 10.70.48.199 with SMTP id o7mr11282659pdn.97.1416392297254; Wed, 19 Nov 2014 02:18:17 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tk3si2116108pab.20.2014.11.19.02.18.16 for ; Wed, 19 Nov 2014 02:18:17 -0800 (PST) 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 S1755919AbaKSKSM (ORCPT + 26 others); Wed, 19 Nov 2014 05:18:12 -0500 Received: from mail-wg0-f44.google.com ([74.125.82.44]:52520 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755366AbaKSKSB (ORCPT ); Wed, 19 Nov 2014 05:18:01 -0500 Received: by mail-wg0-f44.google.com with SMTP id b13so393914wgh.17 for ; Wed, 19 Nov 2014 02:18:00 -0800 (PST) X-Received: by 10.194.119.230 with SMTP id kx6mr50784296wjb.80.1416392280645; Wed, 19 Nov 2014 02:18:00 -0800 (PST) Received: from localhost.localdomain (AToulouse-656-1-820-36.w109-215.abo.wanadoo.fr. [109.215.21.36]) by mx.google.com with ESMTPSA id ll2sm1643831wjb.11.2014.11.19.02.17.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 19 Nov 2014 02:18:00 -0800 (PST) From: Daniel Lezcano To: rjw@rjwysocki.net Cc: Lorenzo.Pieralisi@arm.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/3] drivers: cpuidle: Add status property to ARM idle states Date: Wed, 19 Nov 2014 11:17:56 +0100 Message-Id: <1416392278-18397-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <546C6DEB.8060204@linaro.org> References: <546C6DEB.8060204@linaro.org> 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: daniel.lezcano@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.48 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: , From: Lorenzo Pieralisi On some platforms the device tree bindings must provide the kernel with a status flag for idle states, that defines whether the idle state is operational or not in the current configuration. This patch adds a status property to the ARM idle states compliant with ePAPR v1.1 and updates the DT parsing code accordingly. Acked-by: Kevin Hilman Signed-off-by: Lorenzo Pieralisi Signed-off-by: Daniel Lezcano --- Documentation/devicetree/bindings/arm/idle-states.txt | 14 ++++++++++++++ drivers/cpuidle/dt_idle_states.c | 3 +++ 2 files changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/idle-states.txt b/Documentation/devicetree/bindings/arm/idle-states.txt index 37375c7..5e51511 100644 --- a/Documentation/devicetree/bindings/arm/idle-states.txt +++ b/Documentation/devicetree/bindings/arm/idle-states.txt @@ -317,6 +317,20 @@ follows: In such systems entry-latency-us + exit-latency-us will exceed wakeup-latency-us by this duration. + - status: + Usage: Optional + Value type: + Definition: A standard device tree property [5] that indicates + the operational status of an idle-state. + If present, it shall be: + "okay": to indicate that the idle state is + operational. + "disabled": to indicate that the idle state has + been disabled in firmware so it is not + operational. + If the property is not present the idle-state must + be considered operational. + In addition to the properties listed above, a state node may require additional properties specifics to the entry-method defined in the idle-states node, please refer to the entry-method bindings diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c index 52f4d11..22840f4 100644 --- a/drivers/cpuidle/dt_idle_states.c +++ b/drivers/cpuidle/dt_idle_states.c @@ -169,6 +169,9 @@ int dt_init_idle_driver(struct cpuidle_driver *drv, if (!state_node) break; + if (!of_device_is_available(state_node)) + continue; + if (!idle_state_valid(state_node, i, cpumask)) { pr_warn("%s idle state not valid, bailing out\n", state_node->full_name);