Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1175056 > unrolled thread
| Started by | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| First post | 2015-07-01 10:00 +0200 |
| Last post | 2015-07-01 10:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v2 4/9] arm: twr-k70f120m: timer driver for Kinetis SoC Thomas Gleixner <tglx@linutronix.de> - 2015-07-01 10:00 +0200
Re: [PATCH v2 4/9] arm: twr-k70f120m: timer driver for Kinetis SoC Paul Osmialowski <pawelo@king.net.pl> - 2015-07-01 10:50 +0200
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Date | 2015-07-01 10:00 +0200 |
| Subject | Re: [PATCH v2 4/9] arm: twr-k70f120m: timer driver for Kinetis SoC |
| Message-ID | <pHl62-2i0-13@gated-at.bofh.it> |
On Tue, 30 Jun 2015, Paul Osmialowski wrote:
> +static struct kinetis_clock_event_ddata
> + kinetis_clockevent_tmrs[KINETIS_PIT_CHANNELS] = {
> + {
> + .evtdev = {
> + .name = "kinetis-clockevent0",
> + .rating = 200,
> + .features =
> + CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
> + .set_next_event = kinetis_clockevent_tmr_set_next_event,
> + .set_state_periodic =
> + kinetis_clockevent_tmr_set_state_periodic,
> + .set_state_oneshot =
> + kinetis_clockevent_tmr_set_state_oneshot,
> + .set_state_oneshot_stopped =
> + kinetis_clockevent_tmr_set_state_oneshot,
> + .set_state_shutdown =
> + kinetis_clockevent_tmr_set_state_oneshot,
> + },
> + },
> + {
> + .evtdev = {
> + .name = "kinetis-clockevent1",
> + },
So how is that supposed to work if timer 1,2 or 3 is selected from
device tree? The function pointers are not initialized.
You really do not need that array at all. You can simply set the name
at init time.
> + clockevents_register_device(
> + &kinetis_clockevent_tmrs[chan].evtdev);
> +
> + kinetis_pit_init(&kinetis_clockevent_tmrs[chan],
> + (rate / HZ) - 1);
> + kinetis_pit_enable(&kinetis_clockevent_tmrs[chan], 1);
No point doing this. The core code has invoked the set_periodic call
back via clockevents_register_device() already.
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Paul Osmialowski <pawelo@king.net.pl> |
|---|---|
| Date | 2015-07-01 10:50 +0200 |
| Message-ID | <pHlSp-2Rg-1@gated-at.bofh.it> |
| In reply to | #1175056 |
Hi Thomas, On Wed, 1 Jul 2015, Thomas Gleixner wrote: >> + clockevents_register_device( >> + &kinetis_clockevent_tmrs[chan].evtdev); >> + >> + kinetis_pit_init(&kinetis_clockevent_tmrs[chan], >> + (rate / HZ) - 1); >> + kinetis_pit_enable(&kinetis_clockevent_tmrs[chan], 1); > > No point doing this. The core code has invoked the set_periodic call > back via clockevents_register_device() already. > As I removed this kinetis_pit_enable() line, the timer did not start, therefore the system became unusable. What could be possible reason for that? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web