All of lore.kernel.org
 help / color / mirror / Atom feed
From: ivan.khoronzhuk@ti.com (ivan.khoronzhuk)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/3] clocksource: timer-keystone: introduce clocksource driver for Keystone
Date: Thu, 26 Dec 2013 20:40:24 +0200	[thread overview]
Message-ID: <52BC7818.9070409@ti.com> (raw)
In-Reply-To: <20131226182254.GG31766@codeaurora.org>

On 12/26/2013 08:22 PM, Stephen Boyd wrote:
> On 12/25, Ivan Khoronzhuk wrote:
>> +
>> +	/* enable timer interrupts */
>> +	keystone_timer_writel(INTCTLSTAT_ENINT_MASK, INTCTLSTAT);
>> +
>> +	error = request_irq(irq, keystone_timer_interrupt, IRQF_TIMER,
>> +			    TIMER_NAME, event_dev);
>> +	if (error) {
>> +		pr_err("%s: failed to setup irq\n", __func__);
>> +		goto err;
>> +	}
>> +
>> +	/* setup clockevent */
>> +	event_dev->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT;
>> +	event_dev->set_next_event = keystone_set_next_event;
>> +	event_dev->set_mode = keystone_set_mode;
>> +	event_dev->cpumask = cpu_all_mask;
>> +	event_dev->owner = THIS_MODULE;
>> +	event_dev->name = TIMER_NAME;
>> +	event_dev->irq = irq;
>> +
>> +	clockevents_config_and_register(event_dev, rate, 1, ULONG_MAX);
>> +
> 
> I hope you don't get an interrupt before you register the
> clockevent. You might want to reorder the interrupt request and
> the clockevent registration so that it isn't a problem. Other
> than that you can have my
> 
> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
> 

Thanks.

While interrupt enabling the timer is disabled, so it cannot generate interrupt.
The timer will be enabled when next event is set by clockevent core.


-- 
Regards,
Ivan Khoronzhuk

  reply	other threads:[~2013-12-26 18:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-25 12:32 [PATCH v3 0/3] Introduce clocksource driver for Keystone platform Ivan Khoronzhuk
2013-12-25 12:32 ` [PATCH v3 1/3] clocksource: timer-keystone: introduce clocksource driver for Keystone Ivan Khoronzhuk
2013-12-26 17:58   ` Santosh Shilimkar
2013-12-26 18:22   ` Stephen Boyd
2013-12-26 18:40     ` ivan.khoronzhuk [this message]
2013-12-26 19:42       ` Stephen Boyd
2013-12-25 12:32 ` [PATCH v3 2/3] clocksource: keystone: add bindings for keystone timer Ivan Khoronzhuk
2013-12-26 18:00   ` Santosh Shilimkar
2013-12-25 12:32 ` [PATCH v3 3/3] arm: dts: keystone: add keystone timer entry Ivan Khoronzhuk
2013-12-26 18:02   ` Santosh Shilimkar
2013-12-28 19:07     ` Daniel Lezcano
2013-12-29 19:23       ` Santosh Shilimkar
2014-01-13 11:28       ` ivan.khoronzhuk
2014-01-13 13:14         ` Daniel Lezcano
2014-01-13 14:20           ` Santosh Shilimkar

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=52BC7818.9070409@ti.com \
    --to=ivan.khoronzhuk@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 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.