From patchwork Thu Nov 29 17:46:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 152438 Delivered-To: patches@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp2672335ljp; Thu, 29 Nov 2018 09:47:31 -0800 (PST) X-Received: by 2002:a19:f204:: with SMTP id q4mr1713678lfh.133.1543513651442; Thu, 29 Nov 2018 09:47:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543513651; cv=none; d=google.com; s=arc-20160816; b=D5MKssHLmHCJ15QumjUL7XUHjvpE+CHz4bu6NLy8nZE6XjgMUDGb23ZqMYl1Y2TOCv lTZ+8Fxf/FlYZBc0frhLwATzYm1CVayexfh1qpP2NKghe9vU9l1YcEP7nfud4QCeJFbU AIXaK0v+6cCNHiFkMpYqryCQJ+o/aBEuy/eTcoYOT4dDFr/XZJnKxRPHcNMI1XUUedAD 0OSVYOp9H0zWq4nzmiqLwYGhS2cyRPzm7nSYpB3C2xMgXPm7SmPNuAOnYvW0mptBO7sl cp/4P1TkudVtMnpjRofVhVLoXaGc6M/CDeMlb/9O+PTtmovqsEBXselrVJyvLW5K0Aaq zLow== 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=jX+qyQO49fWmt2xQpGUjw4NJQ/8bkzUinDH9qdTMnUA=; b=ljLsN2yoP8LnyE52XoRihLdFfoCQgEVD21qt3X3FJBYTwkvVQ7FGcBthKoQW+ma3D7 Pjp5Z/bIvNWURrEJ3VgZu7aDOPOaATroeTEpksAXdYmxGIa7ZXou97h50yDHzRQ9D09U 9cT/3Z0P54qCHWjlraHXz+xLYrDUhIZtFmn4VcBS4oZgX56T9Fp9/1fNb8oROr5TCXOt iCxg51o9uY5BgQmFSzBfipO5/An78bZ9Mcq/eegbZHz5X1xm+zPu8fHfEZxcUB4IeD/N W7frhxO0PYELzkV6iH50maYy4sCazsngss43Rtgzb7UAXuEPD1p00m1aBYFxDaZG0PIZ niKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AlPyEsAy; 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 u5-v6sor1716766lja.17.2018.11.29.09.47.31 for (Google Transport Security); Thu, 29 Nov 2018 09:47:31 -0800 (PST) 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=AlPyEsAy; 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=jX+qyQO49fWmt2xQpGUjw4NJQ/8bkzUinDH9qdTMnUA=; b=AlPyEsAyB5TTJCSeRQDcqsvnIKB/rMfm0oTmlQA7hqOgZ6aMDexyWveeYmPE2QdbmV BmJIUeVUEo68Z1RYBp5Q7w/uSp5wPfc9ZHJqQtiE1cMsCCV0zIMnnI1fU3CrzA3sf76y BhqVyyrcH5tH2VK3YAUp3EhPfLgCuB7n6fgBg= 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=jX+qyQO49fWmt2xQpGUjw4NJQ/8bkzUinDH9qdTMnUA=; b=ItTOVvDN92H2UwUhrielakWYHKzGIgTDitOwvppgsZH3Qn5cPfiPVlk2CbvwSO5hHQ /UKNuThAzN0KopJxkZkTPeLsiET39jrHUOdrS07USX3/a98NkNNHOll8Ci7awRvXKWOL P7qTx0ks2geW4otb1k+bD6TxiMX1Mo9msvObVWBGCDmzhyROi/EaYzRH6aEF88X1VjlB fX5utONfWxQvNHq9ZT6yHWgNYpVxbKn5ZLXaODzUlHiIRKQzNhBVRVztSSvXHHXscslN WjrOkMA/v+VR/vm4tg0uKgWox7Q+qHFRQs5wwkv9ojKcsAy5wMLDNnFLp3cCEZ0I+TaW fWJQ== X-Gm-Message-State: AA+aEWb7YHjCe2IdFhMQe44IAH0qm9hQWcVZZx+yz81woWO3whKuClxp EM5+sCSW9/wuNYRfy3I0vURfKQ80 X-Google-Smtp-Source: AFSGD/WMXNnYmUDhhw+Xfxe6yvJ/i67+Rv4G+K+ZK1l5/jdsO6I8LilxuZCD2yTIfDMQsHofrPEMgw== X-Received: by 2002:a2e:5b93:: with SMTP id m19-v6mr1512841lje.115.1543513651192; Thu, 29 Nov 2018 09:47:31 -0800 (PST) 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 j76-v6sm393983ljb.12.2018.11.29.09.47.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 09:47:30 -0800 (PST) From: Ulf Hansson To: "Rafael J . Wysocki" , Sudeep Holla , Lorenzo Pieralisi , Mark Rutland , Daniel Lezcano , linux-pm@vger.kernel.org Cc: "Raju P . L . S . S . S . N" , Stephen Boyd , Tony Lindgren , Kevin Hilman , Lina Iyer , Ulf Hansson , Viresh Kumar , Vincent Guittot , Geert Uytterhoeven , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Lina Iyer Subject: [PATCH v10 13/27] drivers: firmware: psci: Support hierarchical CPU idle states Date: Thu, 29 Nov 2018 18:46:46 +0100 Message-Id: <20181129174700.16585-14-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181129174700.16585-1-ulf.hansson@linaro.org> References: <20181129174700.16585-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(). Cc: Lina Iyer Suggested-by: Sudeep Holla Signed-off-by: Lina Iyer Co-developed-by: Ulf Hansson Signed-off-by: Ulf Hansson --- Changes in v10: - 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 cbfc936d251c..631e20720a22 100644 --- a/drivers/firmware/psci/psci.c +++ b/drivers/firmware/psci/psci.c @@ -300,7 +300,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;