All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Cc: pali@kernel.org, mibodhi@gmail.com, michael@walle.cc,
	Stefan Herbrechtsmeier
	<stefan.herbrechtsmeier-oss@weidmueller.com>
Subject: Re: [PATCH v3 1/8] timer: orion-timer: Use timer_conv_64() to fix timer wrap around
Date: Sun, 18 Sep 2022 12:49:48 +0200	[thread overview]
Message-ID: <c7bc6adf-9876-342c-19aa-66b41f2b14fd@denx.de> (raw)
In-Reply-To: <20220915142043.1549061-2-sr@denx.de>

On 15.09.22 16:20, Stefan Roese wrote:
> While testing on some Kirkwood platforms it was noticed that the timer
> did not function correctly all the time. The driver did not correctly
> handle 32bit timer value wrap arounds. Using the timer_conv_64()
> conversion function fixes this issue.
> 
> Fixes: e9e73d78a8fb ("timer: add orion-timer support")
> Suggested-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier-oss@weidmueller.com>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Tested-by: Tony Dinh <mibodhi@gmail.com>

Applied to u-boot-marvell/master

Thanks,
Stefan

> ---
> v3:
> - Add Fixes tag
> 
> v2:
> - New patch
> 
>   drivers/timer/orion-timer.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/timer/orion-timer.c b/drivers/timer/orion-timer.c
> index fd30e1bf036c..d7d1a1b24462 100644
> --- a/drivers/timer/orion-timer.c
> +++ b/drivers/timer/orion-timer.c
> @@ -19,7 +19,7 @@ static uint64_t orion_timer_get_count(struct udevice *dev)
>   {
>   	struct orion_timer_priv *priv = dev_get_priv(dev);
>   
> -	return ~readl(priv->base + TIMER0_VAL);
> +	return timer_conv_64(~readl(priv->base + TIMER0_VAL));
>   }
>   
>   static int orion_timer_probe(struct udevice *dev)

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de

  reply	other threads:[~2022-09-18 10:49 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-15 14:20 [PATCH v3 0/8] Enable CONFIG_TIMER for all Kirkwood / MVEBU boards Stefan Roese
2022-09-15 14:20 ` [PATCH v3 1/8] timer: orion-timer: Use timer_conv_64() to fix timer wrap around Stefan Roese
2022-09-18 10:49   ` Stefan Roese [this message]
2022-09-15 14:20 ` [PATCH v3 2/8] timer: orion-timer: Add support for other Armada SoC's Stefan Roese
2022-09-15 14:20 ` [PATCH v3 3/8] timer: orion-timer: Add timer_get_boot_us() for BOOTSTAGE support Stefan Roese
2022-09-15 14:20 ` [PATCH v3 4/8] arm: mvebu: Use CONFIG_TIMER on all MVEBU & KIRKWOOD platforms Stefan Roese
2022-11-05  4:03   ` Chris Packham
2022-11-05  4:08     ` Chris Packham
2022-11-07  6:23       ` Stefan Roese
2022-11-07  8:11         ` Chris Packham
2022-11-07  8:13           ` Stefan Roese
2022-11-07  8:45             ` Pali Rohár
2022-11-08  7:33               ` Chris Packham
2022-11-08  7:37                 ` Stefan Roese
2022-09-15 14:20 ` [PATCH v3 5/8] arm: mvebu: dts: Makefile: Compile Armada 375 dtb in a separate step Stefan Roese
2022-09-15 14:20 ` [PATCH v3 6/8] arm: mvebu: dts: armada-375.dtsi: Add timer0 & timer1 Stefan Roese
2022-09-15 14:20 ` [PATCH v3 7/8] arm: mvebu: dts: mvebu-u-boot.dtsi: Add "u-boot, dm-pre-reloc" to timer DT node Stefan Roese
2022-09-15 14:20 ` [PATCH v3 8/8] kirkwood: lsxl: Sync defconfigs Stefan Roese
2022-09-15 15:53 ` [PATCH v3 0/8] Enable CONFIG_TIMER for all Kirkwood / MVEBU boards Pali Rohár
2022-09-20  6:59 ` Stefan Roese
2022-10-06 10:44 ` Stefan Roese

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=c7bc6adf-9876-342c-19aa-66b41f2b14fd@denx.de \
    --to=sr@denx.de \
    --cc=mibodhi@gmail.com \
    --cc=michael@walle.cc \
    --cc=pali@kernel.org \
    --cc=stefan.herbrechtsmeier-oss@weidmueller.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.