Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1352994imu; Wed, 16 Jan 2019 17:58:07 -0800 (PST) X-Google-Smtp-Source: ALg8bN4QclIUkl3XTJS1FEQdRYCNnKY23sp+AszC663TymbfpwxKRfHUrhDGtwkz6GMQeqOJF27e X-Received: by 2002:a63:26c1:: with SMTP id m184mr11002433pgm.367.1547690286954; Wed, 16 Jan 2019 17:58:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547690286; cv=none; d=google.com; s=arc-20160816; b=kjHaaAbFOtOfwtowBLSTCyp3qlhLTQJL3q7oKQzQS+D8V4DypBuXUFA6stY98hrwe5 JnXMb+5ALP0sjt7lnA7b6HmXMrXBbRQJaLrdwx37win3UmLFGVaR66y8ZWvqfRLlAdQX uH6R1TEs3FOoqTmR4wkboa3OklpWFVsYJq8cePznkqhSGTJULRh5Q833pOrfdcsqAiwY cL5aDiK4NHCdT69WwkGx29n+aI6Q0CZq2XXRfLW2TgW5Q6Oj7FPG2slCRm/CQwNMBYSI Y8q9wG+yjaOA0QznyXHQSgMQkIEFk9b7EoC2XY6EV2415Uz2GFEpyLuicFdqGuYmOcxY aNNg== 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=H/rvhiS2m7nYgKL9eVBX3qwy2N0ox9jTYAYimsfKCW0=; b=DwzB1+nw3MePhK3zMY/pzMRxXFMjdofhEqbNaHvEL881aNcCh35EFDSWez7r1n43R/ u8YhfyROM1mnm97qo0nbsAweaKRuCzY9KZMSlVzS/6KKYpAqk3T0qd7fHXFkW5px2jaW 46d0m/CU+0vcsVvYg6h742XiBdA0bTgdyG2vSnuHulZ4y0EHM/wB0SJxK73KxUGxxdGt LMP7SNGf0KStuPprsS07zqQLJfcIS0n2GuDGM1//jjrcCzIB4T1pYDa9s66A93H7E4rh DabPON0ackGMRiQUQBDBRJVSBsSXfMpKmSnRhKwMCDQJKtKlBymTBgrJaca45DIDMGMf A6jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=lfY1i0hC; dkim=pass header.i=@codeaurora.org header.s=default header.b=XiBC7rtf; 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 w61si149598plb.309.2019.01.16.17.57.48; Wed, 16 Jan 2019 17:58:06 -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=lfY1i0hC; dkim=pass header.i=@codeaurora.org header.s=default header.b=XiBC7rtf; 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 S1727003AbfAQAyn (ORCPT + 99 others); Wed, 16 Jan 2019 19:54:43 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:34288 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726188AbfAQAym (ORCPT ); Wed, 16 Jan 2019 19:54:42 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 47D8F60807; Thu, 17 Jan 2019 00:54:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1547686481; bh=hAG9Mhht14pGQ5VVgDO7B7l2OK2TC68VXcahyGf/CqA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=lfY1i0hC91jD6aorzsbZ246lVdEM3vYv3l/vJHsAdSBBPcIFo6JAYLeAGbVvLfEYI KX0Ivpot3F1NiMHh/c5+qf7rMefdg2B2TQsdIzJD5cRyd7wwEm34yAAVmjks/u1U9L xvef0xdF5xh1wSDWeIC7kt6XooOkM5X3bh6+SjtU= 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 452E56024C; Thu, 17 Jan 2019 00:54:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1547686480; bh=hAG9Mhht14pGQ5VVgDO7B7l2OK2TC68VXcahyGf/CqA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=XiBC7rtf32x7j6wral3WKU1OX4CBuRRL0nEYvpMa0m/nf3Sj0rXMCG1/xBq461J53 EV2P0lCog2MAZQ3HCUDg2AW/ClToKmOnVnTJNAHQ5xlZeEgU9qTg59qn2T6oraa4xa FQwISkgOEuJzSjtWcChglhGdXSX87RngY9gfhFR4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 452E56024C 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: [PATCH v1] clk: qcom: clk-rpmh: Add IPA clock support To: Stephen Boyd , 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, elder@linaro.org References: <1544754904-18951-1-git-send-email-daidavid1@codeaurora.org> <154706211110.15366.8008755843113316822@swboyd.mtv.corp.google.com> <11f948dc-3045-762f-b6bf-63c32d51772a@codeaurora.org> <154748442276.169631.994019688641603420@swboyd.mtv.corp.google.com> From: David Dai Message-ID: <7db43e9e-0f5c-9c26-6f26-c601ec69f964@codeaurora.org> Date: Wed, 16 Jan 2019 16:54:39 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <154748442276.169631.994019688641603420@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 1/14/2019 8:47 AM, Stephen Boyd wrote: > Quoting David Dai (2019-01-11 16:56:14) >> On 1/9/2019 11:28 AM, Stephen Boyd wrote: >>> Quoting David Dai (2018-12-13 18:35:04) >>>> + >>>> +#define BCM_TCS_CMD(valid, vote) \ >>>> + (BCM_TCS_CMD_COMMIT_MASK | \ >>>> + ((valid) << BCM_TCS_CMD_VALID_SHIFT) | \ >>>> + ((cpu_to_le32(vote) & \ >>> Why? >> Sorry, could you clarify this question? If you're referring to the >> cpu_to_le32, shouldn't we be explicit about converting endianness even >> if it might be redundant for this particular qcom platform? > Is only the vote part of the message in little endian format and the > rest is native CPU endianess? It's very odd to see that jammed in the > middle of a bit packing statement like that. Typically the whole u32 > would be in one or the other endianness. Also, sparse right complains > about this macro and it's usage, so something is wrong. Point taken, I'll leave it out of the macro for now. > I think one other problem is that rpmh API doesn't really talk about > endianness here and that's busted. So if you want to fix endianness > issues that needs to be fixed first. Since a similar macro is being used as part of the interconnect provider driver, I was thinking a better place for this macro might be in the tcs.h as part of the rpmh driver? I could submit a different patch for rpmh that mentions endianness along with this change. >>>> @@ -29,6 +54,7 @@ >>>> * @aggr_state: rpmh clock aggregated state >>>> * @last_sent_aggr_state: rpmh clock last aggr state sent to RPMh >>>> * @valid_state_mask: mask to determine the state of the rpmh clock >>>> + * @aux_data: data specific to the bcm rpmh resource >>> But there isn't aux_data. Is this supposed to be unit? And what is unit >>> going to be? 1000? >> Supposed to be unit, the value is on the order of Khz. > Ok, hopefully the kernel-doc comes out easy to understand. > >>>> @@ -217,6 +340,7 @@ static unsigned long clk_rpmh_recalc_rate(struct clk_hw *hw, >>>> DEFINE_CLK_RPMH_VRM(sdm845, rf_clk1, rf_clk1_ao, "rfclka1", 1); >>>> DEFINE_CLK_RPMH_VRM(sdm845, rf_clk2, rf_clk2_ao, "rfclka2", 1); >>>> DEFINE_CLK_RPMH_VRM(sdm845, rf_clk3, rf_clk3_ao, "rfclka3", 1); >>>> +DEFINE_CLK_RPMH_BCM(sdm845, ipa, "IP0"); >>> It's really IP0?! What was wrong with IPA? >> Yeah... convention seems to be 2 letters and then a number for most BCM >> resources. > OK. > -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project