Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp213344rwl; Wed, 9 Aug 2023 13:24:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEqESTkhjGq86ap145HkeNwbq3DFWLQDGTBnh2jI45UPZwfOLtK87LZwYZxw+/CiwxcTDiY X-Received: by 2002:a05:6a20:9717:b0:13b:9ff3:f52e with SMTP id hr23-20020a056a20971700b0013b9ff3f52emr228832pzc.56.1691612669761; Wed, 09 Aug 2023 13:24:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691612669; cv=none; d=google.com; s=arc-20160816; b=X2UQVBLxcNncjmT5Ghl70BQcWDK1NZHeyqJ0jXAJMSX1xKdJeBpJA0unsS+L1ddM8a eqsesOPdqFSkmBGiha5pPW6aUiKEXZdtEfJ2wHkYK3PdXEoXt1KPXzjHYEDfF5mGX/L6 3aUYQ1eEVIn4XxINSAy94GQRjGubQaGu7L1kHg7g8F4VeUHSyhOxsEgamg2OEySm1DIX msFWJ7wh38G+i1kmt5nty6Fe1DYyKTBCyI6A3WZCTTi4HLxgydYS68yC5m9bfxyaDGaz VEPMu5zNK8bzZ6QV3toNz8yPS831FdeEe3paTzu4JpDoW66sdZC01kOMrsrija62Y5Dq 8PNA== 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:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=RBodoJrBHAgz/TzgDtibSZ9qk+u2fN1KDY0bxZS/Y3Q=; fh=TMdiRWNTAv+Ks6LHlo+GMibkk5gUX1xCmhBdbL5qdlw=; b=AM9ayYTE4AtizD0NXYQxqbDtMedZKfbiXC/PfNrSozxsZNLnBT+SCZGQpeCAYt9We/ obhpsQdFj1+DO1Qn9iVXfxqnjcDHqwPSGfLu7nT7mhLzH7ELypYRoatDfsPxqdKU6Y+R IevDFwRsozGSNJlpSol41Z9u9vYAVxZbl4TPYUrYX7RBXmpQISxYrlVymNn+E62mTXrV getML10SfeuyMcbO0zByLQjtazZQksSm2kbuAhLlriuzaJhOukQE4fdaJ3+UlMQ4Pn2H 7SV77mCZKhwCAImZT9zUUc5ybW6coXZTwoPIwCGRnSr3UPiIWLQZ09MwCMFIbLjb6Wgl hGIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OjW53ClT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s5-20020a637705000000b005649a48340esi9849549pgc.797.2023.08.09.13.24.17; Wed, 09 Aug 2023 13:24:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OjW53ClT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230497AbjHIT5n (ORCPT + 99 others); Wed, 9 Aug 2023 15:57:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229639AbjHIT5m (ORCPT ); Wed, 9 Aug 2023 15:57:42 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9856910DC for ; Wed, 9 Aug 2023 12:57:41 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-4fe1c285690so178977e87.3 for ; Wed, 09 Aug 2023 12:57:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691611060; x=1692215860; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=RBodoJrBHAgz/TzgDtibSZ9qk+u2fN1KDY0bxZS/Y3Q=; b=OjW53ClTqhx/xyhNIydqITOGL5K+qYj6dDyIB6iexWUa9VE1g+2Tmq7CAaTl6ykYnT XQc1gvuG4tIxSOQUhn0QHFWOkrVmKTRGz451J35EGRNyM9kRlW7V+N3iqu3MljcQG3+5 TQEwqWvMUKQiw73wwvs7lkAGEWEEMBRzx8vSyRgBFoxYT4kG6KNQtfjZh6TSyNb+CMMi PvKt+ychU6PzxxNdZwbF+nJ8vrkMojrQXTe/mFstpsMne876Rshwy2x2z5fgODeKJdTX n1MTmcPFiMLi++8QbVeWE+ByyU8vxEh4ygB6ObwDdMjcwITLtJ7m8XRB4FV77Zw5Q8JU xVAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691611060; x=1692215860; h=content-transfer-encoding:in-reply-to:autocrypt: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=RBodoJrBHAgz/TzgDtibSZ9qk+u2fN1KDY0bxZS/Y3Q=; b=NVMzVcVuaw7fJ8GWpB/VrqCDPk0nvy/sp7W/Y12fuqjmKW9xtEm3ime1NyvkACgzWT BwP9l7QMUDwLFx/HDvwIrWnAVVnpxDJKGgbeYS8pGZ8e3wDv08T21S4d9h8tnnW38P2w h+Mqo7rUhE1XRPXQVo5BED2zfZLPVHo8vxuWFBSJG+c1YS6nNfxFmeYzs6mIm5BHyq2s u27+4fD2OkkWIE2FlcYko0rRQYE9dNKrdsTYqOM5LOD4f8ZrrUMgK/A451cpFM4rdn0h swkAmdGlym+gv8ynq5ExbYVpBU/BciQ4W2Rq3xEEAOIYba4m+dZvQuELAcY8siEjVcv9 N4vg== X-Gm-Message-State: AOJu0YyDbb2FVyYQRgj2q8eiq2tMyIUdrzUQgbq2cbwSKFOmfaZCz6V8 rO8tKWhVV+rfzuHOIXSi3md6yIB05HXrB9GOhRo= X-Received: by 2002:a19:770f:0:b0:4fb:820a:f87f with SMTP id s15-20020a19770f000000b004fb820af87fmr91778lfc.10.1691611059785; Wed, 09 Aug 2023 12:57:39 -0700 (PDT) Received: from [192.168.1.101] (abxi185.neoplus.adsl.tpnet.pl. [83.9.2.185]) by smtp.gmail.com with ESMTPSA id t12-20020ac243ac000000b004fe0c0235ddsm2445518lfl.143.2023.08.09.12.57.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Aug 2023 12:57:39 -0700 (PDT) Message-ID: <98d0632c-7129-4e3a-aba7-e805e3281f91@linaro.org> Date: Wed, 9 Aug 2023 21:57:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/4] clk: qcom: branch: Add mem ops support for branch2 clocks Content-Language: en-US To: Imran Shaik , Andy Gross , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson Cc: Taniya Das , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Ajit Pandey , Jagadeesh Kona References: <20230808051407.647395-1-quic_imrashai@quicinc.com> <20230808051407.647395-3-quic_imrashai@quicinc.com> From: Konrad Dybcio Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxwbBd9xKP7MICh5YA0DcCjJSOum BB/OmIWU6X+LZW6P88ZmHe+KeyABLMP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o+jTeb4JBgIbFPJCFyng4HwbniWgQJZ1WqaUC nas9J77uICis2WH7N8Bs9jy0wQYezNzqS+FxoNXmDQg2jetX8en4bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: <20230808051407.647395-3-quic_imrashai@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 8.08.2023 07:14, Imran Shaik wrote: > From: Taniya Das > > Clock CBCRs with memories need an update for memory before enable/disable > of the clock. Add support for the mem ops to handle this sequence. > > Signed-off-by: Taniya Das > Signed-off-by: Imran Shaik > --- Could you expand the commit message a bit? What does this clock memory do? [..] > +static int clk_branch2_mem_enable(struct clk_hw *hw) > +{ > + struct clk_branch *br = to_clk_branch(hw); > + u32 val; > + int count = 200; > + > + regmap_update_bits(br->clkr.regmap, br->mem_enable_reg, > + br->mem_enable_ack_bit, br->mem_enable_ack_bit); > + > + regmap_read(br->clkr.regmap, br->mem_ack_reg, &val); > + > + while (count-- > 0) { > + if (val & br->mem_enable_ack_bit) > + return clk_branch2_enable(hw); > + udelay(1); > + regmap_read(br->clkr.regmap, br->mem_ack_reg, &val); > + } readl_poll_timeout? Konrad