linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: joelf@ti.com (Joel Fernandes)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/8] ARM: OMAP: Move public portion of dmtimer.h to include/linux/omap-timer.h
Date: Tue, 26 Nov 2013 13:52:41 -0600	[thread overview]
Message-ID: <5294FC09.2080604@ti.com> (raw)
In-Reply-To: <20131126182908.GK26766@atomide.com>

On 11/26/2013 12:29 PM, Tony Lindgren wrote:
[..]
>>> We can implement an irqchip and a clocksource in the dmtimer code for the
>>> client drivers to use, and after that we only have a couple of dmtimer
>>> specific functions left to export.
>>>
>>> I'm thinkging some thing like this for the public API:
>>>
>>> omap_dm_timer_request			request_irq
>>> omap_dm_timer_request_specific		request_irq
>>> omap_dm_timer_get_irq			request_irq
>>> omap_dm_timer_set_source		clk_set_rate
>>
>> For clk_set_rate, how would one directly access the timer node if we've hidden
>> it behind an irq chip abstraction?
>>
>> per your suggestion, one would have something like:
>>
>> dsp {
>>     interrupt-parent = <&timer1>;
>> }
>>
>> so how do you clk_set_rate rate something like this given the dsp node?
> 
> All you have to do is implement a clocksource driver in dmtimer.c code.
>  
>> If the suggestion is to get the timer1 node from the interrupt-parent property,
>> if I may say- that's a bit ugly because now you're breaking the irq chip
>> abstraction just to access the timer node..
> 
> Hmm sorry I don't follow you here.

I assumed above that you were suggesting implementing interrupt chaining like
gpio-omap driver.

Can you give an example workflow to explain your suggestion?

I'll tell you how I understand what you were suggesting and then you can correct
me, and maybe we can meet somewhere:

Typically *without* irqchip or chaining what you suggested, we would  have
something like (purely an example):
dsp {
    timer = <&timer1>;
}

There is an API:
omap_dm_timer *omap_dm_timer_request_by_node(struct device_node *np); that one
would use.

Now moving to your suggestion, the dts would look like:
dsp {
    interrupt-parrent = <&timer1>;
    interrupts = <1>;
}

Naturally some APIs will not fit into the IRQ framework, so these subset of
dmtimer API may need to be exposed as you pointed. To use the API, the timer has
to first be retrieved from interrupt-parent property of "dsp" here to get a
device_node, and then the timer has to be requested and subset API used on it.
This is "hack" that's not acceptable according to me...

thanks,

-Joel

  reply	other threads:[~2013-11-26 19:52 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-22  1:56 [PATCH 0/8] OMAP: timers: Preparation for migration to clocksource Joel Fernandes
2013-11-22  1:56 ` [PATCH 1/8] ARM: OMAP: Move public portion of dmtimer.h to include/linux/omap-timer.h Joel Fernandes
2013-11-22 15:33   ` Tony Lindgren
2013-11-22 16:01     ` Joel Fernandes
2013-11-26  3:02     ` Joel Fernandes
2013-11-26 18:29       ` Tony Lindgren
2013-11-26 19:52         ` Joel Fernandes [this message]
2013-11-26 20:32           ` Tony Lindgren
2013-11-22  1:56 ` [PATCH 2/8] rc: ir-rx51: Use clk API to get clock rate Joel Fernandes
2013-11-22  1:56 ` [PATCH 3/8] rc: ir-rx51: Turn ON ir-rx51 as it should work for MULTIPLATFORM Joel Fernandes
2013-11-22  1:56 ` [PATCH 4/8] ARM: OMAP4: timer: Remove non-DT code for TWD timer Joel Fernandes
2013-11-22  1:56 ` [PATCH 5/8] ARM: OMAP2+: timer: Introduce OF-friendly clocksource/clockevent system timers Joel Fernandes
2013-11-22  3:51   ` Felipe Balbi
2013-11-22 15:09     ` Joel Fernandes
2013-11-22 15:58   ` Rob Herring
2013-11-22 16:42     ` Joel Fernandes
2013-11-22 20:01       ` Rob Herring
2013-11-23  1:12         ` Joel Fernandes
2013-11-23  1:22           ` Joel Fernandes
2013-11-23 16:26           ` Rob Herring
2013-11-22  1:56 ` [PATCH 6/8] devicetree: doc: Document ti,timer-parent property Joel Fernandes
2013-11-22 15:58   ` Tony Lindgren
2013-11-22 16:36     ` Joel Fernandes
2013-11-22 17:08       ` Tony Lindgren
2013-11-23  0:31         ` Joel Fernandes
2013-11-23  0:52           ` Tony Lindgren
2013-11-22 17:05     ` Joel Fernandes
2013-11-22 17:11       ` Tony Lindgren
2013-11-22  1:56 ` [PATCH 7/8] ARM: DTS: am33xx: Provide the " Joel Fernandes
2013-11-22  1:56 ` [PATCH 8/8] ARM: AM33xx: Move to using omap_generic_timer_init for init_time Joel Fernandes

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=5294FC09.2080604@ti.com \
    --to=joelf@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).