Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1937789lql; Wed, 13 Mar 2024 12:23:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWyyabO7a3kPkQMmD4TstJDVFlKPDl2QIhixWJq14l+PSWkC3Ek5AA7M0SM6kUeLpL9muupdEKoGFjN5G+6k3eJyaHLXRhgbMWcfgCecg== X-Google-Smtp-Source: AGHT+IGU+31RkyFtMJV85cehzfcUlkx16Znehd657+4D6fOzD297CegxrJ1tuOU1sKR8NuirHoUt X-Received: by 2002:a05:6a20:d908:b0:1a3:f40:6d32 with SMTP id jd8-20020a056a20d90800b001a30f406d32mr12439439pzb.58.1710357823046; Wed, 13 Mar 2024 12:23:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710357823; cv=pass; d=google.com; s=arc-20160816; b=ZysrC1EmQnORjllM9pztEoab62+G6ujYjHGJtLSdbYYMj8llpKklB5CfGwJHKOBFgp fBiUXjeh3tYdM9MGTWly1ValONtBYgGi7vxaki91QSJzIz2ShXT+7CPG5V0NgZNOyMAw px4VsoRk917dBrRC52NGIqHTKASK6nAoymBpHxHJ73PUmaBK0DRbV/nguDS3M91W9eSr 1pSZTKa4RVqY3JIrXYA9eiXLcITRo6nZwQqcP/MpKe/jYP9YSCyVtsHz3v0Lnr7gDAyB 4GvcMtK8lQfNeDWAQzdZa81NcXGspAEIN1agdRfnoNmbEhUu33pzx69ZySV00KPNcGdX b6QQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=mpGKrpN5paH3ViTi6yUI1nlMAIqOAlZcyfrMBQ8cqQs=; fh=qI9jYQW/ECEbfdqhXE36yw/iXY7xCdUYN8+PWNbZ3Jw=; b=buUKsTXRy4ROwvqk/9Hu325axTYQf4cCvOjjMhgjD9Sek3CHpgrKiCjoULkUXHxDSs KL0qwADwBDiOs+++/TR9XLONfMNX8dN2h9HNP7W87ZyIc+QoJCFU8dh3q6LkmQngLCub DcaTghaSuBa970ejkXl5KcrL+FtRuE8DoSoPMN2DW+QBE4kVpA1Q/3jbIdYPLS8WD/hM ey1XXFa8hZQ1TiSf3rRu4j7Oev35qAZko5FElmwMUhF/revZZP6D+m9eZ0wi8tX2W4M2 RYwT8yfzOAhq0jGoevfMcVd8Yy56pmK2pN1lWvK+onXG4pmr5y11gK48XJqkqgYeIK3U c0Fw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jNSWUOYi; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-102379-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102379-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id c22-20020a056a000ad600b006e613ec716dsi9863498pfl.143.2024.03.13.12.23.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 12:23:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102379-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jNSWUOYi; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-102379-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102379-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DFB3E2847C7 for ; Wed, 13 Mar 2024 19:15:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CC353768ED; Wed, 13 Mar 2024 18:43:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="jNSWUOYi" Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4912564CC9 for ; Wed, 13 Mar 2024 18:43:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710355437; cv=none; b=uI5KbVtnxquCBVXJoG1GFAm2L6se/jBlVecUQciyX+6RPWePbXD4qBw+94gIIXcpCATgF3bvI/OH8GDjGLI55SJiQl4+uV0jbwqm3byJquqSj4nTLyvfNUAaOMJz3tAQolxNvmAnqloS7w+gM8ial26ECq6MHl/xSiXLa4xHUYs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710355437; c=relaxed/simple; bh=z9AlYfbAmUtA6z5P5Kohp0YliNTO6BPzS029YOmLjwY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=TR2ZOFq5S2Rsq0+p+PECf2WXX0FDWMfBd+zOS6vDVr74UEyVL/RL1KneIzbhU4zw1NTa743Qpf9igIzXB7OgapnoApGH90FnANC0HMay5GTFuSw+RRZtXLSx6gvuZ0xEkv4ihLa2HUkJMPWY2bVTq3VE1nwQjywJ51vWKvvcyV8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=jNSWUOYi; arc=none smtp.client-ip=209.85.208.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2d29111272eso1870361fa.0 for ; Wed, 13 Mar 2024 11:43:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710355433; x=1710960233; 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=mpGKrpN5paH3ViTi6yUI1nlMAIqOAlZcyfrMBQ8cqQs=; b=jNSWUOYivQSjL5jGWQoeEkMVBVv5qpvJ4s31Gog0wU01TvaoRgbh909UvL2LxxVLJH e6kds7jnZpR/NMkskBHMAgYVl4244OU1F1QtCW9qT5VtU6DkKMjSVofxOiAe5XKxsdUy Jw9pikBT/WwzrQDVcFIf8djIgcsAuE/A5kL0IehAeu1xR9tWGxtOibrwdpmUMw9HtKJO GsJuT+KjuB+JiH6WrcoO2eJS8O5ovxt0estmAbo/sFXCtDGCKi9lWrP+FfKBiSz0yMpD /yeDwaES3sAYcIQSo0TVzMN0c4Q68GhPAzC7Ua+bZHg7O+ntI+dcLv5rAxMJ2R9fj3yo 1c/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710355433; x=1710960233; 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=mpGKrpN5paH3ViTi6yUI1nlMAIqOAlZcyfrMBQ8cqQs=; b=uXt4fzmobKiK859bM/bMpJ1MNPugxxV9A/wrb4VihMQcUGCjayQOkHzaGxYQqS9lQd dkccSZV6TahMaiKOKHnyhOA/THp7mU6n4qfJEPZKI/g+w0Q854UU5COSupfMY7Rr4yfi jQVkRZfCkR8201ElFVKD46WVXfPduvpKBdoF4ipcWk4M8xZE/LVkodj0O6Avv3Rkl7Od vh8ooi8piJkvRcnyf0lBFZ8F53y1OxVfnVdYdgb1TYLC4E5FkU7EEOmky3tEd3hQuf1b bCWSLPzZLD25e0DyGavgOZvwnQ+GPNwMDm/nXFY2kxqGXsUOCM6UTHvSLOczNlKCpcL/ TjmA== X-Forwarded-Encrypted: i=1; AJvYcCUPju7pr2rP10MCmVvnb3eLUnH/gi79ReQo7tqlgDqD1XtcwOriXsB/kavccH68dp9MI8r4UhsdVP8rMEeizcCNy/yl1UdTXnl0BqwS X-Gm-Message-State: AOJu0YwJ/RZOVTW/jL9HTWo7asgqHLeYAPk8S4dTOpwbdVj/BIn+fRnQ CxGP21rzk41+Hl9qQbtbCWpLzup50ebQt8NVCQQiQEfyMK4q9TVoki9I5SDCOPo= X-Received: by 2002:a2e:9612:0:b0:2d4:4bec:3c1b with SMTP id v18-20020a2e9612000000b002d44bec3c1bmr3850662ljh.32.1710355433457; Wed, 13 Mar 2024 11:43:53 -0700 (PDT) Received: from [172.30.205.0] (UNUSED.212-182-62-129.lubman.net.pl. [212.182.62.129]) by smtp.gmail.com with ESMTPSA id v3-20020a2e9603000000b002d21f1f1e82sm2210621ljh.3.2024.03.13.11.43.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Mar 2024 11:43:53 -0700 (PDT) Message-ID: Date: Wed, 13 Mar 2024 19:43:49 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/5] clk: qcom: clk-alpha-pll: Add support for Regera PLL ops Content-Language: en-US To: "Satya Priya Kakitapalli (Temp)" , Bjorn Andersson , Michael Turquette , Stephen Boyd , Abhishek Sahu , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Stephen Boyd , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Ajit Pandey , Imran Shaik , Taniya Das , Jagadeesh Kona References: <20240229-camcc-support-sm8150-v1-0-8c28c6c87990@quicinc.com> <20240229-camcc-support-sm8150-v1-2-8c28c6c87990@quicinc.com> <630bb10a-2197-4573-a6d5-01fa6650c315@linaro.org> <1e353c1a-e267-14d0-fdf4-36aea9062ed3@quicinc.com> From: Konrad Dybcio In-Reply-To: <1e353c1a-e267-14d0-fdf4-36aea9062ed3@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 3/8/24 09:26, Satya Priya Kakitapalli (Temp) wrote: > > On 3/2/2024 5:26 AM, Konrad Dybcio wrote: >> On 29.02.2024 06:38, Satya Priya Kakitapalli wrote: >>> From: Taniya Das >>> >>> Regera PLL ops are required to control the Regera PLL from clock >>> controller drivers, thus add support for the same. >>> >>> Signed-off-by: Taniya Das >>> Signed-off-by: Satya Priya Kakitapalli >>> --- >> [...] >> >> >>> +static int clk_regera_pll_enable(struct clk_hw *hw) >> This function is 1:1 clk_zonda_pll_enable() logic-wise, except for >> the `if (val & ZONDA_STAY_IN_CFA)` part. Would it be an issue on >> Regera? > > > Yes, that is only applicable for Zonda PLL, hence we cannot re-use the same code for Regera. > > >>> +static void clk_regera_pll_disable(struct clk_hw *hw) >> This again is clk_zonda_pll_disable(), except the very last value written >> to PLL_OPMODE is different. Could you commonize them? >> > > This difference is there between Zonda and regera PLLs as per the HW recommendation, hence we cannot re-use this. Yes you can, just make the function accept an argument and consume it, where things differ, so that we won't duplicate the same 80 or so lines for no reason Konrad