Received: by 10.213.65.68 with SMTP id h4csp2224322imn; Sun, 8 Apr 2018 22:57:54 -0700 (PDT) X-Google-Smtp-Source: AIpwx48KEJhPv62aDWTyuIZpzx9xpI0QjgbldiZskyaDlG0cB3ABwgmSS9bvjU/ZAavJPlmuNb3E X-Received: by 10.99.160.67 with SMTP id u3mr23619234pgn.389.1523253474695; Sun, 08 Apr 2018 22:57:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523253474; cv=none; d=google.com; s=arc-20160816; b=FeL23KX3jJLBxoUHGXhtDHaeUIj9euZkbPsH//4MW68wV/hheQHe0Fhi7Ov/4ncED3 IpxsO1VM3JaNMScebzj3mKI14e7e2FNCLKcWAlXKCYqLa6270t14GdVE8Apauot7iaWH WFWgcRmx9zYz8loSKzyd7e5g0+ez36P6QWRZrl/1xzMJbWAB7TfIM4iZiK2L7RFd/LlS 85C+BagiQ4XQowiMFVfq17UhXQMBVrGPwAEGcPDlyWeKXBqbIHIbNYLRw0qHOIlnJztR jDQJrECGKqImgHhOhJ1DJajrzl1knhRnVt31rRa8eTZggmReJR6tajCq7ySw003lnoU/ SeOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=33/nREc/NHrSqazqwvCPFJ61rPT+1egcVR8NvCJkugQ=; b=haGwOSVswTUllepKhpKteGRAOa3DUpRoXZDA4rW9T9ABlvAKBEPWTI12kAiE9lZruZ tLhJeAR2S2kraHg1DIitdL/5T8gohDZlOt2T1xJRp/07MUcXsUbRJnFnrDCAMiI09JA4 uF93jWh0/LTYRzXY6SWbEm4vcUJTqApKE4WTxK09hAJENJhK2MgJzOOaBqjfsBwXKdh2 rdexHDP6A3ubwkZ5hjcNueZbcgWcJsVjvsEEq5K6jwhsfidNKHDcRuEJhtNYcE3C/S6n g2uaDSLgGANTrJ1n3Q1lzi/IsqpE4xUylMPpIFXfNMLrePepTvL52cIvMET9YnX8g7BS NsEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=ki/tkVzm; dkim=pass header.i=@codeaurora.org header.s=default header.b=BdkGEpiz; 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 j2si10030915pff.214.2018.04.08.22.57.15; Sun, 08 Apr 2018 22:57: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; dkim=pass header.i=@codeaurora.org header.s=default header.b=ki/tkVzm; dkim=pass header.i=@codeaurora.org header.s=default header.b=BdkGEpiz; 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 S1752394AbeDIFZm (ORCPT + 99 others); Mon, 9 Apr 2018 01:25:42 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:43836 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752334AbeDIFZk (ORCPT ); Mon, 9 Apr 2018 01:25:40 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 736B560F6C; Mon, 9 Apr 2018 05:25:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523251539; bh=NBCdBp4/dNwzCgitYmuiFprSGkIP4OwlIy4WBKh+rCY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ki/tkVzm9+4vp6Mio+DOeo780l3fmwL6p7p9pgN8s595tjUlzykjlsF7/ha8Gly7G +w5y1pYLNL0Pw9H4MmxpLrEApTTi+yJO/DEMin4NwNryhUN0VB8ZwaxOKlFY7bPtKK hsxtUtyQFzygpWnkW95cvZc6FeaWmhnrv0zGHq/E= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id C61FD607EF; Mon, 9 Apr 2018 05:25:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523251538; bh=NBCdBp4/dNwzCgitYmuiFprSGkIP4OwlIy4WBKh+rCY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BdkGEpizAX5ToW+aBHHc+PppgknJUda3HDZ3pTX9jlqCMvATlkBNxLilnopK728uu 3BkJwAXaI6TJ+1Qc12TFOipLgbX+lDH/TRQwnkLFcGIql1+8RtNSI/b4lCRlpCPtkw lAR4EFOzSNHT1VhoxaQ8HjNk68ysRG4qitMXe3EY= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 09 Apr 2018 10:55:38 +0530 From: Amit Nischal To: Stephen Boyd 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 Subject: Re: [PATCH v2 4/4] clk: qcom: Add Global Clock controller (GCC) driver for SDM845 In-Reply-To: <152296902025.143116.550838977705296456@swboyd.mtv.corp.google.com> 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> <152296902025.143116.550838977705296456@swboyd.mtv.corp.google.com> Message-ID: X-Sender: anischal@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-04-06 04:27, Stephen Boyd wrote: > 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? > I am removing the safe src for SDCC, but I am trying to get details from teams as to why this was added, if it would be required I will add back the safe src index again and submit the patch. >> >> > >> >> + .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. As of now, no client driver is taking care of toggling these gates at runtime. We want these clocks to be always on and that's why marked them as CRITICAL so that if any user tries to unprepare/disable then it won't happen and framework generates the warning. Once the client drivers will take care of above, then we will submit a cleanup patch. > -- > To unsubscribe from this list: send the line "unsubscribe linux-clk" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html