linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Boris Brezillon <boris.brezillon@free-electrons.com>,
	Stephen Boyd <sboyd@codeaurora.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
	"Jean-Christophe Plagniol-Villard" <plagnioj@jcrosoft.com>,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	<linux-clk@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PULL] clk: at91: sama5d2 materials
Date: Fri, 2 Oct 2015 14:58:23 +0200	[thread overview]
Message-ID: <560E7F6F.5040302@atmel.com> (raw)
In-Reply-To: <20151001223837.583b8b2d@bbrezillon>

Le 01/10/2015 22:38, Boris Brezillon a écrit :
> Hi Stephen,
> 
> On Thu, 1 Oct 2015 12:47:48 -0700
> Stephen Boyd <sboyd@codeaurora.org> wrote:
> 
>> On 08/25, Michael Turquette wrote:
>>> Quoting Boris Brezillon (2015-08-18 01:24:01)
>>>> Stephen, Mike,
>>>>
>>>> Here is a PR for the sama5d2 materials.
>>>> I know we're already late in the release cycle and I'm not sure you can
>>>> take this PR into account for 4.3, so if you can't could you please
>>>> queue it for 4.4?
>>>
>>> Queued for 4.4.
>>>
>>> Thanks,
>>> Mike
>>>
>>>>
>>>> Thanks,
>>>>
>>>> Boris
>>>>
>>>> The following changes since commit c42743f11f58646a50bc4b96da363429dca0c5e6:
>>>>
>>
>> This commit was in clk-next and then got rebased. clk-next isn't
>> stable, please don't base pull requests on it. If you have some
>> dependency on the patches in there then we need to know so that
>> we can provide some branch.
> 
> Yes, sorry about that, I'll base my future PR on linus' master branch.
> 
>>
>> I cherry-picked the 4 patches to clk-next. I had to squash in this fix
>> to get it to compile. Please check.
> 
> Thanks, looks good to me.
> Nicolas, can you test it on a real platform?

Yep, tested and works okay. So for your changes (and for the record
actually):
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>


>> ---8<----
>> diff --git a/drivers/clk/at91/clk-generated.c b/drivers/clk/at91/clk-generated.c
>> index 631123ca6f85..abc80949e1dd 100644
>> --- a/drivers/clk/at91/clk-generated.c
>> +++ b/drivers/clk/at91/clk-generated.c
>> @@ -99,22 +99,22 @@ static int clk_generated_determine_rate(struct clk_hw *hw,
>>  					struct clk_rate_request *req)
>>  {
>>  	struct clk_generated *gck = to_clk_generated(hw);
>> -	struct clk *parent = NULL;
>> +	struct clk_hw *parent = NULL;
>>  	long best_rate = -EINVAL;
>>  	unsigned long tmp_rate, min_rate;
>>  	int best_diff = -1;
>>  	int tmp_diff;
>>  	int i;
>>  
>> -	for (i = 0; i < __clk_get_num_parents(hw->clk); i++) {
>> +	for (i = 0; i < clk_hw_get_num_parents(hw); i++) {
>>  		u32 div;
>>  		unsigned long parent_rate;
>>  
>> -		parent = clk_get_parent_by_index(hw->clk, i);
>> +		parent = clk_hw_get_parent_by_index(hw, i);
>>  		if (!parent)
>>  			continue;
>>  
>> -		parent_rate = __clk_get_rate(parent);
>> +		parent_rate = clk_hw_get_rate(parent);
>>  		min_rate = DIV_ROUND_CLOSEST(parent_rate, GENERATED_MAX_DIV + 1);
>>  		if (!parent_rate ||
>>  		    (gck->range.max && min_rate > gck->range.max))
>> @@ -128,7 +128,7 @@ static int clk_generated_determine_rate(struct clk_hw *hw,
>>  				best_rate = tmp_rate;
>>  				best_diff = tmp_diff;
>>  				req->best_parent_rate = parent_rate;
>> -				req->best_parent_hw = __clk_get_hw(parent);
>> +				req->best_parent_hw = parent;
>>  			}
>>  
>>  			if (!best_diff || tmp_rate < req->rate)
>> @@ -156,7 +156,7 @@ static int clk_generated_set_parent(struct clk_hw *hw, u8 index)
>>  {
>>  	struct clk_generated *gck = to_clk_generated(hw);
>>  
>> -	if (index >= __clk_get_num_parents(hw->clk))
>> +	if (index >= clk_hw_get_num_parents(hw))
>>  		return -EINVAL;
>>  
>>  	gck->parent_id = index;
>>
> 
> 
> 


-- 
Nicolas Ferre

      reply	other threads:[~2015-10-02 12:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-18  8:24 [PULL] clk: at91: sama5d2 materials Boris Brezillon
2015-08-25 19:10 ` Michael Turquette
2015-10-01 19:47   ` Stephen Boyd
2015-10-01 20:38     ` Boris Brezillon
2015-10-02 12:58       ` Nicolas Ferre [this message]

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=560E7F6F.5040302@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=plagnioj@jcrosoft.com \
    --cc=sboyd@codeaurora.org \
    /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).