Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp826687pxb; Tue, 12 Apr 2022 14:33:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztFYG3Pm0p8B6C+FDKkrZ2dTx5d60tpuSAvCG7ZVdOA1bv18MP92Ua5n2yfpCHetx/gaha X-Received: by 2002:a17:903:248:b0:155:e8c6:8770 with SMTP id j8-20020a170903024800b00155e8c68770mr38247960plh.129.1649799209495; Tue, 12 Apr 2022 14:33:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649799209; cv=none; d=google.com; s=arc-20160816; b=nn9z/jtsMvr9+FuMfnpRMtFVNgMzXEWGFgP1n1yJSqeSWxHnw7EEoJo8OMPMFMF5uk EaNe2IFHhxIhI3s/qpU1y5zaVPL+2VtwNv2VRqxs2cMcBljiQ5OTNzBS3ghZ8nV8mJth wfu0bJfH+w8KG81WcNGNqtGvrMg1SSsOh5JkphKoPWQJbXs/3b3aMBUReSYIly75btxJ 284xz8UwublNxHZy2aBh/dd1TsS2+ejjGiswsIRYeOi+me3qfyp5uWaNZXaoXv04XvFc r/qqm+JSITFxHnzFh3m2xgsxP251VxdfaNwk8EWtCeJ0WpaE+ERMHtiL1hlReM90UHVC Js9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Go9IvpDXSR7Gejk41sTME4/PVZMxW5LbmIPwH42ez3c=; b=WHc0naDYjn2B4VQeKDUfghLNkh+g03fn7liMfsyWitplx/Zz7G4J+NUiUozJNqpbso NIsvSc8XQGHSC8PfMvAsPHSxtaNZD0Ny7HHgnXW/jFL9sfHHmtldTLig62Wu10/4B5nY BnB/otsJKh+cEBMBMeutO1G8UuSg3F3K6tps4sJLHvn1avotxED0tCMWhFWg1ML7pr9z tlB+2SRartkmgVTHAIHujAg7/Kt/h5A8aplqfI1Aceu8xz3swKSdv/WRkdf1igXATjC1 xrHkACKDJBb/ZZ01+C2csIspzAJUr6oERZs8PKGcFNVOx6GTFMgzLe9HCUXBWqwBcoti OPZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oB8XLCKE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id f68-20020a636a47000000b003816043ef39si3783395pgc.302.2022.04.12.14.33.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 14:33:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oB8XLCKE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E424F114345; Tue, 12 Apr 2022 13:39:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356890AbiDLPSd (ORCPT + 99 others); Tue, 12 Apr 2022 11:18:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351015AbiDLPSc (ORCPT ); Tue, 12 Apr 2022 11:18:32 -0400 Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EB545E753 for ; Tue, 12 Apr 2022 08:16:14 -0700 (PDT) Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-ddfa38f1c1so21032512fac.11 for ; Tue, 12 Apr 2022 08:16:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Go9IvpDXSR7Gejk41sTME4/PVZMxW5LbmIPwH42ez3c=; b=oB8XLCKEtXmigDeFjQNL0sJlBLv5iwNx5epuN9ygeoE616XfYi7Kw9lPPA7oNqzegL Tc9QtYGbbMOktFi30wj2BH+QltPtIO8XxT/7iWGR/yZzeAwzP9ENRzoPxegYkw5ZQoyK KQmeEYzcooeQmyv8TwVqqfr6DZaya0NOCz8o7ICwh1GK7NPKPSTpk5bJBBDwJeIEFt7x YW+o9o5VENEHkc06/TlfvBGbYjIuFaWsHL0434BCsFbHj03V/oYorKQKXrh0LZInyWTk a9PLafjcUEdXVVbnK7ufRzlEke41wAMRr4U1B83CL7tiMg9dDHbsLJJh3GqB3yqse+HL +MPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Go9IvpDXSR7Gejk41sTME4/PVZMxW5LbmIPwH42ez3c=; b=SCeNFWmz+Ial3zWmhP6FBGK48MqmAR38OPpA2qV24SYsQj99SGHB8lbgh1LeRmxVq9 jDUqD+R3GqfkT9HTxbrza3eBPiEDko2GAHAjEYHIJVna0BaW/FactDgBD717AmzHLHh3 UTovl61jVihAx6DnOFKh496pdb4lbHVwx+BzzsHOyIF5FbnwoTAuorG/Ik1mJeuYQ1nl pdOHdKmrOLW+V5HK725lzppVLxm9cKnJDjonpqyiBKtYqmJeCgvZK5P1LzUCeGjIUzHr fMkPvvctXY/g7Unv5a8bq95atmWvmorP3kUbhTCIIcTrK1agealEbIP4J41ST0mh7I39 lXUw== X-Gm-Message-State: AOAM531U5EzavNwOD9hZFGMCXqdXRlmQb8tsELO3ahDyyAL+/aZaLJ0p 9r/+7e+yoWoBmDul29AqazmcIGqnkrIXTQiq X-Received: by 2002:a05:6870:232a:b0:db:360c:7f5a with SMTP id w42-20020a056870232a00b000db360c7f5amr2215026oao.230.1649776573359; Tue, 12 Apr 2022 08:16:13 -0700 (PDT) Received: from builder.lan ([2600:1700:a0:3dc8:3697:f6ff:fe85:aac9]) by smtp.gmail.com with ESMTPSA id g8-20020a9d2d88000000b005b238f7551csm13319217otb.53.2022.04.12.08.16.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 08:16:12 -0700 (PDT) Date: Tue, 12 Apr 2022 10:16:10 -0500 From: Bjorn Andersson To: Johan Hovold Cc: Rajendra Nayak , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RESEND 2/2] soc: qcom: rpmhpd: add sc8280xp rpmh power-domains Message-ID: References: <20220225054345.2479565-1-bjorn.andersson@linaro.org> <20220225054345.2479565-2-bjorn.andersson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 11 Apr 08:30 CDT 2022, Johan Hovold wrote: > On Thu, Feb 24, 2022 at 09:43:45PM -0800, Bjorn Andersson wrote: > > The Qualcomm sc8280xp platform has 8 power-domains. Add these, and their > > relevant active-only variants, to the RPMh power-domain driver. > > As we discussed off-list, the sc8280xp apparently has 13 domains. Guess > the commit message should be updated even if you don't expose all of > these to Linux. > Thanks for spotting that, I will update the patch and rewrite the commit message accordingly. > > Signed-off-by: Bjorn Andersson > > --- > > drivers/soc/qcom/rpmhpd.c | 26 ++++++++++++++++++++++++++ > > 1 file changed, 26 insertions(+) > > > > diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c > > index 58f1dc9b9cb7..71602eb824f7 100644 > > --- a/drivers/soc/qcom/rpmhpd.c > > +++ b/drivers/soc/qcom/rpmhpd.c > > @@ -180,6 +180,11 @@ static struct rpmhpd mxc_ao = { > > .res_name = "mxc.lvl", > > }; > > > > +static struct rpmhpd nsp = { > > + .pd = { .name = "nsp", }, > > + .res_name = "nsp.lvl", > > +}; > > + > > /* SDM845 RPMH powerdomains */ > > static struct rpmhpd *sdm845_rpmhpds[] = { > > [SDM845_CX] = &cx_w_mx_parent, > > @@ -363,10 +368,31 @@ static const struct rpmhpd_desc sc8180x_desc = { > > .num_pds = ARRAY_SIZE(sc8180x_rpmhpds), > > }; > > > > +/* SC8280xp RPMH powerdomains */ > > +static struct rpmhpd *sc8280xp_rpmhpds[] = { > > + [SC8280XP_CX] = &cx, > > + [SC8280XP_CX_AO] = &cx_ao, > > + [SC8280XP_MX] = &mx, > > + [SC8280XP_MX_AO] = &mx_ao, > > + [SC8280XP_EBI] = &ebi, > > + [SC8280XP_LCX] = &lcx, > > + [SC8280XP_LMX] = &lmx, > > + [SC8280XP_GFX] = &gfx, > > + [SC8280XP_MMCX] = &mmcx, > > + [SC8280XP_MMCX_AO] = &mmcx_ao, > > + [SC8280XP_NSP] = &nsp, > > +}; > > Commit 90c74c1c2574 ("soc: qcom: rpmhpd: Sort power-domain definitions > and lists") recently sorted the other arrays. Sorting by address like > you've implicitly done here makes it easy to compare with the firmware > interface, but perhaps you want to sort alphabetically for consistency. > I like consistency. > Since there apparently are no users for active-only domains in the tree, > perhaps they can also be added later. > I'll take an extra look at this as well. Seems we do cx, mx and mmcx ao on the other platforms, but question is if that's only because we do it on previous platforms... Thanks for the review, Bjorn > > + > > +static const struct rpmhpd_desc sc8280xp_desc = { > > + .rpmhpds = sc8280xp_rpmhpds, > > + .num_pds = ARRAY_SIZE(sc8280xp_rpmhpds), > > +}; > > + > > static const struct of_device_id rpmhpd_match_table[] = { > > { .compatible = "qcom,sc7180-rpmhpd", .data = &sc7180_desc }, > > { .compatible = "qcom,sc7280-rpmhpd", .data = &sc7280_desc }, > > { .compatible = "qcom,sc8180x-rpmhpd", .data = &sc8180x_desc }, > > + { .compatible = "qcom,sc8280xp-rpmhpd", .data = &sc8280xp_desc }, > > { .compatible = "qcom,sdm845-rpmhpd", .data = &sdm845_desc }, > > { .compatible = "qcom,sdx55-rpmhpd", .data = &sdx55_desc}, > > { .compatible = "qcom,sm6350-rpmhpd", .data = &sm6350_desc }, > > Johan