Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp417216rdb; Wed, 20 Dec 2023 00:25:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IGw8gh33pv0RABBEPVfl/Nj2eBDJSIFNC352e3V/MTf9DJL+3m2LKMdGVI37llRkqZ12a1l X-Received: by 2002:ac8:5705:0:b0:425:88d5:e487 with SMTP id 5-20020ac85705000000b0042588d5e487mr28321383qtw.50.1703060729632; Wed, 20 Dec 2023 00:25:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703060729; cv=none; d=google.com; s=arc-20160816; b=mSlztrtcHsqFYJZiLeQvfbrnRP8t6O5Yid3/6b28BXrYTQq2NwoB1JZHyfSfreNdor CfxxgrT5/utTX9gwCpegeCKSKrlmFNUWbwubwskjLfHTy9unYl7J+NU5lqeLYo+FDzVF x33vPV1802lA+eET2apJPY8Pt67ZaahSE4s8faSrlwav7TJJyAxPLJlQAwwJEaYh2hZC dokKBAVXJ84ohKtPbo8rKJ5B6G8FrSqOhnkIGXGEYykNI9HU5Tl8LMwFjlVRyyOss2eW CQKFDl1McNJtaNdFvmwDLlVwg+VN32buYgyk/dEcDRtgKgyIhQlyf2FLnlcGsW+QncB+ CtjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=mSgeXWeC3C82wIU4WPuA5mfbD4+AxfHjsFyPKHqZgoA=; fh=BQHA3urvnAgv0Z6dRmyyx76nk6kgY4Ga8f+MnfYj1NI=; b=Lu1WDf3Y4DCpZ6TnmtD6hRN8bnyuxLjSLABXALKiRd6otK3c08W3Be9d9WhuhBebr+ J5BL2UiW2DNzWE/ns136KAgZWXrTMOzPSblSOzD2yJIY0c6TAxWWY+cjbpO7DNzasn+Q rsywioj7sIYZmvs3/rA49UexIAXrrx4pJxfl4Ccd0bUhFo2tVCH6JbJ7nqIB6fyhk173 w6W4hYISrqrliUrA2rqL4WvmvLf9R8L+0kRaxTQ5Fk+uVYE5ctmFOzYACOYcv3nf8YfK flRiG3SiyeLV/gOBge0TRVCsXX5B0nORNd/c0Qr/LCJ4phK5cgeszELO7myOc20atkIp 8X2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Gw9HzuD4; spf=pass (google.com: domain of linux-kernel+bounces-6564-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6564-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v31-20020a05622a189f00b0042604f94036si859133qtc.739.2023.12.20.00.25.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 00:25:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6564-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Gw9HzuD4; spf=pass (google.com: domain of linux-kernel+bounces-6564-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6564-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4FE901C21167 for ; Wed, 20 Dec 2023 08:25:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 592E21BDE3; Wed, 20 Dec 2023 08:25:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Gw9HzuD4" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6AB471C680; Wed, 20 Dec 2023 08:25:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2607C433C8; Wed, 20 Dec 2023 08:25:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703060716; bh=yE37HTZNbU+z9qbvF053iKFsAmiR2rX11XSh1r4g52U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Gw9HzuD4EacM9dexOzs2iKOcvaQT3aB17CIxMfGEX9/M1zNePCeL1odHILQNcgl2M Ltj4xnCbextkpHnQIMVCnfgf4qfG7+ZQedJ8oJ2WnZcrQORe5B3Ge8Vg7HB3RLjoO+ tjAe4Q1nOLQ2yd//0fOAjDK3RhrS92pKPFBUWsmHKG8XAnu1X+7B7ith7ANpH75YN6 rvIWhcN1iWIe51PGDH08GCyVZ9Ablli2NJN8hhgDupVMGiuDjI0Guh5uCkLWnoShPm s6IadcPhjSlS6ZrH6MKMRTQCSw6kmnOuXPLCPWlRjUU3KPEBF9E2j2P+vlfTG426Mq zF/TmkUUbumgg== Received: from johan by xi.lan with local (Exim 4.96.2) (envelope-from ) id 1rFrtC-0000vg-0m; Wed, 20 Dec 2023 09:25:14 +0100 Date: Wed, 20 Dec 2023 09:25:14 +0100 From: Johan Hovold To: Konrad Dybcio Cc: Bjorn Andersson , Andy Gross , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Bryan O'Donoghue Subject: Re: [PATCH v3 02/15] clk: qcom: Use qcom_branch_set_clk_en() Message-ID: References: <20230717-topic-branch_aon_cleanup-v3-0-3e31bce9c626@linaro.org> <20230717-topic-branch_aon_cleanup-v3-2-3e31bce9c626@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230717-topic-branch_aon_cleanup-v3-2-3e31bce9c626@linaro.org> On Wed, Dec 20, 2023 at 01:30:43AM +0100, Konrad Dybcio wrote: > Instead of magically poking at the bit0 of branch clocks' CBCR, use > the newly introduced helper. > > Reviewed-by: Bryan O'Donoghue > Signed-off-by: Konrad Dybcio > diff --git a/drivers/clk/qcom/gcc-sc8280xp.c b/drivers/clk/qcom/gcc-sc8280xp.c > index bfb77931e868..1ba78990b9f4 100644 > --- a/drivers/clk/qcom/gcc-sc8280xp.c > +++ b/drivers/clk/qcom/gcc-sc8280xp.c > @@ -7543,21 +7543,15 @@ static int gcc_sc8280xp_probe(struct platform_device *pdev) > goto err_put_rpm; > } > > - /* > - * Keep the clocks always-ON I think you should keep this part of the comment in some form throughout, for example: /* Keep some clocks always on */ qcom_branch_set_clk_en(...); ... > - * GCC_CAMERA_AHB_CLK, GCC_CAMERA_XO_CLK, GCC_DISP_AHB_CLK, > - * GCC_DISP_XO_CLK, GCC_GPU_CFG_AHB_CLK, GCC_VIDEO_AHB_CLK, > - * GCC_VIDEO_XO_CLK, GCC_DISP1_AHB_CLK, GCC_DISP1_XO_CLK > - */ > - regmap_update_bits(regmap, 0x26004, BIT(0), BIT(0)); > - regmap_update_bits(regmap, 0x26020, BIT(0), BIT(0)); > - regmap_update_bits(regmap, 0x27004, BIT(0), BIT(0)); > - regmap_update_bits(regmap, 0x27028, BIT(0), BIT(0)); > - regmap_update_bits(regmap, 0x71004, BIT(0), BIT(0)); > - regmap_update_bits(regmap, 0x28004, BIT(0), BIT(0)); > - regmap_update_bits(regmap, 0x28028, BIT(0), BIT(0)); > - regmap_update_bits(regmap, 0xbb004, BIT(0), BIT(0)); > - regmap_update_bits(regmap, 0xbb028, BIT(0), BIT(0)); > + qcom_branch_set_clk_en(regmap, 0x26004); /* GCC_CAMERA_AHB_CLK */ > + qcom_branch_set_clk_en(regmap, 0x26020); /* GCC_CAMERA_XO_CLK */ > + qcom_branch_set_clk_en(regmap, 0x27004); /* GCC_DISP_AHB_CLK */ > + qcom_branch_set_clk_en(regmap, 0x27028); /* GCC_DISP_XO_CLK */ > + qcom_branch_set_clk_en(regmap, 0x71004); /* GCC_GPU_CFG_AHB_CLK */ > + qcom_branch_set_clk_en(regmap, 0x28004); /* GCC_VIDEO_AHB_CLK */ > + qcom_branch_set_clk_en(regmap, 0x28028); /* GCC_VIDEO_XO_CLK */ > + qcom_branch_set_clk_en(regmap, 0xbb004); /* GCC_DISP1_AHB_CLK */ > + qcom_branch_set_clk_en(regmap, 0xbb028); /* GCC_DISP1_XO_CLK */ > > ret = qcom_cc_register_rcg_dfs(regmap, gcc_dfs_clocks, ARRAY_SIZE(gcc_dfs_clocks)); > if (ret) Johan