Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp132888lqo; Tue, 7 May 2024 14:52:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU8/omEJZYva08EECaAStxhPXWc48sjjDEvXNfODPDfkNArdPS0vCvHHZa+SRqZU2CbKHrhCNXQjshRnCd8C5ot/z6FiD31FwIJrvdX0w== X-Google-Smtp-Source: AGHT+IHlcbPDj+EtUrm6wFJ1xnK3ANvFtOmgnCTCrOPv3pW83SpquFPsGcQ2F+I6/mPETvQJ6H0c X-Received: by 2002:a17:906:54c7:b0:a59:9edf:14b6 with SMTP id a640c23a62f3a-a59fb9699ccmr42673666b.45.1715118744729; Tue, 07 May 2024 14:52:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715118744; cv=pass; d=google.com; s=arc-20160816; b=CzGIy6i8BkRp63WzJbW4zg41A1j4po/GHD1GR0sGCXKq5h24cHUwFnXNNDMGBUVPJ6 9w+0q+B7bkz/88hFsP5EMCSBN27vlmj10dcMt+G8xf5jxkWWi6YdMgmMm/WTSFNA5dVj eoLcBcihQ1WWUwwQs98JV6xAh28IWN/c55YVz1+RdeCtq8fxN2064h8vfxqPeGcxkEVr ueGXTsXwm4p5aZhniHH04QMgM7tCtW0qKwWuOSZY1MlcFnF3bcrIHYXroeXAl0DLgdrg sfcUnqvQ1hMl5ojpatJPTIPXdrqihuAf9sgSZXCTXd1LbZOvG2XZMWKY2sJwOCL5Lxn3 4emg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:date:to:cc:from:subject:references:in-reply-to :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:dkim-signature; bh=ZB0OirmO5+qbIJHMAzYJ+BA7KaNSv/rlghV8EAD7lmA=; fh=81r5zU75yX0J+43QIXJZTD57FRWNx/n+gGLUNxxIaqw=; b=PkzLv9jklfw0/r5qOCji5Jr/uRPxXJMM/n0LVwbmD5aoWEX1uuJOS1K8BODIArzjSI piP0r9ddkOc+dFk9MYrP4WUtLb48ohnLrqZToFwthOUxucwnpHlKvEA0pK5euPpMlsNu sC7YfiZLcSP8cCOOomxAWamzoouFb+Dw3ZxKrhjooCOIEdGh65VoohqITruxcZSRoUIz G0Sn7bbDuu3fAEC7vOZ1OKf74K63i5ykJUw9LVdwesMlf4oJAFUTJCWenbc85iZhPnLK UXVDjumzbZJzyq6b6xbXGkWmKiua7FdCtkenyfpfgzmaNSy73QON7TyoBVxV+zv+tGdQ KUuA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lrv5QkKW; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-172231-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172231-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lg21-20020a170906f89500b00a59a006e49esi4829316ejb.89.2024.05.07.14.52.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 14:52:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172231-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lrv5QkKW; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-172231-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172231-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 0C4C11F22C79 for ; Tue, 7 May 2024 21:52:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DEFB714B966; Tue, 7 May 2024 21:52:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lrv5QkKW" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 08EF671B5C; Tue, 7 May 2024 21:52:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715118731; cv=none; b=NintjaIYUNtPikyWY3ZjWeiItYBjAjBzefLb715EaGkkDs/b4yR7Z3jp4AMR51zi1GM/ogjxGH7ln0QX0rluSxqXPX0YiUixZl19LwnSAok8ZdTSdvRsY9pGluMkw+Vnet257bRKAglrOXxnnrhEI070gYFW5e4w85+J+FJBaTY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715118731; c=relaxed/simple; bh=DdIfWiVoX4WJikGmrYhiK9jfHI2XGJOD/rjGsuFWyHk=; h=Message-ID:Content-Type:MIME-Version:In-Reply-To:References: Subject:From:Cc:To:Date; b=YfjB63MEedUVkYBEltsIQpV0FWVaw0E97LYjX8fJlYpm99f+U5MGwSDeyqN0VRAdFNSH+FQvQPiuG9Vn6hxvs1l3Ccyk/clqVdpgvzu56bqGQGkRaQgc5U7Jc1ZD8JmRsvBIZUWmt5vsVZ4GSwkuRPtRcRfLm4ETwNirZjoN3i0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lrv5QkKW; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67580C2BBFC; Tue, 7 May 2024 21:52:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715118729; bh=DdIfWiVoX4WJikGmrYhiK9jfHI2XGJOD/rjGsuFWyHk=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=lrv5QkKWbIh/dkdhC2UOxgdtXuRWXRpQUShbolM8ov4AmoYK7wSPa36uaNkS2SWSk mdVvLcBd7yoB8G6G7e6Fk4Yg4frrla2Ygye0JB+AauUqwpNhC0shgwuU6/Quewvxl7 lzf729tCzGjQdUJkLDTIsRxT6GsrVdmZajMpSVzuJuletv+q/QiteKKDoDvVYHmgez mwlTZkIzjaZOEIr9+3+u1eTuCdP4BSBdux3L1YQoMp1KU/3t2wlMzX+oplUzUew6bz Xf+1VezXbMcoYlp8NIqspXHWSLu/oj5hNWaoZpaN6mUtliKLOrqrQjkj0AGava7TFr pXb5JrG/9I2fA== Message-ID: <9440dd954294db7c02a11a1807d75ad9.sboyd@kernel.org> Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: 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> Subject: Re: [PATCH] clk: qcom: gcc-sm8450: set OPS_PARENT_ENABLE on gcc_sdcc2_apps_clk_src From: Stephen Boyd Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Dmitry Baryshkov To: Bjorn Andersson , Konrad Dybcio , Michael Turquette , Vinod Koul Date: Tue, 07 May 2024 14:52:07 -0700 User-Agent: alot/0.10 Quoting Konrad Dybcio (2024-05-07 14:17:01) >=20 >=20 > On 5/7/24 22:28, Stephen Boyd wrote: > >> > >=20 > > 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? >=20 > I already reset-ed the tree state, but I added something like >=20 > if (rcg->cmd_rcgr =3D=3D the one in the declaration) > pr_err("gcc_sdcc2_apps_clk_src is %s\n", clk_is_enabled(hw) ? "EN= ABLED" : "DISABLED"); >=20 > to drivers/clk/qcom/clk-rcg2.c : __clk_rcg2_set_rate() >=20 >=20 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.