From: Jon Hunter <jon-hunter@ti.com>
To: Paul Walmsley <paul@pwsan.com>
Cc: linux-omap <linux-omap@vger.kernel.org>,
Tony Lindgren <tony@atomide.com>,
Tarun Kanti DebBarma <tarun.kanti@ti.com>
Subject: Re: [PATCH V4 12/12] ARM: OMAP2+: Simplify dmtimer clock aliases
Date: Fri, 15 Jun 2012 10:27:10 -0500 [thread overview]
Message-ID: <4FDB544E.1010906@ti.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1206141417560.18430@utopia.booyaka.com>
Hi Paul,
On 06/14/2012 03:31 PM, Paul Walmsley wrote:
> Hi Jon
>
> On Tue, 5 Jun 2012, Jon Hunter wrote:
>
>> The OMAP dmtimer driver allows you to dynamically configure the functional
>> clock that drives the timer logic. The dmtimer driver uses the device name and
>> a "con-id" string to search for the appropriate functional clock.
>>
>> Currently, we define a clock alias for each functional clock source each timer
>> supports. Some functional clock sources are common to all of the timers on a
>> device and so for these clock sources we can use a single alias with a unique
>> con-id string.
>>
>> The possible functional clock sources for an OMAP device are a 32kHz clock,
>> a system (MHz range) clock and (for OMAP2 only) an external clock. By defining
>> a unique con-id name for each of these (timer_32k_ck, timer_sys_ck and
>> timer_ext_ck) we can eliminate a lot of the clock aliases for timers. This
>> reduces code, speeds-up searches and clock initialisation time.
>>
>> Signed-off-by: Jon Hunter <jon-hunter@ti.com>
>
> Sorry to make you change this, but how about adding the optional clock
> aliases to the hwmod data instead?
Yes, we can do. However, technically these are not optional clocks but
parents clocks. So if you are ok with that we can.
> So rather than:
>
>> + CLK(NULL, "timer_32k_ck", &func_32k_ck, CK_243X),
>> + CLK(NULL, "timer_sys_ck", &sys_ck, CK_243X),
>> + CLK(NULL, "timer_ext_ck", &alt_ck, CK_243X),
>
> add something like (rough example):
>
> static struct omap_hwmod_opt_clk timer_opt_clks[] = {
> { .role = "32k", .clk = "func_32k_ck" },
> { .role = "sys", .clk = "sys_ck" },
> { .role = "alt", .clk = "alt_ck" },
> };
>
> and then add the .opt_clks and .opt_clks_cnt fields to the struct
> omap_hwmod records; see for example omap44xx_dss_hwmod.
>
> Doing it this way will remove the clkdev entries, which we're trying to
> get rid of. I hope also that these should be auto-generatable from the
> hardware data at some point. And adding the opt_clk data should result in
> a faster search time for these aliases, since only the omap_hwmod_opt_clk
> records would need to be iterated over, rather than the clkdev data which
> is quite a bit larger.
Ok, but what it not clear to me is how I retrieve the clock handle from
the driver. Is there an API I can use to retrieve the optional clocks
using the device structure? In other words, similar to clk_get()?
Cheers
Jon
next prev parent reply other threads:[~2012-06-15 15:27 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-05 17:34 [PATCH V4 00/12] ARM: OMAP: DMTIMER clean-up and fixes in preparation for device-tree Jon Hunter
2012-06-05 17:34 ` [PATCH V4 01/12] ARM: OMAP: Remove unnecessary clk structure Jon Hunter
2012-06-05 17:34 ` [PATCH V4 02/12] ARM: OMAP2+: Remove unused max number of timers definition Jon Hunter
2012-06-05 17:34 ` [PATCH V4 03/12] ARM: OMAP2+: Add dmtimer platform function to reserve systimers Jon Hunter
2012-06-05 17:34 ` [PATCH V4 04/12] ARM: OMAP: Add DMTIMER capability variable to represent timer features Jon Hunter
2012-06-05 17:34 ` [PATCH V4 05/12] ARM: OMAP2+: HWMOD: Correct timer device attributes Jon Hunter
2012-06-08 7:40 ` Tony Lindgren
2012-06-13 23:53 ` Paul Walmsley
2012-06-14 9:44 ` Tony Lindgren
2012-06-13 23:53 ` Paul Walmsley
2012-06-05 17:34 ` [PATCH V4 06/12] ARM: OMAP2+: Fix external clock support for dmtimers Jon Hunter
2012-06-05 17:34 ` [PATCH V4 07/12] ARM: OMAP: Remove loses_context variable from timer platform data Jon Hunter
2012-06-05 17:34 ` [PATCH V4 08/12] ARM: OMAP: Remove timer function pointer for context loss counter Jon Hunter
2012-06-05 17:34 ` [PATCH V4 09/12] ARM: OMAP: Add flag to indicate if a timer needs a manual reset Jon Hunter
2012-06-05 17:34 ` [PATCH V4 10/12] ARM: OMAP1: Fix dmtimer support Jon Hunter
2012-06-05 17:34 ` [PATCH V4 11/12] ARM: OMAP2+: Move dmtimer clock set function to dmtimer driver Jon Hunter
2012-06-05 17:35 ` [PATCH V4 12/12] ARM: OMAP2+: Simplify dmtimer clock aliases Jon Hunter
2012-06-14 20:31 ` Paul Walmsley
2012-06-15 15:27 ` Jon Hunter [this message]
2012-06-16 1:34 ` Paul Walmsley
2012-06-16 1:38 ` Paul Walmsley
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=4FDB544E.1010906@ti.com \
--to=jon-hunter@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=tarun.kanti@ti.com \
--cc=tony@atomide.com \
/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.