Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8928986imu; Tue, 4 Dec 2018 17:15:03 -0800 (PST) X-Google-Smtp-Source: AFSGD/XIdWv1kcExYaELaII0VqDyhSWHesHGf5YiFQZcWzEJhxuJ7Ey8b0S7F/HTcGKEP9R9xMB5 X-Received: by 2002:a63:1258:: with SMTP id 24mr18491923pgs.114.1543972503668; Tue, 04 Dec 2018 17:15:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543972503; cv=none; d=google.com; s=arc-20160816; b=FHmv95wp5w2xz5cn1tNaYkM3+mf5OdhN4oDkZhz3QZ6t7G+LuYnrkFwYNXHSgBWDap qTNbcFexOddCniIjFeVCw9zi5GGiB9TguNUOEihxY8Y2SlD5k/zGCd8WOsXvBP8qb7m/ IMq/xvuLKN7mjmtYRqUgHjJcvNcFocwjvTz1DtKxIJuvr29Tjm0Doe78K2Uv84NC20DL pghl0DXE08dA92AEyniFtlI3i5ys3fEQ2MRvbIyiW6TeTJD8zW+21q8t5VVEsRXg3TO8 0wbIA5QLwCS8zljE8M+uMXziy3MeeaHZwxsjztQZFWXtUvb0REh7Hapj3/uZpZP4rN+d yu/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature; bh=QPPqXtV0PBUo6FLHQBdbTpHBx21OV9U3F0FN6qsvrDY=; b=juGPMa2yEvYr+6clteutFb/ctPhgr5XzvwdX0nTCyhPu4wbG2muM/PuF+8C6PwRCWN NlVQu001H12LmhNeHb3PgJI0nLFRF5DXb9JDVfAfwjQr3kmG1jAwE3e+PQVblHynFsaP njcwCB7c1RvvaWNvORrBM4t5K6bfw267+6iZ82TyddG6plMIeAVgMvD+xhUj58NT4lW5 1/mDP3E+wMOE+9n1+CfsSMYhoHSOiu8ehyAQhtZZGWi+Wax10nZCm5+qE6WJZ0Jobini FuVuEyoCDXMB8jHv3tCpCH380w3Q3AF4PDZ1NgJrM6+ZkJyDOC3wCF+1OsPQatBeExPz QICg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=jzEhwnKu; dkim=pass header.i=@codeaurora.org header.s=default header.b=jzEhwnKu; 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 h16si16658278pgj.203.2018.12.04.17.14.47; Tue, 04 Dec 2018 17:15:03 -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=@codeaurora.org header.s=default header.b=jzEhwnKu; dkim=pass header.i=@codeaurora.org header.s=default header.b=jzEhwnKu; 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 S1726554AbeLEBON (ORCPT + 99 others); Tue, 4 Dec 2018 20:14:13 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:41400 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725979AbeLEBON (ORCPT ); Tue, 4 Dec 2018 20:14:13 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8D767607B5; Wed, 5 Dec 2018 01:14:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1543972452; bh=tMq/JbmF+7+Xpm7/CqrLGIipD7JS9OZhUMrPacJtuTA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=jzEhwnKub+FWy+UkaUCWQAadnKKOBW+Zjq0fx1W8HruZMu/tc6UxQlwbVY2b85WWW KIwIfp46W8+Yb3ayvHQXPzuC+Eukb2eKp/FK4yWP8hCryGpFhkrhARlXOKCh6fyx1J Wd+EIJRIbpd2IzQhgN6y2cfhKdjv+lgab4fKYJF8= 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.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from [10.46.162.234] (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: daidavid1@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 55F88602F4; Wed, 5 Dec 2018 01:14:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1543972452; bh=tMq/JbmF+7+Xpm7/CqrLGIipD7JS9OZhUMrPacJtuTA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=jzEhwnKub+FWy+UkaUCWQAadnKKOBW+Zjq0fx1W8HruZMu/tc6UxQlwbVY2b85WWW KIwIfp46W8+Yb3ayvHQXPzuC+Eukb2eKp/FK4yWP8hCryGpFhkrhARlXOKCh6fyx1J Wd+EIJRIbpd2IzQhgN6y2cfhKdjv+lgab4fKYJF8= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 55F88602F4 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=daidavid1@codeaurora.org Subject: Re: [RFC PATCH] clk: qcom: clk-rpmh: Add IPA clock support To: Stephen Boyd , Alex Elder , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Cc: georgi.djakov@linaro.org, bjorn.andersson@linaro.org, evgreen@google.com, tdas@codeaurora.org References: <1543895413-1553-1-git-send-email-daidavid1@codeaurora.org> <1543895413-1553-2-git-send-email-daidavid1@codeaurora.org> <154395145491.88331.1174781210192403998@swboyd.mtv.corp.google.com> <8dafe631-4b16-94cd-392e-84728f2bb382@linaro.org> <154396284056.88331.12279283832884556349@swboyd.mtv.corp.google.com> From: David Dai Message-ID: Date: Tue, 4 Dec 2018 17:14:10 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <154396284056.88331.12279283832884556349@swboyd.mtv.corp.google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/4/2018 2:34 PM, Stephen Boyd wrote: > Quoting Alex Elder (2018-12-04 13:41:47) >> On 12/4/18 1:24 PM, Stephen Boyd wrote: >>> Quoting David Dai (2018-12-03 19:50:13) >>>> Add IPA clock support by extending the current clk rpmh driver to support >>>> clocks that are managed by a different type of RPMh resource known as >>>> Bus Clock Manager(BCM). >>> Yes, but why? Does the IPA driver need to set clk rates and that somehow >>> doesn't work as a bandwidth request? >> The IPA core clock is a *clock*, not a bus. Representing it as if >> it were a bus, abusing the interconnect interface--pretending a bandwidth >> request is really a clock rate request--is kind of kludgy. I think Bjorn >> and David (and maybe Georgi? I don't know) decided a long time ago that >> exposing this as a clock is the right way to do it. I agree with that. >> > But then we translate that clock rate into a bandwidth request to the > BCM hardware? Seems really weird because it's doing the opposite of what > you say is abusive. What does the IPA driver plan to do with this clk? > Calculate a frequency by knowing that it really boils down to some > bandwidth that then gets converted back into some clock frequency? Do we > have the user somewhere that can be pointed to? The clock rate is translated into a unitless threshold value sent as part of the rpmh msg that BCM takes to select a performance. In this case, the unit conversion is based on the unit value read from the aux data which is in Khz. I understand that this wasn't explicitly mentioned anywhere and I'll improve on that next patch. Here's a link to the IPA driver implementation: https://lkml.org/lkml/2018/11/7/220 > > Of course, none of these details are in the commit text so it's really > hard for me as a bystander to figure this all out. So again, please add > these sorts of details to the commit text so we can be "sold" on the > idea of the patch instead of stating what the patch does. Understood, I'll be as detailed and as explicit as I can in the future. -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project