Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10838883ybi; Thu, 25 Jul 2019 06:00:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqwEri0QOiMEgVbsGQsXVUkhSf1FdPuWffuNeh7bGRgj3T19UM2l5nWSx6MQAXq6ovFbtbDI X-Received: by 2002:a6b:1ca:: with SMTP id 193mr85193587iob.264.1564059640686; Thu, 25 Jul 2019 06:00:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564059640; cv=none; d=google.com; s=arc-20160816; b=XvDMoiIhLzWPQDwuQBEepZ8X83dmlU5LH4t7Nrsx7fMtxBDLD1wrQzk3viQCNR0Bgm 0p8JWc8p8/6P++HqLRb23qb3xq95kdFRDF54b5SoSLQgEQjl/bhF5T1L53JEB7GvF6cL mClsf5EQj9oe7/TWU+qplzGFARxhWBtRMbAxiPeupkt8M1lKI6qItL9SZnkBq2e8Z1GU 3rXHO13SjRQ9cN305CMhX5kMGVXPBPxt3twoWU+iri+1P2asVQTDEyJeHooMIu/3sfTo KxpXISuLkptISMhP9TnVEtepLBnSrSaMZL87Svex5r3nRE6fWqGnh6suF7V55eB72oXv IxYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=oPcjP0l90Xlbid52BTLH5HFuWayYMYluv+P4cZpz0BE=; b=YfgIQPgKsBwWmVIJ8ct5cZvhGSE3se9MuccxYDsjw7gt1dOVPpMsatHgVFzPImWsb2 0HDIYravJIPwJGjB3185XpBEpOEHFVoPEkuM2z+yjgnrbHyOdf6I69zVDTQKe4zBpvrR 3bble5BS0T5fLF3kKoNa4JLDDDPnENB9T8jxkj+NQEeWWqAOhwWVcH7u2T+d/GfwOd/x Wux1evebjwPGRtbDDVKoHaZMMBNfyv2vqpukxZuiGmWdoAPqF7SkONjqeDX5HVbpLT4b dMeGfP8VCMo50bt9IcZWEcFpCc4hFU8A0TOWuY4i+Uw5Ppnv1CtG3tjGJeo3e7hNrAtV BkmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=KT2ejeym; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j11si62013038iok.32.2019.07.25.06.00.27; Thu, 25 Jul 2019 06:00:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=KT2ejeym; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390700AbfGYJl3 (ORCPT + 99 others); Thu, 25 Jul 2019 05:41:29 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:16225 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387533AbfGYJl3 (ORCPT ); Thu, 25 Jul 2019 05:41:29 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 25 Jul 2019 02:41:25 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Thu, 25 Jul 2019 02:41:28 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Thu, 25 Jul 2019 02:41:28 -0700 Received: from tbergstrom-lnx.Nvidia.com (172.20.13.39) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 25 Jul 2019 09:41:27 +0000 Received: by tbergstrom-lnx.Nvidia.com (Postfix, from userid 1000) id 981E64286D; Thu, 25 Jul 2019 12:41:25 +0300 (EEST) Date: Thu, 25 Jul 2019 12:41:25 +0300 From: Peter De Schrijver To: Jon Hunter CC: Dmitry Osipenko , Thierry Reding , , Subject: Re: [PATCH v1] soc/tegra: pmc: Query PCLK clock rate at probe time Message-ID: <20190725094125.GL12715@pdeschrijver-desktop.Nvidia.com> References: <20190707230843.11224-1-digetx@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-NVConfidentiality: public User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [172.20.13.39] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1564047685; bh=oPcjP0l90Xlbid52BTLH5HFuWayYMYluv+P4cZpz0BE=; h=X-PGP-Universal:Date:From:To:CC:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To: X-NVConfidentiality:User-Agent:X-Originating-IP:X-ClientProxiedBy; b=KT2ejeymvAUJefXKG+dCSv+tBemWustPybrYzvGkDRajoTPPzmtzjuQ6sinuPBhhw DrLfZ0M6Zl153mj3bu86R/oBeJ9sGBQJrCmJkHth/kZ6vXgjVD8h7efkZzoIvGfpP3 Ng9tiKLuAGwZW0N4oBapHnWOtttLqwN2ZoD2q8/pgstBxfTAAPG/Qo6OR4OmyEETlD 78xenL+GCaKbFWHAgObka/fYDc2/lDBZQ8R/R44UFoV1wG/mXGwImqRg3sYn0MhfI/ FPUIOWzdvsgYLvZ7jNle/uO2t3GYg4/uda0Y2eUcYcTAyihpSOrCzUNKqLCUtMjUmf mp7LC7+DPmHIQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 18, 2019 at 10:45:31AM +0100, Jon Hunter wrote: > > On 08/07/2019 00:08, Dmitry Osipenko wrote: > > The PCLK clock is running off SCLK, which is a critical clock that is > > very unlikely to randomly change its rate. It's also a bit clumsy (and > > apparently incorrect) to query the clock's rate with interrupts being > > disabled because clk_get_rate() takes a mutex and that's the case during > > suspend/cpuidle entering. Lastly, it's better to always fully reprogram > > PMC state because it's not obvious whether it could be changed after SC7. > > I agree with the first part, but I would drop the last sentence because > I see no evidence of this. Maybe Peter can confirm. > SCLK and PCLK certainly can change rate at runtime, although the changes for this haven't made it upstream yet. It's indeed not very obvious, but certainly doable. Peter.