All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Stanley <joel@jms.id.au>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Re: [PATCH linux dev-4.10] clk: aspeed: fix APB and AHB clock rates
Date: Mon, 27 Mar 2017 09:46:58 +1030	[thread overview]
Message-ID: <CACPK8Xe+cGxdZ-kwJqSbZUGLMZMZC_Ez-t8Jyi-Fu1z90Tg9+w@mail.gmail.com> (raw)
In-Reply-To: <1c07a4ca-a135-862e-fdde-98f72f93e4d6@kaod.org>

On Fri, Mar 24, 2017 at 11:26 PM, Cédric Le Goater <clg@kaod.org> wrote:
> I forgot to add a subject prefix : that is for 'linux dev-4.10'
>
> Thanks,
>
> C.
>
> for On 03/24/2017 01:17 PM, Cédric Le Goater wrote:
>> The masking is one bit too generous which generates really low clock
>> rates.

Thanks. I've gotten this wrong about four times now. I tried to make
it clearer with the GENMASK macro, but grabbed too many bits.

Applied to dev-4.10.

Cheers,

Joel

>>
>> Signed-off-by: Cédric Le Goater <clg@kaod.org>
>> ---
>>  drivers/clk/aspeed/clk-g4.c | 2 +-
>>  drivers/clk/aspeed/clk-g5.c | 4 ++--
>>  2 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/clk/aspeed/clk-g4.c b/drivers/clk/aspeed/clk-g4.c
>> index bf61919ead52..50117ec16909 100644
>> --- a/drivers/clk/aspeed/clk-g4.c
>> +++ b/drivers/clk/aspeed/clk-g4.c
>> @@ -94,7 +94,7 @@ static unsigned long aspeed_clk_apb_recalc_rate(struct clk_hw *hw,
>>               return ret;
>>       }
>>
>> -     reg = (reg >> 23) & GENMASK(2, 0);
>> +     reg = (reg >> 23) & 0x3;
>>
>>       return hpll_rate / (2 + 2 * reg);
>>  }
>> diff --git a/drivers/clk/aspeed/clk-g5.c b/drivers/clk/aspeed/clk-g5.c
>> index 6eb0004f894d..8f8f7f796cee 100644
>> --- a/drivers/clk/aspeed/clk-g5.c
>> +++ b/drivers/clk/aspeed/clk-g5.c
>> @@ -84,7 +84,7 @@ static unsigned long aspeed_clk_ahb_recalc_rate(struct clk_hw *hw,
>>       }
>>
>>       /* Bits 11:9 define the AXI/AHB clock frequency ratio */
>> -     reg = (reg >> 9) & GENMASK(3, 0);
>> +     reg = (reg >> 9) & 0x7;
>>
>>       /* A value of zero is undefined */
>>       WARN_ON(reg == 0);
>> @@ -108,7 +108,7 @@ static unsigned long aspeed_clk_apb_recalc_rate(struct clk_hw *hw,
>>               return ret;
>>       }
>>
>> -     reg = (reg >> 23) & GENMASK(3, 0);
>> +     reg = (reg >> 23) & 0x7;
>>
>>       rate = hpll_rate / (4 * (reg + 1));
>>
>>
>

      reply	other threads:[~2017-03-26 23:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24 12:17 [PATCH] clk: aspeed: fix APB and AHB clock rates Cédric Le Goater
2017-03-24 12:56 ` [PATCH linux dev-4.10] " Cédric Le Goater
2017-03-26 23:16   ` Joel Stanley [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=CACPK8Xe+cGxdZ-kwJqSbZUGLMZMZC_Ez-t8Jyi-Fu1z90Tg9+w@mail.gmail.com \
    --to=joel@jms.id.au \
    --cc=clg@kaod.org \
    --cc=openbmc@lists.ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.