Received: by 10.213.65.68 with SMTP id h4csp2471999imn; Thu, 5 Apr 2018 15:59:54 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+coOtRM83zF6PWKR1fReTXEXww5ESvqc3eyNgDhEPlJwj/73sg16xM4MQUqABw0GmM4Hzh X-Received: by 10.99.51.137 with SMTP id z131mr16053780pgz.386.1522969194935; Thu, 05 Apr 2018 15:59:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522969194; cv=none; d=google.com; s=arc-20160816; b=Qb/lj87ThBuF8OICwYYu4HuhbfDEIJdwXIcBIxaL1BdzcSVP2gHrVmOZNykHxGpykT 8jc1ss6sQqutrbuAYlNbNbJJPycSYkndQLUk2zVRTZTUAu2mUHfPabuzsf4PruUKRxbf /jObP6RhI97kF41wei3TkkwNIe22UpqbztEI1Vd0NyjLDD8PE+a8LPlrjH6d/uhUe/XP AXnZICHNod4RzGWoxE/q20dnKMD4hj9VJn1gDsvPYk4zzEc7TAIuXlTzWnN+2nXPGU8u 87SjvaP/38WPQUX7HAUbAyR5Ejuj+9pVspkSutgCOSb0jZRa82K1i0P9HDKjo5USlqC5 zXMQ== 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=b4m7E6KUaiy2yFwqpVQbd87xx4tch5bZL8UEHf2EeZY=; b=AxBsVC0KEEsTGK++d9N3LC+dpfZMY5QgcAVExygLfQ02PQ/+Dv5FIYlmyMG0/DC4JK ni/0aKFZVvdtf/lejukh0yveAim5z+1mOMszjI1fZenfETPNJ1IvfuIzduY1VDLUI8nL mMUxHJA0T0JWVLa6JIJiNEhRkoph5sx0kt48fewt9CqPNsm4cFkhSiH6HOat3fwbEyWr r5sumk6la/c0Ws9lq3jxYK2/82JvqkjmsToeQg8f+vqw0IqtBaL82X5TlGtDlo/c3HX9 KedVfQc4e2aDuBQnjZ7cs14ezv+B11zR1Srfy1+eL19wiCtguPEio+8lM+F0T0fWH9Um xGpw== 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 az2-v6si6387770plb.263.2018.04.05.15.59.40; Thu, 05 Apr 2018 15:59:54 -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 S1752820AbeDEW5D convert rfc822-to-8bit (ORCPT + 99 others); Thu, 5 Apr 2018 18:57:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:51790 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751722AbeDEW5B (ORCPT ); Thu, 5 Apr 2018 18:57:01 -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 E788E208FE; Thu, 5 Apr 2018 22:57:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E788E208FE 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: Amit Nischal From: Stephen Boyd In-Reply-To: <624665d7af39686d331c863ba7b9af4d@codeaurora.org> Cc: Michael Turquette , Stephen Boyd , Andy Gross , David Brown , Rajendra Nayak , Odelu Kukatla , Taniya Das , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk-owner@vger.kernel.org References: <1520493495-3084-1-git-send-email-anischal@codeaurora.org> <1520493495-3084-5-git-send-email-anischal@codeaurora.org> <152150657982.254778.14132033041219278756@swboyd.mtv.corp.google.com> <624665d7af39686d331c863ba7b9af4d@codeaurora.org> Message-ID: <152296902025.143116.550838977705296456@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH v2 4/4] clk: qcom: Add Global Clock controller (GCC) driver for SDM845 Date: Thu, 05 Apr 2018 15:57:00 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Amit Nischal (2018-04-03 05:24:41) > On 2018-03-20 06:12, Stephen Boyd wrote: > > Quoting Amit Nischal (2018-03-07 23:18:15) > >> +}; > >> + > >> +static struct clk_rcg2 gcc_sdcc4_apps_clk_src = { > >> + .cmd_rcgr = 0x1600c, > >> + .mnd_width = 8, > >> + .hid_width = 5, > >> + .parent_map = gcc_parent_map_0, > >> + .freq_tbl = ftbl_gcc_sdcc4_apps_clk_src, > >> + .safe_src_freq_tbl = &cxo_safe_src_f, > > > > Why does sdcc have safe src stuff? Is something turning on the sdcc clk > > outside of our control? > > I will get more details on this and will get back. Any news? > > > > >> + .clkr.hw.init = &(struct clk_init_data){ > >> + .name = "gcc_sdcc4_apps_clk_src", > >> + .parent_names = gcc_parent_names_0, > >> + .num_parents = 4, > >> + .flags = CLK_SET_RATE_PARENT, > >> + .ops = &clk_rcg2_shared_ops, > >> + }, > >> +}; > >> + > > [...] > >> + > >> +static struct clk_branch gcc_video_xo_clk = { > >> + .halt_reg = 0xb028, > >> + .halt_check = BRANCH_HALT, > >> + .clkr = { > >> + .enable_reg = 0xb028, > >> + .enable_mask = BIT(0), > >> + .hw.init = &(struct clk_init_data){ > >> + .name = "gcc_video_xo_clk", > >> + .flags = CLK_IS_CRITICAL, > >> + .ops = &clk_branch2_ops, > >> + > > > > These things have no parents and we mark them critical. Why are we > > even exposing them to the kernel? Are they not on by default? Are we > > going to change these to non-critical at some point in the future? > > These clocks are not enabled by default and going to video or other > multimedia cores so we are marking them as critical and need to expose > to the kernel. As of now, there is no plan to change these to > non-critical. Ok. Can we open code enabling these branches in the driver probe then? Still seems wasteful if nobody uses these. Put another way, either a driver (or other clk controller) should be toggling these gates at runtime or we should enable them once and leave them out of the framework. If the driver approach is taken, then the drivers should be able to turn the clks on and off to save some power.