From patchwork Tue Dec 4 05:21:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajendra Nayak X-Patchwork-Id: 10711125 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 14CCE109C for ; Tue, 4 Dec 2018 05:22:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04CF82A1FE for ; Tue, 4 Dec 2018 05:22:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7D1E2A81A; Tue, 4 Dec 2018 05:22:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 899AF2A1FE for ; Tue, 4 Dec 2018 05:22:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726219AbeLDFWG (ORCPT ); Tue, 4 Dec 2018 00:22:06 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:48792 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726184AbeLDFWF (ORCPT ); Tue, 4 Dec 2018 00:22:05 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id BEC6260BDE; Tue, 4 Dec 2018 05:22:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1543900923; bh=adfX1MW9FJdoo7332ONkRKboWIKVe3TISpIh6eVio88=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NjszFt+G03exhtp/B6/YVg74PeOBjycAwh4Lo68QcmQgL0DTC7ofLljQ6YWiG5TTT R3l9T2SiPYyzl0TKfArrPVE7D+QVg1P/GsrQtlwFo/7TewZeaQuoopiK2l7t99mkyQ fpvE/P4VTihUuKIVMBPGVEWqiHQyzTNfc1dzbgEU= Received: from blr-ubuntu-173.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: rnayak@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 9124C60A98; Tue, 4 Dec 2018 05:21:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1543900919; bh=adfX1MW9FJdoo7332ONkRKboWIKVe3TISpIh6eVio88=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LCAzti37ulgUzbOMb+Yyg0q0nr4iEbnf7tlACK9/pMIuMz53lx0ZkyXJNjvmGsifC ZwMsX3VPRGhYAqHZNOaWZXPMn2zL3PNS8Ny6BInQHsLTRUpxgaWOd9IrQHr84ijmFa 7cN7I73K8DCpezxtylIRr3tm8irY0HT+2b/XXx/w= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9124C60A98 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=rnayak@codeaurora.org From: Rajendra Nayak To: robh@kernel.org, viresh.kumar@linaro.org, sboyd@kernel.org, andy.gross@linaro.org, ulf.hansson@linaro.org, collinsd@codeaurora.org, mka@chromium.org Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Rajendra Nayak Subject: [PATCH v5 8/8] soc: qcom: rpmhpd: Mark mx as a parent for cx Date: Tue, 4 Dec 2018 10:51:19 +0530 Message-Id: <20181204052119.806-9-rnayak@codeaurora.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181204052119.806-1-rnayak@codeaurora.org> References: <20181204052119.806-1-rnayak@codeaurora.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Specify the active + sleep and active-only MX power domains as the parents of the corresponding CX power domains. This will ensure that performance state requests on CX automatically generate equivalent requests on MX power domains. This is used to enforce a requirement that exists for various hardware blocks on SDM845 that MX performance state >= CX performance state for a given operating frequency. Signed-off-by: Rajendra Nayak Acked-by: Viresh Kumar --- This patch is dependent on the series from Viresh [1] which adds support to propogate performance states across the power domain hierarchy which is still being reviewed. [1] https://lkml.org/lkml/2018/11/26/333 drivers/soc/qcom/rpmhpd.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c index 10b45b4f4588..6624c9c56b2e 100644 --- a/drivers/soc/qcom/rpmhpd.c +++ b/drivers/soc/qcom/rpmhpd.c @@ -104,12 +104,14 @@ static struct rpmhpd sdm845_cx_ao; static struct rpmhpd sdm845_cx = { .pd = { .name = "cx", }, .peer = &sdm845_cx_ao, + .parent = &sdm845_mx.pd, .res_name = "cx.lvl", }; static struct rpmhpd sdm845_cx_ao = { .pd = { .name = "cx_ao", }, .peer = &sdm845_cx, + .parent = &sdm845_mx_ao.pd, .res_name = "cx.lvl", }; @@ -403,6 +405,15 @@ static int rpmhpd_probe(struct platform_device *pdev) data->domains[i] = &rpmhpds[i]->pd; } + /* Add subdomains */ + for (i = 0; i < num_pds; i++) { + if (!rpmhpds[i]) + continue; + if (rpmhpds[i]->parent) + pm_genpd_add_subdomain(rpmhpds[i]->parent, + &rpmhpds[i]->pd); + } + return of_genpd_add_provider_onecell(pdev->dev.of_node, data); }