From patchwork Thu Oct 16 13:59:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Pieralisi X-Patchwork-Id: 38819 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D35E820973 for ; Thu, 16 Oct 2014 13:59:30 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id gq15sf1929073lab.7 for ; Thu, 16 Oct 2014 06:59:29 -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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=Mp0dJEUmZjljxZvpZX29jooEah/Sg/SjY3qylkf53dA=; b=Pl/yYaeTwu8pl5AZTJ6jWPOBMwEUKNkuucLGVxNTASLtBqhxNglSwuRElYvzWcc8aj zWsKWJ2EV/biZBCMiZjw3zdHCnTsKZ0U5cPkmw7+EE1musc0Q2dLjrdxd9RGUslkK6bA hQpLrH4P27BzDBGXFRJmn+4D6jNBu4BwMI74w63Xiq9rl6Igyz724QX+wEBs6odDXBip DNcfxlVJnBAkhgnGM6aJgWELdfylB6PzQMuoY75UbTLXEHDcJPB01viN5kUOKinJ+Ttu cZgFgUhleZpBhI1+taJ4TPq1wideuyLrJs+JvFbtCQTPmRnaFU732spSpxZA8ouftmJc 10Gg== X-Gm-Message-State: ALoCoQn1+UeMPoGz8abP0nwPamqiDOWx13bGAkbuVuNHR0LRzgKEy6eYWZyy1Qw+SJn/Noyliv0P X-Received: by 10.112.55.10 with SMTP id n10mr156305lbp.14.1413467969544; Thu, 16 Oct 2014 06:59:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.72 with SMTP id q8ls133599laq.98.gmail; Thu, 16 Oct 2014 06:59:29 -0700 (PDT) X-Received: by 10.112.35.229 with SMTP id l5mr1899703lbj.60.1413467969376; Thu, 16 Oct 2014 06:59:29 -0700 (PDT) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com [209.85.217.176]) by mx.google.com with ESMTPS id na4si34929633lbb.65.2014.10.16.06.59.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 16 Oct 2014 06:59:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by mail-lb0-f176.google.com with SMTP id p9so2814069lbv.21 for ; Thu, 16 Oct 2014 06:59:29 -0700 (PDT) X-Received: by 10.112.189.10 with SMTP id ge10mr1807012lbc.23.1413467969291; Thu, 16 Oct 2014 06:59:29 -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.112.84.229 with SMTP id c5csp43974lbz; Thu, 16 Oct 2014 06:59:28 -0700 (PDT) X-Received: by 10.68.129.167 with SMTP id nx7mr1488533pbb.51.1413467967796; Thu, 16 Oct 2014 06:59:27 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fd3si12381915pad.74.2014.10.16.06.59.27 for ; Thu, 16 Oct 2014 06:59:27 -0700 (PDT) Received-SPF: none (google.com: linux-pm-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 S1752593AbaJPN7Z (ORCPT + 15 others); Thu, 16 Oct 2014 09:59:25 -0400 Received: from service87.mimecast.com ([91.220.42.44]:40046 "EHLO service87.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752035AbaJPN7Z (ORCPT ); Thu, 16 Oct 2014 09:59:25 -0400 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Thu, 16 Oct 2014 14:59:19 +0100 Received: from red-moon.cambridge.arm.com ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 16 Oct 2014 14:59:18 +0100 From: Lorenzo Pieralisi To: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Cc: devicetree@vger.kernel.org, Lorenzo Pieralisi , Mark Rutland , Rob Herring , Daniel Lezcano , Kevin Hilman , Chander Kashyap , Stephen Boyd Subject: [PATCH 1/3] drivers: cpuidle: add status property to ARM idle states Date: Thu, 16 Oct 2014 14:59:55 +0100 Message-Id: <1413467997-32131-1-git-send-email-lorenzo.pieralisi@arm.com> X-Mailer: git-send-email 2.1.2 X-OriginalArrivalTime: 16 Oct 2014 13:59:18.0742 (UTC) FILETIME=[6110F760:01CFE949] X-MC-Unique: 114101614591922701 Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lorenzo.pieralisi@arm.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.217.176 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: , 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. Signed-off-by: Lorenzo Pieralisi Acked-by: Kevin Hilman --- 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..d8ab4b9 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 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);