From patchwork Wed Mar 8 21:35:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 661844 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 CA056C6FD19 for ; Wed, 8 Mar 2023 21:35:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230128AbjCHVfz (ORCPT ); Wed, 8 Mar 2023 16:35:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230030AbjCHVfu (ORCPT ); Wed, 8 Mar 2023 16:35:50 -0500 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21C76A8389 for ; Wed, 8 Mar 2023 13:35:44 -0800 (PST) Received: by mail-lf1-x129.google.com with SMTP id k14so23110176lfj.7 for ; Wed, 08 Mar 2023 13:35:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678311342; 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=ZR8rEfH+mByVpllyIkEvGaJqUK/MTbgeGfOlnZZHumI=; b=j5mdZnIXSPZgZ84/ChHPJU3MRFTAFSRTVSFKGDnDq8LQZHHRpw6zKsGRmwb8B7nLUe t9RKmbMdGY8w7Vuotqvr2aKglsFlIJQT+BELcAjgQesTzQUek3uaoQ03uYkZh4tlSc7w 5t5FkAm8JPSG/RLCn/dV/bs6WyLPCtVd8AK3yop13ht3+3vTHA8OJOpCvBBjgfsGFZ7b ws3hIvpjUmG734VwrFACIlR7AmoXyX+i5UVoklHS+vxrKWR/jWqzvafsHQB+8Zj1OikC imP0UVpgyHObbiVoCmXO5AR8vmCo6MCHeurn973btqrBEToWyewl45YnD3T016gJ4+On oaTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678311342; 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=ZR8rEfH+mByVpllyIkEvGaJqUK/MTbgeGfOlnZZHumI=; b=a8TWqL82DQqUqT96J/1dqhhlVcLKrNTM8719fgF5GTh+dkD/JV+DcFmMCWqYT7fmkF 6ZbcwS9Qzn1uypVVGkAH3XdjR5Cw16uhPwzyvLs8eu0+MB0NJrOxjCXPoVCQjxA+0rJF xLuaO+QRaOnbWNKSSFQhBYoekWcYsTSS13h2umZMeMVOrgB81elJsZ6JEulLqGaDEQNk 8AuLNCDxSJEYQDjqSvdpzMkTWIxuk2AVYy6Am9i+f14XzI9gHW6eDJ+2B1w3CdMHV1Zi XsaZxenSQoP73Bm1kQ7YTSr3Iweq/e9kQzn4w/uXDP4KVWv4TrnD4YsWKGQeMxpBEAqD jN1g== X-Gm-Message-State: AO0yUKUviuEmiI0CHTf+unSv01qgUMbATVZ4gPlwNOcJZiTRoYIstGnj SYeyHxwlo7NNnh5PawL/gkctiQ== X-Google-Smtp-Source: AK7set9sJIy5ZuLxBh5lDZbltjJuYSZnf3f/k93H386tFxS4vn4xgQwY79ATHTAqpMNQ6F+zjCDXYA== X-Received: by 2002:ac2:593b:0:b0:4a4:68b7:deab with SMTP id v27-20020ac2593b000000b004a468b7deabmr5396112lfi.7.1678311342439; Wed, 08 Mar 2023 13:35:42 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Mar 2023 13:35:41 -0800 (PST) From: Konrad Dybcio Date: Wed, 08 Mar 2023 22:35:20 +0100 Subject: [PATCH RFT v2 04/14] clk: qcom: smd-rpm_ Make __DEFINE_CLK_SMD_RPM_BRANCH_PREFIX accept flags MIME-Version: 1.0 Message-Id: <20230303-topic-rpmcc_sleep-v2-4-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=2532; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=XuAIaIbpiaJbVxAhaqMtXMVrCCmBcmYgJ4nDGrAeQno=; b=jZNigdsRXfdIB65SyKr65oVKcy+ixT8aE4ifRveJcZemRFeUe6X7/ib04zd35LNJEGWZm0kL1yI8 ug9NlicED7TK1xGd6sC07EquGHlLsUaI0XaRyQpieU97pGBPNVp6 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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_BRANCH_PREFIX macro accept clock flags for the active-only clock. Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/clk-smd-rpm.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/clk/qcom/clk-smd-rpm.c b/drivers/clk/qcom/clk-smd-rpm.c index cce7daa97c1e..72b1f010509b 100644 --- a/drivers/clk/qcom/clk-smd-rpm.c +++ b/drivers/clk/qcom/clk-smd-rpm.c @@ -67,7 +67,7 @@ type, r_id, key) #define __DEFINE_CLK_SMD_RPM_BRANCH_PREFIX(_prefix, _name, _active,\ - type, r_id, r, key) \ + type, r_id, r, 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), \ @@ -102,12 +102,13 @@ .name = "xo_board", \ }, \ .num_parents = 1, \ + .flags = (ao_flags), \ }, \ } #define __DEFINE_CLK_SMD_RPM_BRANCH(_name, _active, type, r_id, r, key) \ __DEFINE_CLK_SMD_RPM_BRANCH_PREFIX(/* empty */, \ - _name, _active, type, r_id, r, key) + _name, _active, type, r_id, r, key, 0) #define DEFINE_CLK_SMD_RPM(_name, type, r_id) \ __DEFINE_CLK_SMD_RPM(_name##_clk, _name##_a_clk, \ @@ -126,12 +127,12 @@ #define DEFINE_CLK_SMD_RPM_BRANCH(_name, type, r_id, r) \ __DEFINE_CLK_SMD_RPM_BRANCH_PREFIX(branch_, \ _name##_clk, _name##_a_clk, \ - type, r_id, r, QCOM_RPM_SMD_KEY_ENABLE) + type, r_id, r, QCOM_RPM_SMD_KEY_ENABLE, 0) #define DEFINE_CLK_SMD_RPM_BRANCH_A(_name, type, r_id, r) \ __DEFINE_CLK_SMD_RPM_BRANCH_PREFIX(branch_, \ _name, _name##_a, type, \ - r_id, r, QCOM_RPM_SMD_KEY_ENABLE) + r_id, r, QCOM_RPM_SMD_KEY_ENABLE, 0) #define DEFINE_CLK_SMD_RPM_QDSS(_name, type, r_id) \ __DEFINE_CLK_SMD_RPM(_name##_clk, _name##_a_clk, \ @@ -146,7 +147,7 @@ __DEFINE_CLK_SMD_RPM_BRANCH_PREFIX(_prefix, \ _name, _name##_a, \ QCOM_SMD_RPM_CLK_BUF_A, r_id, r, \ - QCOM_RPM_KEY_SOFTWARE_ENABLE) + QCOM_RPM_KEY_SOFTWARE_ENABLE, 0) #define DEFINE_CLK_SMD_RPM_XO_BUFFER_PINCTRL(_name, r_id, r) \ DEFINE_CLK_SMD_RPM_XO_BUFFER(_name, r_id, r); \