Received: by 10.192.165.148 with SMTP id m20csp4806380imm; Tue, 24 Apr 2018 08:41:51 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp9ahdvS94gywWnEB+xauILG60F2Rk/0K9hqXk+cfrxgihZeZ9ADUCU79rggsTLtan7BVBC X-Received: by 2002:a17:902:5382:: with SMTP id c2-v6mr2958567pli.335.1524584511398; Tue, 24 Apr 2018 08:41:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524584511; cv=none; d=google.com; s=arc-20160816; b=eak5L0DnAGeneVCVPLPgtL7oG/ImsV6wboenD4kIdtfAFZK/FtfqC9tU+WorqWj9/U JJnLgBdWHd8msUro1PSulcv7m6rZU/EW58PskSdGe8uVbrb+H8u9FDXC/hb6MyEg0Vws WltodA0+B38PvDBd8yGAXf9KTEluyLJQkWEiGs7kQtFrm9B3qpqTkacgLaVyPTWUuWTB vqa9XsT19UosNgFoUgWr1PgXGUt72GVFCst7bHJP90jGf7LzbVmmZFhWG83BcxBmUuNt 94dsX2h80lAx6FYnIh2P1i7lq/WQO+A7eRMyJux8v/nEaSBe+wZVgYZ9jFuklJf2tu/i QUcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dmarc-filter:arc-authentication-results; bh=RBOLjYsqYQQU3P32Erf+FAhi2/r19JHz0CpcdriBZQk=; b=vmnBTa3WksWGLW33qc7LGy/xsokaQTAdLgG9U4xwbgVxvx9599QlTasXEtWGP5m58p uToMJAcXaFksNpJGP11LpXCTRJjVhuXgN4J3IB30YMML96syIQdaNYMPJN0CyXIs4L8b u4HQJz0GK8Nwj3Cre/mMeH06nXnwt6zBhKvtYzTDqNRpPrS2sZ/fXfFiSjKJssRHRIFB 8I9vfOTsKD82++i9azQU87IUJ7rEFQaJcu2eae5SpDh/HTvPHT07NHUHWsEhaiACSGMQ frpKklzdmey1dEFvoVYw/1Et/YlUdQE2FTvG5AsR6lQKiiwid/aDYK4Yt5JZLTkLGB+3 hviA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i11si11044270pgv.220.2018.04.24.08.41.36; Tue, 24 Apr 2018 08:41:51 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751362AbeDXPkN convert rfc822-to-8bit (ORCPT + 99 others); Tue, 24 Apr 2018 11:40:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:53566 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750935AbeDXPkK (ORCPT ); Tue, 24 Apr 2018 11:40:10 -0400 Received: from localhost (unknown [104.132.1.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AB22521735; Tue, 24 Apr 2018 15:40:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AB22521735 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=sboyd@kernel.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT To: Michael Turquette , Stephen Boyd , Taniya Das From: Stephen Boyd In-Reply-To: <2b0ba677-921c-c6e0-00d2-ac5bdefd2d6b@codeaurora.org> Cc: Andy Gross , David Brown , Rajendra Nayak , Odelu Kukatla , Amit Nischal , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, David Collins References: <1523673401-21611-1-git-send-email-tdas@codeaurora.org> <1523673401-21611-3-git-send-email-tdas@codeaurora.org> <152390031768.51482.12790579493617671456@swboyd.mtv.corp.google.com> <2b0ba677-921c-c6e0-00d2-ac5bdefd2d6b@codeaurora.org> Message-ID: <152458440904.46528.10430507697972810594@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH v3 2/2] clk: qcom: clk-rpmh: Add QCOM RPMh clock driver Date: Tue, 24 Apr 2018 08:40:09 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Taniya Das (2018-04-23 09:50:22) > On 4/16/2018 11:08 PM, Stephen Boyd wrote: > > Quoting Taniya Das (2018-04-13 19:36:41) > > >> +struct clk_rpmh { > >> + struct clk_hw hw; > >> + const char *res_name; > >> + u32 res_addr; > >> + u32 res_en_offset; > > > > Why do we store both res_addr and res_en_offset? Can't we just store > > res_en_offset and then use that all the time? I don't see a user of > > res_addr anywhere. > > > > The res_addr would be the address for the resource returned by the > cmd_db_read_addr. And the res_en_offset would be the offsets of ARC_EN > or VRM_EN. Yes. But why can't we store the combination of the two? > > >> + u32 res_on_val; > >> + u32 res_off_val; > > > > Is this used? > > Yes the above are used. I just meant res_off_val. Which looks unused. > > > >> + u32 state; > >> + u32 aggr_state; > >> + u32 last_sent_aggr_state; > >> + u32 valid_state_mask; > >> + struct rpmh_client *rpmh_client; > >> + struct device *dev; > >> + struct clk_rpmh *peer; > >> + unsigned long rate; > >> +}; > > > > Can you add some kernel-doc on these structure members? > > > Sure will add the same. Great! Hopefully that clarifies things. > >> + /* > >> + * RPMh clocks have a fixed rate. Return static rate set > >> + * at init time. > >> + */ > >> + return r->rate; > > > > The rate should come from the parent. In the case of tcxo it would be > > board_xo clk rate (or maybe some fixed div-2 on the board XO that's also > > defined in DT because the board_xo seems to be two times 19.2 MHz?). > > > > There would not be any parent for the RPMH clock, they would be the > parent for other clocks. > > The TCXO is 19.2MHz and once we have the RPMH clocks, we would remove > the DT reference for board_xo. No that's wrong. There is a parent of the RPMh clks, and that's the board XO clk in the DT file. We will never remove the board clks.