mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Bartosz Golaszewski <brgl@bgdev.pl>, Sekhar Nori <nsekhar@ti.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	David Lechner <david@lechnology.com>,
	Kevin Hilman <khilman@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: Re: [PATCH v3 1/3] clocksource: davinci: only enable clockevents once tim34 is initialized
Date: Fri, 10 Jan 2020 18:56:45 +0100	[thread overview]
Message-ID: <7be95251-7e26-6090-4770-6e4dbebfadd2@linaro.org> (raw)
In-Reply-To: <20200110171643.18578-2-brgl@bgdev.pl>

On 10/01/2020 18:16, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> The DM365 platform has a strange quirk (only present when using ancient
> u-boot - mainline u-boot v2013.01 and later works fine) where if we
> enable the second half of the timer in periodic mode before we do its
> initialization - the time won't start flowing and we can't boot.
> 
> When using more recent u-boot, we can enable the timer, then reinitialize
> it and all works fine.
> 
> To work around this issue only enable clockevents once tim34 is
> initialized i.e. move clockevents_config_and_register() below tim34
> initialization.
> 
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Shall I take it through my tree?

> ---
>  drivers/clocksource/timer-davinci.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/clocksource/timer-davinci.c b/drivers/clocksource/timer-davinci.c
> index 62745c962049..e421946a91c5 100644
> --- a/drivers/clocksource/timer-davinci.c
> +++ b/drivers/clocksource/timer-davinci.c
> @@ -302,10 +302,6 @@ int __init davinci_timer_register(struct clk *clk,
>  		return rv;
>  	}
>  
> -	clockevents_config_and_register(&clockevent->dev, tick_rate,
> -					DAVINCI_TIMER_MIN_DELTA,
> -					DAVINCI_TIMER_MAX_DELTA);
> -
>  	davinci_clocksource.dev.rating = 300;
>  	davinci_clocksource.dev.read = davinci_clocksource_read;
>  	davinci_clocksource.dev.mask =
> @@ -323,6 +319,10 @@ int __init davinci_timer_register(struct clk *clk,
>  		davinci_clocksource_init_tim34(base);
>  	}
>  
> +	clockevents_config_and_register(&clockevent->dev, tick_rate,
> +					DAVINCI_TIMER_MIN_DELTA,
> +					DAVINCI_TIMER_MAX_DELTA);
> +
>  	rv = clocksource_register_hz(&davinci_clocksource.dev, tick_rate);
>  	if (rv) {
>  		pr_err("Unable to register clocksource");
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


  reply	other threads:[~2020-01-10 17:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10 17:16 [PATCH v3 0/3] ARM: davinci: convert dm365 to using the new clocksource driver Bartosz Golaszewski
2020-01-10 17:16 ` [PATCH v3 1/3] clocksource: davinci: only enable clockevents once tim34 is initialized Bartosz Golaszewski
2020-01-10 17:56   ` Daniel Lezcano [this message]
2020-01-11 10:19     ` Bartosz Golaszewski
     [not found]       ` <CAKnoXLygqQ5eSfp+bwixtGVKEFnzw0h7XSPV4qXaGjUg_KtJYQ@mail.gmail.com>
2020-01-13 11:56         ` Sekhar Nori
2020-01-10 17:16 ` [PATCH v3 2/3] ARM: davinci: dm365: switch to using the clocksource driver Bartosz Golaszewski
2020-01-10 17:16 ` [PATCH v3 3/3] ARM: davinci: remove legacy timer support Bartosz Golaszewski

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=7be95251-7e26-6090-4770-6e4dbebfadd2@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=bgolaszewski@baylibre.com \
    --cc=brgl@bgdev.pl \
    --cc=david@lechnology.com \
    --cc=khilman@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=tglx@linutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®