linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: nsekhar@ti.com (Sekhar Nori)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: davinci: convert to clockevents_config_and_register
Date: Wed, 16 Oct 2013 08:49:17 +0530	[thread overview]
Message-ID: <525E05B5.8060801@ti.com> (raw)
In-Reply-To: <1381653390-22250-1-git-send-email-u.kleine-koenig@pengutronix.de>

On Sunday 13 October 2013 02:06 PM, Uwe Kleine-K?nig wrote:
> clockevents_config_and_register is superior compared to setting
> shift/mult and {min,max}_delta_ns by hand.
> 
> Tested-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> ---
> Prabhakar Lad wrote:
>> I have boot tested this patch on OMAP-L138 and tested the uptime
>> (with min ticks set to 1), should that be enough ?
> I don't know for sure, but I guess so. If you agree, here is an updated
> patch.
> 
> Best regards
> Uwe
> 
> 
>  arch/arm/mach-davinci/time.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c
> index 7a55b5c..29a1a5d 100644
> --- a/arch/arm/mach-davinci/time.c
> +++ b/arch/arm/mach-davinci/time.c
> @@ -331,7 +331,6 @@ static void davinci_set_mode(enum clock_event_mode mode,
>  
>  static struct clock_event_device clockevent_davinci = {
>  	.features       = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
> -	.shift		= 32,
>  	.set_next_event	= davinci_set_next_event,
>  	.set_mode	= davinci_set_mode,
>  };
> @@ -397,14 +396,10 @@ void __init davinci_timer_init(void)
>  
>  	/* setup clockevent */
>  	clockevent_davinci.name = id_to_name[timers[TID_CLOCKEVENT].id];
> -	clockevent_davinci.mult = div_sc(davinci_clock_tick_rate, NSEC_PER_SEC,
> -					 clockevent_davinci.shift);
> -	clockevent_davinci.max_delta_ns =
> -		clockevent_delta2ns(0xfffffffe, &clockevent_davinci);
> -	clockevent_davinci.min_delta_ns = 50000; /* 50 usec */
>  
>  	clockevent_davinci.cpumask = cpumask_of(0);
> -	clockevents_register_device(&clockevent_davinci);
> +	clockevents_config_and_register(&clockevent_davinci,
> +		davinci_clock_tick_rate, 1, 0xfffffffe);

checkpatch --strict complains about alignment of line break. Fixed locally.

Thanks,
Sekhar

  reply	other threads:[~2013-10-16  3:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-24 22:02 [PATCH] ARM: davinci: convert to clockevents_config_and_register Uwe Kleine-König
2013-10-08 14:57 ` Uwe Kleine-König
2013-10-08 15:07   ` Sekhar Nori
2013-10-12 16:22 ` Sekhar Nori
2013-10-13  6:55   ` Prabhakar Lad
2013-10-13  8:36     ` [PATCH v2] " Uwe Kleine-König
2013-10-16  3:19       ` Sekhar Nori [this message]
2013-10-16  7:50         ` Uwe Kleine-König
2013-10-16 16:38           ` Sekhar Nori

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=525E05B5.8060801@ti.com \
    --to=nsekhar@ti.com \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).