Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1371374lqt; Fri, 7 Jun 2024 17:10:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUwIn9NtpN1QhNwVaJdazBvlI+jh5OoIkxEsyheiDvL0LMcB00WE5jESzrkUChA21j8reItI+F2ZCogL91W2otmW54LPa7zG6ye3J3nNA== X-Google-Smtp-Source: AGHT+IFTTV+WPPpCkUNTPD/8zCjaV8p0da/SW2l+XBFIbxNx7BFEsQ2n/WTxdKjpC2tnE9Hgxo0I X-Received: by 2002:a05:6a00:3d16:b0:702:315c:b1d6 with SMTP id d2e1a72fcca58-7040c61c19cmr4039102b3a.1.1717805440181; Fri, 07 Jun 2024 17:10:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717805440; cv=pass; d=google.com; s=arc-20160816; b=ZLD2zEQyFg9HdlTzfaKxcHZGSQAtN5dDuE5zmaKFc5kdz4qXjx/Z/lvQXnHcAN7Iv+ OVCUNh//+AKK5CiyqPNquHjyUR4zqB64QROXVWbT0Dmpijug1SHYQb3N3pKNNBMsBu1S ZYTTD6+IKz4zwrf/w5CGnkyy3sqNNxk+DhtHw3na+TcuY/4DeywuqCxknC2sUqbwyOqW KS9grZuUdGGTYMrVhc5tfD+4VLKcCcMFzfhBCR+cOiA54jQno1gFrmmv9rG8IJ/6BrYV 3+AwA5yzixbw80d4J4A7XPR5KRJXPge5foz6ih+P0Clv3dN/L3lRKtCDwPp2dpQMVXsL 5CMg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=ecYbGPjfLKyLt3DQ3SIRGpflUimkoU9cxy6SCcr4fJc=; fh=veyoXiWhn66zvUv20SZO32xiDf6YcZ7mzV6o4qR3tcc=; b=zLb6WBAL+vTWOELpKPaBGxHUBe1rNxhyfsghwtYMJdwswQ8IXF9wnt8Bxc4Skwa/3D tgs05AnNhKxzjMa3e62JRnW44GJNDjPRiSkPpuzCGWOiS5jybFgwglARr+Ca07uOOxtU fPM7H+E6y0q6+5syJ8m7BBaAiLySc3uXore6nD2sVfs0gGmtb/lEE7Yje+uBMpOXNOvc lr8jCNEbR5jblQGKwlOAu39G54Ay/1LTXtFQNdcQYwQcoCG3TD1cBeiV43FTMaICtVYA xUyg5Y8+RKoNdY4VVKKAnVHGcE/sIBvcxkqfdEHpfyE08LBM4YlhnNB7wpwlv2Rbsatj kpuA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NYgzyN7g; 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-206851-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206851-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 41be03b00d2f7-6de2197214fsi2280161a12.211.2024.06.07.17.10.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 17:10:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206851-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=NYgzyN7g; 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-206851-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206851-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 8D04E2852D2 for ; Sat, 8 Jun 2024 00:10:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D717923A9; Sat, 8 Jun 2024 00:10:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="NYgzyN7g" Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (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 693CAED9 for ; Sat, 8 Jun 2024 00:10:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717805435; cv=none; b=ioBiAoGDTvxpLeLn2UxJjcF15iPAWlHUowXb4sAGxchKaqB4zHdsteabnZye3d8X+UeUkEpDphsubeqZSf3FzDlqohhd3L0F6KBn2GdmQFHrGbtZd5zpnQ+F1QklFsoNKdwRMKcrMd54+PhtJ8EnQCty7jDr+pNglBWJu76a9fo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717805435; c=relaxed/simple; bh=3Z0zbhdACaOweT0p4Zo9vqZ/2iKMThY/VCjBhXk2B98=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=KdRPViD0fEtTFOAtK+ZC+Tiz88Y35D2j6ieTeiUB8M0x8P18EEo7p2oFzjSmPn7fxpvEoqppeveSY3UBaqdCENr3cSHXE1lraAqC3T+8YnmNcQzzuOVXa3+Q5IWlKU+uuGGnpH6A2Uww79S91eFNm+V1ysATHrc19Y4rfX5l4+Q= 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=NYgzyN7g; arc=none smtp.client-ip=209.85.218.52 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-ej1-f52.google.com with SMTP id a640c23a62f3a-a68c5524086so309625766b.3 for ; Fri, 07 Jun 2024 17:10:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717805429; x=1718410229; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=ecYbGPjfLKyLt3DQ3SIRGpflUimkoU9cxy6SCcr4fJc=; b=NYgzyN7gQwaHHOnT33RYm7H51KHPHEEyCb495wDg7e/+F/eaU8fwiA/e0b7XNljIFz HTpCaTAX74ZX+Jgxr8fr01JMhoApgcc8alS9xeAmHDcNcZcCB5yQPr9VbmlDUtUydBvt nPjO2QnwSfCSyz61so+vYO0QBawY4QP2n9gUzIWveRRhpmUv5pbwwTcoVS/78LRvWiaa NRbyuY5UtNoy+cEjp4tgkQgqgXiIVp5O76B9rf6OOQqN2p6MTvKBUEaGnNkFsZU3Fcac 1vOtHR5sLJbTzqKv6/8Bob9zwR1H2m8ldJ9q1r3BeoBFtTxcVQJCdxGqEmnNNumC9dMs tqBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717805429; x=1718410229; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ecYbGPjfLKyLt3DQ3SIRGpflUimkoU9cxy6SCcr4fJc=; b=wM2DP5mli1E2B4mK2L6ygN8aBzr7bT3L4yUIzIXttOn+0NO+sdsmtwSbjORl25CHd2 pY48djqsEvK+vZMST+Lpft/ds+EbO7e1ewtUEHyL6r4LuOneD6kGwSy2dtAWRFxrLsNV tz6V1Oqsiu1HmmHlNNiq+xaOw9oR0GJJ3GIX110ldA/PKWjSKwMauu3we7M7hVmc74TA t2GRUMrpBGUvUWM9SW2B+1O2J66OmlNRtzeqbqAV7BplTaiYZhyuC8Klou51XWNiCLb5 1fglolnAnnVUMVHGm5dV4jDvSpODT5QvTHrVfsuAV5AEw664C2i19Vtp9NhUC3vJp6gZ 3CBw== X-Forwarded-Encrypted: i=1; AJvYcCUDuJ1Qm83agcaUt48w+uS2TWsDQ4u97FfnngwJv7VZm23JCPmXik02NognEJTSa/7QsBVcaSJwO8xMvYAFLdsG9LNGS2UlXIp6QZc/ X-Gm-Message-State: AOJu0YwfFxsfo4RBGLb6VwX/jio0IyuU7US+n5LK81Ezg0bj62M83p9B OayjB9YMepFMHNTbUSTQZ4Y07H7FwZXto3mivTd22QH61KMInPv78hYSXhZElgHdjiUieiljFzn lXpw= X-Received: by 2002:a17:906:e949:b0:a62:2eca:4f12 with SMTP id a640c23a62f3a-a6cdb203fc6mr247661566b.59.1717805428632; Fri, 07 Jun 2024 17:10:28 -0700 (PDT) Received: from [192.168.128.139] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6c806eaa41sm312424766b.115.2024.06.07.17.10.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Jun 2024 17:10:27 -0700 (PDT) Message-ID: Date: Sat, 8 Jun 2024 02:10:25 +0200 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] clk: qcom: gcc-sm8450: set OPS_PARENT_ENABLE on gcc_sdcc2_apps_clk_src From: Konrad Dybcio To: Stephen Boyd , Bjorn Andersson , Michael Turquette , Vinod Koul Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Dmitry Baryshkov References: <20240427-topic-8450sdc2-v1-1-631cbb59e0e5@linaro.org> <2337ba58adb3fb127710bead9b8665a9.sboyd@kernel.org> <11bd7146-30cd-4b71-b2ca-d76875763731@linaro.org> <6ba2967c6c9d24e3f1c9b76496176010.sboyd@kernel.org> <3a3c4279-a254-48d0-91ad-70b7f1e3eb77@linaro.org> <7baef7a173dc4d1ecf8b0dafde565b1a.sboyd@kernel.org> <9440dd954294db7c02a11a1807d75ad9.sboyd@kernel.org> <93eb11e7-21d7-4d3b-b033-b66898ea7874@linaro.org> Content-Language: en-US Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxwbBd9xKP7MICh5YA0DcCjJSOum BB/OmIWU6X+LZW6P88ZmHe+KeyABLMP5s1tJNK1j4ntT7mECcWZDzafPWF4F6m4WJOG27kTJ HGWdmtO+RvadOVi6CoUDqALsmfS3MUG5Pj2Ne9+0jRg4hEnB92AyF9rW2G3qisFcwPgvatt7 TXD5E38mLyOPOUyXNj9XpDbt1hNwKQfiidmPh5e7VNAWRnW1iCMMoKqzM1Anzq7e5Afyeifz zRcQPLaqrPjnKqZGL2BKQSZDh6NkI5ZLRhhHQf61fkWcUpTp1oDC6jWVfT7hwRVIQLrrNj9G MpPzrlN4YuAqKeIer1FMt8cq64ifgTzxHzXsM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ad2u6UPQAkZ4oj++iIGrJkt5 Lkn2XgB+IW8ESflz6nDY3b5KQRF8Z6XLP0+IEdLOOARkOW7yEgorBgEEAZdVAQUBAQdAwmUx xrbSCx2ksDxz7rFFGX1KmTkdRtcgC6F3NfuNYkYDAQgHwsF2BBgBCAAgFiEEU24if9oCL2zd AAQVR4cBcg5dfFgFAmQ5bvICGwwACgkQR4cBcg5dfFju1Q//Xta1ShwL0MLSC1KL1lXGXeRM 8arzfyiB5wJ9tb9U/nZvhhdfilEDLe0jKJY0RJErbdRHsalwQCrtq/1ewQpMpsRxXzAjgfRN jc4tgxRWmI+aVTzSRpywNahzZBT695hMz81cVZJoZzaV0KaMTlSnBkrviPz1nIGHYCHJxF9r cIu0GSIyUjZ/7xslxdvjpLth16H27JCWDzDqIQMtg61063gNyEyWgt1qRSaK14JIH/DoYRfn jfFQSC8bffFjat7BQGFz4ZpRavkMUFuDirn5Tf28oc5ebe2cIHp4/kajTx/7JOxWZ80U70mA cBgEeYSrYYnX+UJsSxpzLc/0sT1eRJDEhI4XIQM4ClIzpsCIN5HnVF76UQXh3a9zpwh3dk8i bhN/URmCOTH+LHNJYN/MxY8wuukq877DWB7k86pBs5IDLAXmW8v3gIDWyIcgYqb2v8QO2Mqx YMqL7UZxVLul4/JbllsQB8F/fNI8AfttmAQL9cwo6C8yDTXKdho920W4WUR9k8NT/OBqWSyk bGqMHex48FVZhexNPYOd58EY9/7mL5u0sJmo+jTeb4JBgIbFPJCFyng4HwbniWgQJZ1WqaUC nas9J77uICis2WH7N8Bs9jy0wQYezNzqS+FxoNXmDQg2jetX8en4bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: <93eb11e7-21d7-4d3b-b033-b66898ea7874@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 6.06.2024 1:56 PM, Konrad Dybcio wrote: > On 7.05.2024 11:52 PM, Stephen Boyd wrote: >> Quoting Konrad Dybcio (2024-05-07 14:17:01) >>> >>> >>> On 5/7/24 22:28, Stephen Boyd wrote: >>>>> >>>> >>>> Can you share your patch that prints the message? What bit are you >>>> checking in the hardware to determine if the RCG is enabled? Do you also >>>> print the enable count in software? >>> >>> I already reset-ed the tree state, but I added something like >>> >>> if (rcg->cmd_rcgr == the one in the declaration) >>> pr_err("gcc_sdcc2_apps_clk_src is %s\n", clk_is_enabled(hw) ? "ENABLED" : "DISABLED"); >>> >>> to drivers/clk/qcom/clk-rcg2.c : __clk_rcg2_set_rate() >>> >>> >> >> Ok. You're reading the software state because there isn't an is_enabled >> clk_op for RCGs. Can you also read the CMD register (0x0 offset from >> base) and check for CMD_ROOT_EN (bit 1) being set? That's what I mean >> when I'm talking about the RCG being enabled in hardware. Similarly, >> read CMD_ROOT_OFF (bit 31) to see if some child branch of the RCG is >> enabled at this time. > > [ 3.998362] gcc_sdcc2_apps_clk_src is SW-DISABLED, CMD_ROOT_EN=0 CMD_ROOT_OFF=1 > [ 3.999896] scsi host0: ufshcd > [ 4.006712] ------------[ cut here ]------------ > [ 4.013751] gcc_sdcc2_apps_clk_src: rcg didn't update its configuration. > > [...] > > [ 4.288626] gcc_sdcc2_apps_clk_src is SW-ENABLED, CMD_ROOT_EN=0 CMD_ROOT_OFF=0 > Err.. one more thing.. After removing the HW_CTL logic that I introduced in Commit a0e0ec7424c9 ("clk: qcom: rcg2: Make hw_clk_ctrl toggleable"), this warn goes away.. I suppose I was already asked whether it's actually necessary to drop it, and IIRC I shoved it in with my GPU enablement.. I'll retest whether it's actually necessary, but I don't think so. Still, doesn't explain why we needed this flag on so many other SoCs where HW_CTL was left unset Konrad