From patchwork Mon May 13 19:22:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 164055 Delivered-To: patches@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1728312ili; Mon, 13 May 2019 12:23:17 -0700 (PDT) X-Received: by 2002:a2e:9a94:: with SMTP id p20mr4545227lji.2.1557775397388; Mon, 13 May 2019 12:23:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557775397; cv=none; d=google.com; s=arc-20160816; b=Vi/C38RU2jD0671kMm2CmjGqJiYntLByi52sF/ZAucZ+tZdSVwjVEzoN2JQlSL8Hi+ bv6q7KhCkYQLMZ/T60EP2EGVwhP+K4HmGtvASS1XgQXhrb9Qk2sDliC9W6refonE28bC +aZA7jMzTfp3e8fEjDYaQSUvgkwA6wlUqibAllX9rdp0PhX+idSLfwtJNVgJtxR9LKG0 s0rk3gphi11h/8F07kkdD4iEqE62OnuPABv0nbzgGcEzgFizzOmWo6DfWQBkLhOAcO0N cRdaJbAG9gBh7ZwYFmk07IOGBbdKx0FlIeHgTpvqvNtc23dpus+NxcFpxb7L4J5ISNHx k6WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Nbt/R0uZX9P8HTLZOOX7O4bQjSSh3KmuxEw/gJfnJ0w=; b=UDPxRYVOIpXDDBoLNETszJhOJ0E4P4EjNUTZCdXGjg0iRJ7nOEqhWzpNRiWDNKcDDN /bnFqGZRQeO3faBWqvZuJaaGHuk5JHo0AG5hWdDr9UuFPS3vjpH1bGRv72jk3EtIGBZ0 AFoeZNj2dcY1woqae9E0zuB18LhxKKJMza1CcAxloVeT2KKQP9IAdzZm26fCTiQ0ItPB OLeLd00H7a0hy1lfHRi1rGDuNx6+X5aOV7oONIflYciyVUlfuK/QWp0Dv+yXp0Oks4oz QS/ySWabyLOSHgjrQrd4n1fw5qcLPJA+frhGIJh9TQnOa7r40Jfvei7bbgQGTWvqewkq 4QjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=c9ATK+kF; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id d13sor2981516ljj.14.2019.05.13.12.23.17 for (Google Transport Security); Mon, 13 May 2019 12:23:17 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=c9ATK+kF; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Nbt/R0uZX9P8HTLZOOX7O4bQjSSh3KmuxEw/gJfnJ0w=; b=c9ATK+kF7r7EPNbGkGdt7Bm63ADC4YHAW78L6XgGCewkxmYTEtG+L0LG2PjuZOY9P6 GIc/wvpLNy0UH3lkOe6ZFzROaxSq6yzGyHcvnwD2CRd7HZc2KPc2eU2Qqjw/+V6Y/odG 8g1QUs5Jnsr58ljysRy+9dUb1w4F/dykHejwWNEfEpnjahvDUevoLs2Q6KSLe41qv/kt 0zP1wQEuDypoCPrKTbmlS2icrt04INJA7iFSJ5TpXPM+7IfemYXsH5ks1f1TIKzK3DDH bHfdYw7ILT8JPAFLDWe6W30v1tHH6XaC6WnzwDnPcwbc/4E0bjVz5MHKP4astQUCxbqu Hwvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Nbt/R0uZX9P8HTLZOOX7O4bQjSSh3KmuxEw/gJfnJ0w=; b=TmWWAILQsu5/MUoj8aUNl8cwllFDrVtY6//vNp4XBt3JoZ7DkOQECmiM+qxvBZXr5K J243oqYI69LZ36YCLm1Yco70mu67Nm6McaxnvzrnuzP9YAay4aB+zS8yCIAomI0sOnHQ 8eUWyssyMsgTglQXVeM3Z000khcOCKPeZjEx30B5Rk+qUjnaZvG1rX33rBqbAbrgAPJr PnxsiK/XrBIsIVLc8tFq/ZmNTBZ8Y6YI+OPuYITp5BEqdiY+Wp1ZUYWaNIERBqeE21/h 1Yc6dTrvZmT95oTodEudbC9BUs2T1b8EUOK6Nzjc7E6dk0Mr+PziJtreKJc0x7eF80Xn JlgA== X-Gm-Message-State: APjAAAVT/fexCtRa54TajjarJ0wtHGuPJmqwHKb1HnIw89W9NAFpAZ6n xvD9pKj7gYj0Gm/jMpNg9aMtDgCJ X-Google-Smtp-Source: APXvYqw/K4DSr+T5mHbidlXB09i9OsKjJE0jmVRY6GRi9vogaHyD5Mxz5/BfqSTiLW4LknGP/8Tf2g== X-Received: by 2002:a2e:1312:: with SMTP id 18mr4211531ljt.79.1557775397083; Mon, 13 May 2019 12:23:17 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id q21sm3449365lfa.84.2019.05.13.12.23.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 May 2019 12:23:16 -0700 (PDT) From: Ulf Hansson To: Sudeep Holla , Lorenzo Pieralisi , Mark Rutland , linux-arm-kernel@lists.infradead.org Cc: "Rafael J . Wysocki" , Daniel Lezcano , "Raju P . L . S . S . S . N" , Amit Kucheria , Bjorn Andersson , Stephen Boyd , Niklas Cassel , Tony Lindgren , Kevin Hilman , Lina Iyer , Viresh Kumar , Vincent Guittot , Geert Uytterhoeven , Souvik Chakravarty , linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Lina Iyer , Ulf Hansson Subject: [PATCH 06/18] drivers: firmware: psci: Support hierarchical CPU idle states Date: Mon, 13 May 2019 21:22:48 +0200 Message-Id: <20190513192300.653-7-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190513192300.653-1-ulf.hansson@linaro.org> References: <20190513192300.653-1-ulf.hansson@linaro.org> From: Lina Iyer Currently CPU's idle states are represented in a flattened model, via the "cpu-idle-states" binding from within the CPU's device nodes. Support the hierarchical layout, simply by converting to calling the new OF helper, of_get_cpu_state_node(). Suggested-by: Sudeep Holla Signed-off-by: Lina Iyer Co-developed-by: Ulf Hansson Signed-off-by: Ulf Hansson --- Changes: - None. --- drivers/firmware/psci/psci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c index 9c2180bcee4c..b11560f7c4b9 100644 --- a/drivers/firmware/psci/psci.c +++ b/drivers/firmware/psci/psci.c @@ -316,7 +316,7 @@ static int psci_dt_cpu_init_idle(struct cpuidle_driver *drv, return -ENOMEM; for (i = 0; i < num_state_nodes; i++) { - state_node = of_parse_phandle(cpu_node, "cpu-idle-states", i); + state_node = of_get_cpu_state_node(cpu_node, i); if (!state_node) break;