Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4861609rdh; Wed, 29 Nov 2023 12:54:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IG9t4uUp59/Z2Gay6aDV1JVKh4qbI6vUEdkFDYobO4p2JU4g0ALajcLZO+e9lztN+sYrm7w X-Received: by 2002:a05:6808:309e:b0:3b8:43b6:1e34 with SMTP id bl30-20020a056808309e00b003b843b61e34mr26287274oib.30.1701291250955; Wed, 29 Nov 2023 12:54:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701291250; cv=none; d=google.com; s=arc-20160816; b=s4Cyyk8yP8w4r+rbJ7fNR9NQrIOjycVbG4jXQtNpOUXlM9+k6zOeo+gfU7Xb0hWaDl p+Kuv6fXtjVV3ZvqHChH2t4D5CWQhckoBMyUQSeuq1L570ZkYxU/euGbojikbOrRyrl0 eSQX6iUYIuACfdbGz1/vnUE4k3GwqSmufGPmjAVbsOJI7BTOYQatFbF+3144koVjGTjk 1sPNScJl8UZa6qEp6gE+aFRmYVp0Lsn14ct6TsKK2E0EAP/nEXEMr50wbi1++Agec7MP igzl2prTf5aguy3z+Ar9ck8QucgcG1NLBcTj8AmP3jgdl7wKnzhQa2Drl03/1jdF+C3W w2PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=YKjbNQgXkGMeMvnSiazATvW5vc83bVG6h9HitL94um8=; fh=c27RpZoxGCwf3KP2dEfPjb9eDlYW5b1uZs3TsgwiioI=; b=bfUWqO5HjZgCy60tvt2+/teikAOJciJCZuAaT1y7LL70CaxieEszW2bzdH9oOtgPkX oBpZHZU2YpmMiYG+9RPHysBq3f/QCY8svPcRi9y6ITvA3mytYQH79fX9mA0jlsBQtuWi H2Y7PnKr8C//JNdC0RmLNSLsqkUgT5nw8mPwkH+bQwxDdjqUskKEhOMGMW84WlxJrpLp /HbBcAx75BGtlR36/wbu2IrseGpuXMPcQ9+AJRrwFVSS4npxvUC9YJvKq5PY1CyB8VAh tupi8L03L2LivjNnqLHuJNrD+djBqvzpQhW4BN+IQ5FgDqP8N+lyLkAZxt2vGQRn/0dc 7VWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nexus-software-ie.20230601.gappssmtp.com header.s=20230601 header.b=kQpQoQWE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id p13-20020a63f44d000000b005be0fa4ea26si14637134pgk.603.2023.11.29.12.54.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 12:54:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@nexus-software-ie.20230601.gappssmtp.com header.s=20230601 header.b=kQpQoQWE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 6314C80C9C86; Wed, 29 Nov 2023 12:54:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229967AbjK2Ux7 (ORCPT + 99 others); Wed, 29 Nov 2023 15:53:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229556AbjK2Ux6 (ORCPT ); Wed, 29 Nov 2023 15:53:58 -0500 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0D31D69 for ; Wed, 29 Nov 2023 12:54:00 -0800 (PST) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-40b4d9e81deso1731995e9.0 for ; Wed, 29 Nov 2023 12:54:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nexus-software-ie.20230601.gappssmtp.com; s=20230601; t=1701291239; x=1701896039; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=YKjbNQgXkGMeMvnSiazATvW5vc83bVG6h9HitL94um8=; b=kQpQoQWE3JvI6Sk1pwSmnEZjXE1b7nAjtCMMx0yuLuAL06QFPkhCoHrBGfj0cB69YL meYqE+W9sSmk79So2o4ueAM9W+h9hsbItFY4H3K0FmYbAehzaFqu8Nf3k5UCbuvukxZ7 HL83XVh35lAlesmW93PkgcVUYIJqCfSUPgHyecXwzt41McLuB+uH5Pj8zCRJUXy/DqKl 7Lyfmeqz9e8OencVfsU01vZFBg/k6RuYbyDtRbXYLic+hVupiisctJ/DpNFMexUvTW8R kttwpW4bKf0PrDv3/5d/+nAG6zKKgotHlgahLgWBxc64hZGoYB9x+mGtWl1eSzkw7hv3 k5oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701291239; x=1701896039; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YKjbNQgXkGMeMvnSiazATvW5vc83bVG6h9HitL94um8=; b=HwXbzvHOxhkdmSha75I5z6ysXfh/etwZwsjlJfBpfjwysyc8QiJfTLgTZdI/io8mkE rDopHYUuU7lyBypSq0oAJskpR0RmYqlngC/DEFXnQbi5T9yULB/iVllm1yV3B96CLFTJ pY4MPb54+hVnEp30Yn4pvKpz59+Cumb2pyg5ZCW6cyi3v4ZJxmfvWs4Y/z2jZRRZyEje NcXScP0S6M9z6hx7PxiBRO+zhO6FXeA6DWuG9lS4NBiGu9Yl5MYwq9t7AR/L4nWmALNz tJbAXlVfYKF3K5mhCkMXKGdfgIdidUXfo/gxs6RV681o9p+/nU8TzyEolHcvphXs/1EA ECPA== X-Gm-Message-State: AOJu0YyBVvuYlXFWFU1evNrBNo1ZuCu3wLIn942bezI2NOuwFtGmcWnZ PmQoFfsLUIbUgbp30RkxFXWA4w== X-Received: by 2002:a05:600c:4ed3:b0:408:3c10:ad47 with SMTP id g19-20020a05600c4ed300b004083c10ad47mr12917112wmq.40.1701291238941; Wed, 29 Nov 2023 12:53:58 -0800 (PST) Received: from [192.168.100.102] ([37.228.218.3]) by smtp.gmail.com with ESMTPSA id k18-20020a05600c1c9200b0040b2976eb02sm3351905wms.10.2023.11.29.12.53.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Nov 2023 12:53:58 -0800 (PST) Message-ID: Date: Wed, 29 Nov 2023 20:53:56 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 01/15] clk: qcom: branch: Add a helper for setting the enable bit Content-Language: en-US To: Konrad Dybcio , Bjorn Andersson , Andy Gross , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Johan Hovold References: <20230717-topic-branch_aon_cleanup-v2-0-2a583460ef26@linaro.org> <20230717-topic-branch_aon_cleanup-v2-1-2a583460ef26@linaro.org> From: Bryan O'Donoghue In-Reply-To: <20230717-topic-branch_aon_cleanup-v2-1-2a583460ef26@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 29 Nov 2023 12:54:09 -0800 (PST) On 29/11/2023 18:59, Konrad Dybcio wrote: > We hardcode some clocks to be always-on, as they're essential to the > functioning of the SoC / some peripherals. Add a helper to do so > to make the writes less magic. > > Reviewed-by: Johan Hovold > Signed-off-by: Konrad Dybcio > --- > drivers/clk/qcom/clk-branch.h | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/clk/qcom/clk-branch.h b/drivers/clk/qcom/clk-branch.h > index 0cf800b9d08d..155818cc8d49 100644 > --- a/drivers/clk/qcom/clk-branch.h > +++ b/drivers/clk/qcom/clk-branch.h > @@ -47,6 +47,7 @@ struct clk_branch { > #define CBCR_FORCE_MEM_PERIPH_OFF BIT(12) > #define CBCR_WAKEUP GENMASK(11, 8) > #define CBCR_SLEEP GENMASK(7, 4) > +#define CBCR_CLOCK_ENABLE BIT(0) > > static inline void qcom_branch_set_force_mem_core(struct regmap *regmap, > struct clk_branch clk, bool on) > @@ -81,6 +82,12 @@ static inline void qcom_branch_set_sleep(struct regmap *regmap, struct clk_branc > FIELD_PREP(CBCR_SLEEP, val)); > } > > +static inline void qcom_branch_set_clk_en(struct regmap *regmap, u32 cbcr) > +{ > + regmap_update_bits(regmap, cbcr, CBCR_CLOCK_ENABLE, > + CBCR_CLOCK_ENABLE); > +} > + > extern const struct clk_ops clk_branch_ops; > extern const struct clk_ops clk_branch2_ops; > extern const struct clk_ops clk_branch_simple_ops; > Reviewed-by: Bryan O'Donoghue