From patchwork Wed Mar 8 21:35:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 660746 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A08EC6FD19 for ; Wed, 8 Mar 2023 21:36:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230189AbjCHVgP (ORCPT ); Wed, 8 Mar 2023 16:36:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230116AbjCHVfz (ORCPT ); Wed, 8 Mar 2023 16:35:55 -0500 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B62CDD293C for ; Wed, 8 Mar 2023 13:35:49 -0800 (PST) Received: by mail-lj1-x22e.google.com with SMTP id f16so18013524ljq.10 for ; Wed, 08 Mar 2023 13:35:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678311348; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=TQfh2WbVBXCGhONYJZDP8O9PA2kbZ/WsteDRJW+CEEo=; b=jlT64jGnX9EyFQbSCp7Bn017VtmEaLUeLCtmD5RVnxofRuyJmVNspcSNivRnK5XL5L +kBcOEEzSDuEgU7b5i/s+wlOoTNWHuiLKd4Lw5kKvZL0hG0JCt0zIbjQCb4odX3G2+tQ Z2D7WcIwQMkP+fkb81gxKNyp9oIhxobO/7OB9PYZYrKVBBoPNLcz+va9hOaC0aBhIMkJ Bkfx/OMZXVCo4A9m/mpkZka7E1WvILbGrlGC4xwN9JuOCdZ8XxWxKJ7GlNNB/Z/SWd1T 7VZBsAfX9UEgiJcCeJ519HuSqoZCQVsLfiVqCJgOhlhdSfp37F80B5hSzlbW5T7J3JmL 6yZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678311348; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TQfh2WbVBXCGhONYJZDP8O9PA2kbZ/WsteDRJW+CEEo=; b=LT9K0UPIkjppZWYf2NLtMNdP56IEkdYAHkrPPdYnasV1hUIfivj73IghiE040/NNzH de7W9QWZDmTDkxf+SC2qjRu2Rm+/yWhC7osC/XvqLSjj1WFAqZmqGIrHLOUbJLWwW5DP h73BX0wLatyxx7rW2soxLXRmy/yE854ZZE9C7Orvxh8nZBmdSV95EudnGUs7VIS92kz7 SjVxJ6J1jCGcjctCcx6jqvkEeYxrdBpWa6+V0hRYhC2RoCAllLVS7JzVYpI14T+cbz0R QbMNwTAbAZZ9DNZYZGE/8p97zjr+ayJFIFvdXW0mevQO717KMoPQ8gYJN1cSE/u/nR7a 3RQA== X-Gm-Message-State: AO0yUKWTuw1cG4LQzSyYY7vkvbqnZz18W8HM8ayPJJeo8qc+sfrBf87P kWpXuItsSzS8K2Jru4QGD5/WxA== X-Google-Smtp-Source: AK7set+y+DjLgIW7cnOdetKMsRZ4JWT/c1FWUTq7ipcbLcRS7Ib4CpBEwYEsN1IXPTaza1CY4QrbrQ== X-Received: by 2002:a2e:7810:0:b0:295:b005:1d56 with SMTP id t16-20020a2e7810000000b00295b0051d56mr5751684ljc.17.1678311347868; Wed, 08 Mar 2023 13:35:47 -0800 (PST) Received: from [192.168.1.101] (abyj16.neoplus.adsl.tpnet.pl. [83.9.29.16]) by smtp.gmail.com with ESMTPSA id u7-20020ac243c7000000b004dc4d26c324sm2467479lfl.143.2023.03.08.13.35.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Mar 2023 13:35:47 -0800 (PST) From: Konrad Dybcio Date: Wed, 08 Mar 2023 22:35:23 +0100 Subject: [PATCH RFT v2 07/14] clk: qcom: smd-rpm: Make __DEFINE_CLK_SMD_RPM_PREFIX accept flags MIME-Version: 1.0 Message-Id: <20230303-topic-rpmcc_sleep-v2-7-ae80a325fe94@linaro.org> References: <20230303-topic-rpmcc_sleep-v2-0-ae80a325fe94@linaro.org> In-Reply-To: <20230303-topic-rpmcc_sleep-v2-0-ae80a325fe94@linaro.org> To: Andy Gross , Bjorn Andersson , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski , devicetree@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678311334; l=1880; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=psKSvGQDNyeXFzjuSkxyveilkS0EXbnLPmqC1X+KBDY=; b=BNP9g6R4cFS3/Yrb9t5P/MOac0VdgbxoI+qmXh6hIoCVitEsxsgiU5LyXmHV31X+F2mf/Q0b+636 4HBTf54rCPB/sF1gXBv7ClninZknYlvqL3ULKsdw8p1TJd1D0NJV X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org In preparation for supporting keepalive clocks which can never be shut off (as the platform would fall apart otherwise), make the __DEFINE_CLK_SMD_RPM_PREFIX macro accept clock flags for the active-only clock. Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/clk-smd-rpm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/clk/qcom/clk-smd-rpm.c b/drivers/clk/qcom/clk-smd-rpm.c index 9dc779360ada..ddb4268ba2a5 100644 --- a/drivers/clk/qcom/clk-smd-rpm.c +++ b/drivers/clk/qcom/clk-smd-rpm.c @@ -26,7 +26,7 @@ #define QCOM_RPM_SCALING_ENABLE_ID 0x2 #define __DEFINE_CLK_SMD_RPM_PREFIX(_prefix, _name, _active, \ - type, r_id, key) \ + type, r_id, key, ao_flags) \ static struct clk_smd_rpm clk_smd_rpm_##_prefix##_active; \ static struct clk_smd_rpm clk_smd_rpm_##_prefix##_name = { \ .rpm_res_type = (type), \ @@ -58,13 +58,14 @@ .fw_name = "xo", \ .name = "xo_board", \ }, \ + .flags = (ao_flags), \ .num_parents = 1, \ }, \ } #define __DEFINE_CLK_SMD_RPM(_name, _active, type, r_id, key) \ __DEFINE_CLK_SMD_RPM_PREFIX(/* empty */, _name, _active, \ - type, r_id, key) + type, r_id, key, 0) #define __DEFINE_CLK_SMD_RPM_BRANCH_PREFIX(_prefix, _name, _active,\ type, r_id, r, key, ao_flags) \ @@ -117,7 +118,7 @@ #define DEFINE_CLK_SMD_RPM_BUS(_name, r_id) \ __DEFINE_CLK_SMD_RPM_PREFIX(bus_##r_id##_, \ _name##_clk, _name##_a_clk, QCOM_SMD_RPM_BUS_CLK, r_id, \ - QCOM_RPM_SMD_KEY_RATE) + QCOM_RPM_SMD_KEY_RATE, 0) #define DEFINE_CLK_SMD_RPM_CLK_SRC(_name, type, r_id) \ __DEFINE_CLK_SMD_RPM( \