All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	linux-amlogic@lists.infradead.org, jbrunet@baylibre.com
Cc: linux-clk@vger.kernel.org, carlo@caione.org
Subject: Re: [PATCH 0/2] Meson8b: fixes for the cpu_scale_div clock
Date: Fri, 16 Nov 2018 09:30:46 +0100	[thread overview]
Message-ID: <88485943-55a8-e045-b633-e33d7c352626@baylibre.com> (raw)
In-Reply-To: <a8798132-4544-ce91-7321-1489948c4429@baylibre.com>

On 08/11/2018 15:16, Neil Armstrong wrote:
> On 27/09/2018 10:59, Martin Blumenstingl wrote:
>> While trying to add support for the TWD timer I found that our CPU clock
>> calculation (when running off the "cpu_scale_div clock) is incorrect.
>>
>> The main problem was the cpu_scale_div clock:
>> it's divider table has an off-by-one error. the old formula was:
>>   parent_rate / 2 * register_value
>> however, testing shows that the correct formula is:
>>   parent_rate / 2 * (register value + 1)
>> See the commit message of patch #1 for a complete description of the
>> problem and it's history.
>>
>> While looking at the "cpu_scale_div" clock I also found that it's
>> register width was also off-by-one, so this is fixed in a separate patch
>> as well.
>>
>> Both patches are not critical because I haven't seen a case where u-boot
>> uses cpu_scale_div for the CPU clock. It's only a problem when playing
>> with the CPU clock in u-boot (by writing registers manually) or as soon
>> as we support CPU frequency scaling.
>>
>>
>> Martin Blumenstingl (2):
>>   clk: meson: meson8b: fix incorrect divider mapping in cpu_scale_table
>>   clk: meson: meson8b: fix the width of the cpu_scale_div clock
>>
>>  drivers/clk/meson/meson8b.c | 17 +++++++++--------
>>  1 file changed, 9 insertions(+), 8 deletions(-)
>>
> 
> Pushed to fixes/drivers for 4.20
> 
> Neil
> 

Finally, pushed to next/drivers to since these are not critical and to
satisfy the dependencies of "Meson8b: make the CPU clock mutable" patchset.

WARNING: multiple messages have this Message-ID (diff)
From: narmstrong@baylibre.com (Neil Armstrong)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH 0/2] Meson8b: fixes for the cpu_scale_div clock
Date: Fri, 16 Nov 2018 09:30:46 +0100	[thread overview]
Message-ID: <88485943-55a8-e045-b633-e33d7c352626@baylibre.com> (raw)
In-Reply-To: <a8798132-4544-ce91-7321-1489948c4429@baylibre.com>

On 08/11/2018 15:16, Neil Armstrong wrote:
> On 27/09/2018 10:59, Martin Blumenstingl wrote:
>> While trying to add support for the TWD timer I found that our CPU clock
>> calculation (when running off the "cpu_scale_div clock) is incorrect.
>>
>> The main problem was the cpu_scale_div clock:
>> it's divider table has an off-by-one error. the old formula was:
>>   parent_rate / 2 * register_value
>> however, testing shows that the correct formula is:
>>   parent_rate / 2 * (register value + 1)
>> See the commit message of patch #1 for a complete description of the
>> problem and it's history.
>>
>> While looking at the "cpu_scale_div" clock I also found that it's
>> register width was also off-by-one, so this is fixed in a separate patch
>> as well.
>>
>> Both patches are not critical because I haven't seen a case where u-boot
>> uses cpu_scale_div for the CPU clock. It's only a problem when playing
>> with the CPU clock in u-boot (by writing registers manually) or as soon
>> as we support CPU frequency scaling.
>>
>>
>> Martin Blumenstingl (2):
>>   clk: meson: meson8b: fix incorrect divider mapping in cpu_scale_table
>>   clk: meson: meson8b: fix the width of the cpu_scale_div clock
>>
>>  drivers/clk/meson/meson8b.c | 17 +++++++++--------
>>  1 file changed, 9 insertions(+), 8 deletions(-)
>>
> 
> Pushed to fixes/drivers for 4.20
> 
> Neil
> 

Finally, pushed to next/drivers to since these are not critical and to
satisfy the dependencies of "Meson8b: make the CPU clock mutable" patchset.

  reply	other threads:[~2018-11-16  8:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-27  8:59 [PATCH 0/2] Meson8b: fixes for the cpu_scale_div clock Martin Blumenstingl
2018-09-27  8:59 ` Martin Blumenstingl
2018-09-27  8:59 ` [PATCH 1/2] clk: meson: meson8b: fix incorrect divider mapping in cpu_scale_table Martin Blumenstingl
2018-09-27  8:59   ` Martin Blumenstingl
2018-09-27  8:59 ` [PATCH 2/2] clk: meson: meson8b: fix the width of the cpu_scale_div clock Martin Blumenstingl
2018-09-27  8:59   ` Martin Blumenstingl
2018-11-08 14:16 ` [PATCH 0/2] Meson8b: fixes for " Neil Armstrong
2018-11-08 14:16   ` Neil Armstrong
2018-11-16  8:30   ` Neil Armstrong [this message]
2018-11-16  8:30     ` Neil Armstrong

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=88485943-55a8-e045-b633-e33d7c352626@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=carlo@caione.org \
    --cc=jbrunet@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.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 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.