Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp256816ybl; Wed, 11 Dec 2019 17:44:42 -0800 (PST) X-Google-Smtp-Source: APXvYqwFx+tIanFTxiA6XfoKxwdFxjNkRZLe7hDSBxKY1wBs/ICVApPqSSkt821Uy2Yk9yyOj/Hu X-Received: by 2002:a05:6830:12c1:: with SMTP id a1mr4760102otq.357.1576115082066; Wed, 11 Dec 2019 17:44:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576115082; cv=none; d=google.com; s=arc-20160816; b=Qat2cAl4zNnVb2xXAP3cbg/5vVsp4h2fFjASUKEJfUXnQRWUVkW68sh9sgRge0mNTQ xEPHoRZfE4t0+Nywek5pP3wmupqXeBzyqyuCoR+jrc0wsd8zY+TZgTjM2nkQYh5WqKWH ETZPLGqF91EB9TZJSUk55CIMRTWd6qwybrMdYIV2Cl/D6wLkYM+gxn2pw2ugyx12yh/1 U8ENpTnVi9gIC4YOXNZZWqUF3UgnB0BZQqJsrcR8EBf8oj489Is8RNFrm8eguAU7/FjW TM76dY5JpRhEsaS+c0lBD6+N8AqHw80HcCPMJPwAWd5fdMjwn6nIyv2nyW7EihzUtvKf M4qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=k3MT7+L3kNReQ0aWj6ky2KsiTx1YfA3d7iiuzNpuvhM=; b=YuMH9+tL3oJOkNuA1/muqOU99T2hPth2MUOB5YWgidoOxL32BnV2k+pKw5YC2b02+e tYv52As3+uZD8xvt28kg3kI/zJCLTDv+G3ZDn1ewgenJZ5QORb16kjtSdrJXmmK0uoE/ DndW/j7MB5qDmk2oth8zTVIhel/cRrpFWVrWX8TLJWAgEYvV4NhX6X17JXg8rHnaigB3 k8YO9oUvY/fMNR8/UjEUsw15f7/nsEdIR9nIhDpqc/Uc/ucnbE3flogv2EVgX/yT/b3r JFLfj/NMxzM7XtKnO50kAHpuH21VldAdD3mcc8anVT0pnnlXY81ApBw7ARrjv60IPUMz +QVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Ulz7/dF+"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e192si2373821oib.82.2019.12.11.17.44.30; Wed, 11 Dec 2019 17:44:42 -0800 (PST) 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=@gmail.com header.s=20161025 header.b="Ulz7/dF+"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727629AbfLLBn5 (ORCPT + 99 others); Wed, 11 Dec 2019 20:43:57 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:38950 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727509AbfLLBn5 (ORCPT ); Wed, 11 Dec 2019 20:43:57 -0500 Received: by mail-lf1-f66.google.com with SMTP id y1so372656lfb.6; Wed, 11 Dec 2019 17:43:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=k3MT7+L3kNReQ0aWj6ky2KsiTx1YfA3d7iiuzNpuvhM=; b=Ulz7/dF+kPJTSCqiGltQdo8sS30X4xoZfoyGQsNApxOE66T6t3UCN8p/TfQqzO7qIZ HWe/sNp2OzuTk3l+8gt3Arx2UpV/BGQmlswxT7spwdqu3zrkTxSpJYvphoZEZxmyIxop LaDSPwDjiveJJBVrVJPTbv36fxKUrO93aCoD4t3zk2ohI5ja5Pof0Fp0q7lcJGNNFyA8 m2RbiNhh3jGnlgHqh9uD5MnEe00FJ1NKOHfZYqjK43UaGSqoQHv9htySiVVCVDYacxDX r+fdQBd6Ra6aNPeK73GIeT9VGPANBF1/Dtd1hOiekU6ZE2rewxuEK9ungY4D2QtbaSY/ a65g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=k3MT7+L3kNReQ0aWj6ky2KsiTx1YfA3d7iiuzNpuvhM=; b=LiYExBzxUgbA5dw4dJQ8G5Atzb+zuVxOHHxVBk9Cacr8rWEYVLSo+2bKmKLriqKMSq 9nNuGTaPc7dv2O3nNZeOx6Mj+NESJGUeHB6HmuFgs7bi6nG+2BJmn2GbaeTyj+zFEf9B uXR9AeM90QXpwnbJ49XxgQYJTIEJiv6ohi2CEthsyKj2j2Wg4vNtKZJJycqKA3+aQ3J8 YBW0/Z1ej14EVJOibshC/0YCczWsSLOkRL/ax5mrS6sNPwp0hICBfCBbRYUUT1+uheUs 1+OViGsu7O0gvh5ZLqBj+VneBx6vU4xxS+I8Fu25cA3npE26/J6X8NutcXk4tYIpAUnA mqnQ== X-Gm-Message-State: APjAAAXtEcoqvgdgjW+OIerjwFn1BQhqAILrYPH/mIi++LEB+yXLiCNm YpLqtnXQzYNYG/ylP6J+6H0= X-Received: by 2002:ac2:4436:: with SMTP id w22mr4140344lfl.185.1576115035025; Wed, 11 Dec 2019 17:43:55 -0800 (PST) Received: from [192.168.2.145] (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.googlemail.com with ESMTPSA id i4sm2327370lji.0.2019.12.11.17.43.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Dec 2019 17:43:54 -0800 (PST) Subject: Re: [PATCH v3 03/15] soc: tegra: Add Tegra PMC clock registrations into PMC driver To: Peter De Schrijver Cc: Sowjanya Komatineni , thierry.reding@gmail.com, jonathanh@nvidia.com, mperttunen@nvidia.com, sboyd@kernel.org, gregkh@linuxfoundation.org, tglx@linutronix.de, robh+dt@kernel.org, mark.rutland@arm.com, allison@lohutok.net, pgaikwad@nvidia.com, mturquette@baylibre.com, horms+renesas@verge.net.au, Jisheng.Zhang@synaptics.com, krzk@kernel.org, arnd@arndb.de, spujar@nvidia.com, josephl@nvidia.com, vidyas@nvidia.com, daniel.lezcano@linaro.org, mmaddireddy@nvidia.com, markz@nvidia.com, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alexios.zavras@intel.com, alsa-devel@alsa-project.org References: <288a1701-def6-d628-26bc-a305f817bdb1@gmail.com> <78644d45-2ae3-121f-99fc-0a46f205907d@nvidia.com> <49da77dc-b346-68eb-9ef8-42cfb3221489@nvidia.com> <3f1c9325-3017-62be-1e3b-82fd28540fdf@nvidia.com> <6fcbff3d-8695-7cd0-60de-6eb523b6964c@gmail.com> <20191211151028.GZ28289@pdeschrijver-desktop.Nvidia.com> From: Dmitry Osipenko Message-ID: <0930a710-174b-859b-294c-e9f81f6a3b5e@gmail.com> Date: Thu, 12 Dec 2019 04:43:53 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: <20191211151028.GZ28289@pdeschrijver-desktop.Nvidia.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 11.12.2019 18:10, Peter De Schrijver пишет: > On Tue, Dec 10, 2019 at 08:41:56PM +0300, Dmitry Osipenko wrote: > > .. > >>> >>> PMC clock gate is based on the state of CLKx_ACCEPT_REQ and FORCE_EN >>> like explained above. >>> >>> CLKx_ACCEPT_REQ is 0 default and FORCE_EN acts as gate to enable/disable >>> EXTPERIPH clock output to PMC CLK_OUT_1/2/3. >> >> [and to enable OSC as well] >> >>> So I believe we need to register as MUX and Gate rather than as a single >>> clock. Please confirm. >> >> 1. The force-enabling is applied to both OSC and EXTERN sources of >> PMC_CLK_OUT_x by PMC at once. >> >> 2. Both of PMC's force-enabling and OSC/EXTERN selection is internal to PMC. >> >> Should be better to define it as a single "pmc_clk_out_x". I don't see >> any good reasons for differentiating PMC's Gate from the MUX, it's a >> single hardware unit from a point of view of the rest of the system. >> >> Peter, do you have any objections? > > The reason to have separate gate and mux clocks, is to preserve compatibility > with existing users. > Otherwise the current users would need to figure out if there's a > single clock or 2 clocks to configure. I don't think adding that code in > each user is worth it only to have a sligthly nicer modelling of the > hardware. Could you please clarify what do you mean by the "existing users"? AFAIK, nothing in kernel uses mux clocks.