linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Archit Taneja <architt@codeaurora.org>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-arm-msm@vger.kernel.org,
	John Stultz <john.stultz@linaro.org>,
	Vinay Simha <vinaysimha@inforcecomputing.com>
Subject: Re: [PATCH] clk: qcom: Fix pre-divider usage for pixel RCG
Date: Sun, 28 Feb 2016 15:12:17 +0530	[thread overview]
Message-ID: <56D2C0F9.4010509@codeaurora.org> (raw)
In-Reply-To: <20160226174434.GS28849@codeaurora.org>



On 2/26/2016 11:14 PM, Stephen Boyd wrote:
> On 02/26, Archit Taneja wrote:
>> diff --git a/drivers/clk/qcom/clk-rcg.c b/drivers/clk/qcom/clk-rcg.c
>> index bfbb28f..2c033f2 100644
>> --- a/drivers/clk/qcom/clk-rcg.c
>> +++ b/drivers/clk/qcom/clk-rcg.c
>> @@ -655,8 +654,13 @@ static int clk_rcg_pixel_set_rate(struct clk_hw *hw, unsigned long rate,
>>   			(parent_rate > (request + delta)))
>>   			continue;
>>
>> -		f.m = frac->num;
>> -		f.n = frac->den;
>> +		/* try to use only the pre-divider if we can */
>> +		if (frac->num == 1) {
>> +			f.pre_div = frac->den;
>
> What if the pre divider can't support the frac->den value? Maybe
> we should just force the pre divider to be in bypass so that we
> can use the m/n all the time.

Yeah, for some strange reason it seems like having a pre-divider as 3
itself doesn't seem to work. As you suggested, I'll force the pre
divider to 1 and use m/n all the time.

Archit

>
>> +		} else {
>> +			f.m = frac->num;
>> +			f.n = frac->den;
>> +		}
>>
>>   		return __clk_rcg_set_rate(rcg, &f);
>>   	}
>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2016-02-28  9:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26  5:30 [PATCH] clk: qcom: Fix pre-divider usage for pixel RCG Archit Taneja
2016-02-26 17:44 ` Stephen Boyd
2016-02-28  9:42   ` Archit Taneja [this message]
2016-02-26 20:40 ` John Stultz
2016-02-28 10:06   ` Archit Taneja
2016-02-28 10:07 ` [PATCH v2] " Archit Taneja
2016-02-29 19:31   ` John Stultz
2016-02-29 20:57   ` Stephen Boyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56D2C0F9.4010509@codeaurora.org \
    --to=architt@codeaurora.org \
    --cc=john.stultz@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=vinaysimha@inforcecomputing.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).