Received: by 10.192.165.148 with SMTP id m20csp2925737imm; Mon, 7 May 2018 03:43:41 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp/tPN7wLWEaPq1Cwa+LMts03Kup3qQAuDu8JQPMN7r+bhTKCEpsobbVVcGH8N/bQ6FV4az X-Received: by 10.98.181.9 with SMTP id y9mr36253697pfe.121.1525689821388; Mon, 07 May 2018 03:43:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525689821; cv=none; d=google.com; s=arc-20160816; b=aMHTzAD2JIs2ZHdoAzN4kWxl21sr38fudtd4Qw68dR9bRrtEVuixj9yvh4/GmTVLwM x8MF59VYVZwwaoTCWw2kVVjOThwPpDO4M2mHDgPLTvBJG7NZguGMobrcvhg6fudUDuqj 31L/V9jikENNwZPjh9pRRGqtzv/ZRp9FBzMKJbp70eoT5jAvroPtbkaBRZzO5fYfIzFh yvZpnCcmNilumUW6mQZhPKEXwtGvbrtLWkEHa1nZfRx9OvDMhBSxgB9aYSCwPZLeNcBk 0aVg+d0NQurmu1M8zGlxv3GCPd7FzXx4koV4pjjgkj7ZUuscft2LNsH1c5ZJ+oWF8cSP KYYg== 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=iGKr5kBlyd0XZv4AMGwBL8/OYEM1JD9JoUGtz/0YRzI=; b=EBfx4zslp78tJeGHtAEl4VR3u0nvylMMH+IwSAUzZkprQJrDDM9aLjp9l/8NM1b+T1 mFKo/xdfqyHQLbmzgPMLgMyrZmchfHb6Y/1B536zkp8jlcKDtuDoM0XMaAfzM6TRGD82 K+I5bEXtBrz7fcz6hEc4wwQDfJGO2LCqIOk//m/ewRUsS8MjrcUn8LenNRx0G88QMDzx YEgag2PP30AgYRVsEPS8bcWwy+gGShpKBr/FlUx1HtCLWzUdcCHKLmnJgJcaN8ZrWFd8 9Dv/M4+SWCExMo/XEmBIKoCK/AdUusTWRAa3nHFqNkPE9V5XIKgq1wxjXSjUGM5lo6ln KP3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=E2RS+i7f; dkim=pass header.i=@codeaurora.org header.s=default header.b=E2RS+i7f; 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 a8-v6si21823719pln.349.2018.05.07.03.43.27; Mon, 07 May 2018 03:43:41 -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=E2RS+i7f; dkim=pass header.i=@codeaurora.org header.s=default header.b=E2RS+i7f; 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 S1752256AbeEGKmy (ORCPT + 99 others); Mon, 7 May 2018 06:42:54 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:57998 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752230AbeEGKmu (ORCPT ); Mon, 7 May 2018 06:42:50 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E3311601A0; Mon, 7 May 2018 10:42:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525689769; bh=vzPY74r9Szhk0W9G/Ai4J9pz6c1U83E1qTEfeuKi5SE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=E2RS+i7fev7Fr3gEZOe9lNGMV1ZvRcZR7yNLXSd2r7FtWYMb5wDrEhjOUGoRrUqVj NXwUbVefhU7+gkXsnWtba5PpHg9MqeSbcRY9dXlspZsN0H9fF6apWDT0BaTmPVU1lx aD+UiBQGS6A0h/nYROpE7XVJCQ/dQ2uUnPHADv/M= 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 348BF60C55; Mon, 7 May 2018 10:42:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525689769; bh=vzPY74r9Szhk0W9G/Ai4J9pz6c1U83E1qTEfeuKi5SE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=E2RS+i7fev7Fr3gEZOe9lNGMV1ZvRcZR7yNLXSd2r7FtWYMb5wDrEhjOUGoRrUqVj NXwUbVefhU7+gkXsnWtba5PpHg9MqeSbcRY9dXlspZsN0H9fF6apWDT0BaTmPVU1lx aD+UiBQGS6A0h/nYROpE7XVJCQ/dQ2uUnPHADv/M= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 07 May 2018 16:12:49 +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, devicetree@vger.kernel.org, linux-clk-owner@vger.kernel.org Subject: Re: [PATCH v6 3/3] clk: qcom: Add Global Clock controller (GCC) driver for SDM845 In-Reply-To: <152549007801.138124.1209193202019560634@swboyd.mtv.corp.google.com> References: <1525105210-8689-1-git-send-email-anischal@codeaurora.org> <1525105210-8689-4-git-send-email-anischal@codeaurora.org> <152524580953.138124.2159165461856101134@swboyd.mtv.corp.google.com> <152549007801.138124.1209193202019560634@swboyd.mtv.corp.google.com> Message-ID: <3f3049ee7cc151ac619cb29c3d07142c@codeaurora.org> 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-05-05 08:44, Stephen Boyd wrote: > Quoting Amit Nischal (2018-05-04 03:45:12) >> On 2018-05-02 12:53, Stephen Boyd wrote: >> > Quoting Amit Nischal (2018-04-30 09:20:10) >> >> + >> >> +static struct clk_branch gcc_disp_gpll0_clk_src = { >> >> + .halt_reg = 0x52004, >> >> + .halt_check = BRANCH_HALT_DELAY, >> > >> > What about this one? It's not a phy so I'm confused again why we're >> > unable to check the halt bit. To be clear(er), I don't see why we ever >> > want to have HALT_DELAY used. Hopefully we can remove that flag. >> > >> > From what I recall, the flag is there for clks that don't toggle their >> > status bit at all, but that we know take a few cycles to ungate the >> > upstream clk. So we threw a delay into the code to make sure that when >> > clk_enable() returned, a driver wouldn't try to use hardware before the >> > clk was actually on. But these cases should pretty much never happen, >> > hence all the pushback against this flag. >> > >> >> For these "*gpll0_clk_src" and "*gpll0_div_clk" clocks, there is no >> halt >> bit to check the status and it is required to have delay for few >> cycles >> so that clock gets turned on before a client driver to use the >> hardware. > > Ok.. but then why is there a 'halt_reg' configured for the clk? Thanks for the review. I will remove the halt_reg for the clocks where we are using the 'HALT_DELAY' flag and there is no need to poll the status bit as we are returning early from the 'clk_branch_wait()' function. > >> >> + >> >> +static struct clk_branch gcc_ufs_card_rx_symbol_0_clk = { >> >> + .halt_reg = 0x75018, >> >> + .halt_check = BRANCH_HALT_DELAY, >> > >> > There are still HALT_DELAY flags for UFS though? Why? >> >> For ufs_card tx/rx symbol clocks, we don't poll the status bit as >> per the recommendation from the HW team. We can change the halt_check >> type to newly implemented flag "BRANCH_HALT_SKIP". Please update us >> with >> your thoughts to change the flag to "BRANCH_HALT_SKIP". > > Yes use HALT_SKIP please. Thanks for confirming. I will do the changes in the next patch series. > >> >> > >> > Also, are you going to send DFS support for the QUP clks? I would like >> > to see that code merged soon. >> >> Taniya has sent the patches for DFS support for QUP clocks. >> https://patchwork.kernel.org/patch/10376951/ >> > > I'll take a look. > -- > 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