All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 05/11] dm: timer: Support 64-bit counter
Date: Mon, 16 Nov 2015 13:03:31 +0800	[thread overview]
Message-ID: <CAEUhbmXaE-3ykiJfzYzfvHBS3HG_CVoo7gXCGVjf6LiKbW5zfQ@mail.gmail.com> (raw)
In-Reply-To: <CAPnjgZ3jODpTXozUbNN_nPg55MrnQz3+m7mh4Qi7ah5GGHGj3A@mail.gmail.com>

Hi Simon,

On Sat, Nov 14, 2015 at 10:04 AM, Simon Glass <sjg@chromium.org> wrote:
> Hi Bin,
>
> On 13 November 2015 at 01:11, Bin Meng <bmeng.cn@gmail.com> wrote:
>> There are timers with a 64-bit counter value but current timer
>> uclass driver assumes a 32-bit one. Modify timer_get_count()
>> to ask timer driver to always return a 64-bit counter value,
>> and provide an inline helper function timer_conv_64() to handle
>> the 32-bit/64-bit conversion automatically.
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>>
>> ---
>>
>> Changes in v3:
>> - Update commit message to reflect the v2 changes (ie: there is
>>   no "counter-64bit" property)
>>
>> Changes in v2:
>> - Do not use "counter-64bit" property, instead create an inline
>>   function for 32-bit timer driver to construct a 64-bit timer value.
>>
>>  drivers/timer/altera_timer.c  |  4 ++--
>>  drivers/timer/sandbox_timer.c |  2 +-
>>  drivers/timer/timer-uclass.c  |  8 +++-----
>>  include/timer.h               | 23 ++++++++++++++++++++---
>>  lib/time.c                    |  9 ++++++---
>>  5 files changed, 32 insertions(+), 14 deletions(-)
>
> Is there a binding file for this timer somewhere? If both altera and
> sandbox share this property, should we add a generic binding? It
> doesn't look like Linux has one though.
>

Missed this comment in my previous post.

I cannot find one too. But this is quite natural as without a
frequency the timer does not count :) I believe 'clock-frequency'
might be dynamically calculated on some platforms like ARM SoCs, which
is similar to the ns16550 serial clock source frequency (we've had
such discussion before).

[snip]

Regards,
Bin

  parent reply	other threads:[~2015-11-16  5:03 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-13  8:11 [U-Boot] [PATCH v3 00/11] dm: timer: x86: 64-bit counter support and tsc timer dm conversion Bin Meng
2015-11-13  8:11 ` [U-Boot] [PATCH v3 01/11] dm: timer: Fix several nits Bin Meng
2015-11-24  2:26   ` Simon Glass
2015-11-13  8:11 ` [U-Boot] [PATCH v3 02/11] dm: timer: Implement pre_probe() Bin Meng
2015-11-24  2:26   ` Simon Glass
2015-11-13  8:11 ` [U-Boot] [PATCH v3 03/11] timer: altera: Remove the codes to get clock frequency Bin Meng
2015-11-24  2:26   ` Simon Glass
2015-11-13  8:11 ` [U-Boot] [PATCH v3 04/11] timer: sandbox: Use device tree to pass the " Bin Meng
2015-11-22 16:24   ` Simon Glass
2015-11-13  8:11 ` [U-Boot] [PATCH v3 05/11] dm: timer: Support 64-bit counter Bin Meng
2015-11-14  2:04   ` Simon Glass
2015-11-16  2:19     ` Bin Meng
2015-11-20 21:10       ` Simon Glass
2015-11-21  0:41         ` Thomas Chou
2015-11-22 16:21           ` Simon Glass
2015-11-24  2:27             ` Simon Glass
2015-11-24 10:09             ` Simon Glass
2015-11-24 14:01               ` Thomas Chou
2015-11-24 18:23                 ` Simon Glass
2015-11-24 20:32                   ` Simon Glass
2015-11-25  3:20                   ` Thomas Chou
2015-11-25  6:44                     ` Bin Meng
2015-11-25 16:51                       ` Simon Glass
2015-11-26 17:49                         ` Simon Glass
2015-11-16  5:03     ` Bin Meng [this message]
2015-11-13  8:11 ` [U-Boot] [PATCH v3 06/11] x86: Reomve MIN_PORT80_KCLOCKS_DELAY Bin Meng
2015-11-24  2:27   ` Simon Glass
2015-11-13  8:11 ` [U-Boot] [PATCH v3 07/11] x86: tsc: Use notrace from <linux/compiler.h> Bin Meng
2015-11-24  2:27   ` Simon Glass
2015-11-13  8:11 ` [U-Boot] [PATCH v3 08/11] x86: tsc: Add driver model timer support Bin Meng
2015-11-24  2:27   ` Simon Glass
2015-11-13  8:11 ` [U-Boot] [PATCH v3 09/11] x86: Convert to use driver model timer Bin Meng
2015-11-24  2:27   ` Simon Glass
2015-11-13  8:11 ` [U-Boot] [PATCH v3 10/11] x86: tsc: Remove legacy timer codes Bin Meng
2015-11-24  2:27   ` Simon Glass
2015-11-13  8:11 ` [U-Boot] [PATCH v3 11/11] x86: tsc: Move tsc_timer.c to drivers/timer Bin Meng
2015-11-24  2:27   ` Simon Glass
2015-11-13  9:20 ` [U-Boot] [PATCH v3 00/11] dm: timer: x86: 64-bit counter support and tsc timer dm conversion Thomas Chou
2015-11-24 20:31 [U-Boot] [PATCH v3 05/11] dm: timer: Support 64-bit counter Simon Glass
2015-11-25  1:41 ` Bin Meng

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=CAEUhbmXaE-3ykiJfzYzfvHBS3HG_CVoo7gXCGVjf6LiKbW5zfQ@mail.gmail.com \
    --to=bmeng.cn@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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.