All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Igor Grinberg <grinberg@compulab.co.il>
Cc: Kevin Hilman <khilman@ti.com>, Paul Walmsley <paul@pwsan.com>,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Jon Hunter <jon-hunter@ti.com>,
	Santosh Shilimkar <santosh.shilimkar@ti.com>,
	Vaibhav Hiremath <hvaibhav@ti.com>
Subject: Re: [PATCH] ARM: OMAP2+: timer: remove CONFIG_OMAP_32K_TIMER
Date: Wed, 7 Nov 2012 09:33:43 -0800	[thread overview]
Message-ID: <20121107173343.GF6801@atomide.com> (raw)
In-Reply-To: <1352299344-8011-1-git-send-email-grinberg@compulab.co.il>

* Igor Grinberg <grinberg@compulab.co.il> [121107 06:44]:
> CONFIG_OMAP_32K_TIMER is kind of standing on the single zImage way.
> Make OMAP2+ timer code independant from the CONFIG_OMAP_32K_TIMER
> setting.
> To remove the dependancy, several conversions/additions had to be done:
> 1) Timer structures and initialization functions are named by the platform
>    name and the clock source in use. The decision which timer is
>    used is done statically from the machine_desc structure. In the
>    future it should come from DT.
> 2) Settings under the CONFIG_OMAP_32K_TIMER option are expanded into
>    separate timer structures along with the timer init functions.
>    This removes the CONFIG_OMAP_32K_TIMER on OMAP2+ timer code.

I think this should be the default for the timers as that counter
does not stop during deeper idle states.

> 3) Since we have all the timers defined inside machine_desc structure
>    and we no longer need the fallback to gp_timer clock source in case
>    32k_timer clock source is unavailable (namely on AM33xx), we no
>    longer need the #ifdef around __omap2_sync32k_clocksource_init()
>    function. Remove the #ifdef CONFIG_OMAP_32K_TIMER around the
>    __omap2_sync32k_clocksource_init() function.
> 
> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
> Cc: Jon Hunter <jon-hunter@ti.com>
> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Cc: Vaibhav Hiremath <hvaibhav@ti.com>
> ---
> Finally I'm sending this out...
> I've lost following Tony's branches and deciding which one to base on,
> so I used linux-omap/master as a base for the patch.
> Tony, tell me if you want it based on some other branch.
> This has been compile tested on omap1|2plus_defconfig only.

Yes sorry it's been a bit crazy with branches to get this
header clean up done.. If it applies to master it should
be easy to apply on others.

> --- a/arch/arm/mach-omap2/board-2430sdp.c
> +++ b/arch/arm/mach-omap2/board-2430sdp.c
> @@ -284,6 +284,6 @@ MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
>  	.handle_irq	= omap2_intc_handle_irq,
>  	.init_machine	= omap_2430sdp_init,
>  	.init_late	= omap2430_init_late,
> -	.timer		= &omap2_timer,
> +	.timer		= &omap2_sync32k_timer,
>  	.restart	= omap_prcm_restart,
>  MACHINE_END
> --- a/arch/arm/mach-omap2/board-3430sdp.c
> +++ b/arch/arm/mach-omap2/board-3430sdp.c
> @@ -596,6 +596,6 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
>  	.handle_irq	= omap3_intc_handle_irq,
>  	.init_machine	= omap_3430sdp_init,
>  	.init_late	= omap3430_init_late,
> -	.timer		= &omap3_timer,
> +	.timer		= &omap3_sync32k_timer,
>  	.restart	= omap_prcm_restart,
>  MACHINE_END
...

Can't we assume that the default timer is omap[234]_sync32k_timer to
avoid renaming the timer entries in all the board files?

Then we just need a new timer entries for the hardware that does
not have the sycn32k_timer available?

Regards,

Tony

WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: OMAP2+: timer: remove CONFIG_OMAP_32K_TIMER
Date: Wed, 7 Nov 2012 09:33:43 -0800	[thread overview]
Message-ID: <20121107173343.GF6801@atomide.com> (raw)
In-Reply-To: <1352299344-8011-1-git-send-email-grinberg@compulab.co.il>

* Igor Grinberg <grinberg@compulab.co.il> [121107 06:44]:
> CONFIG_OMAP_32K_TIMER is kind of standing on the single zImage way.
> Make OMAP2+ timer code independant from the CONFIG_OMAP_32K_TIMER
> setting.
> To remove the dependancy, several conversions/additions had to be done:
> 1) Timer structures and initialization functions are named by the platform
>    name and the clock source in use. The decision which timer is
>    used is done statically from the machine_desc structure. In the
>    future it should come from DT.
> 2) Settings under the CONFIG_OMAP_32K_TIMER option are expanded into
>    separate timer structures along with the timer init functions.
>    This removes the CONFIG_OMAP_32K_TIMER on OMAP2+ timer code.

I think this should be the default for the timers as that counter
does not stop during deeper idle states.

> 3) Since we have all the timers defined inside machine_desc structure
>    and we no longer need the fallback to gp_timer clock source in case
>    32k_timer clock source is unavailable (namely on AM33xx), we no
>    longer need the #ifdef around __omap2_sync32k_clocksource_init()
>    function. Remove the #ifdef CONFIG_OMAP_32K_TIMER around the
>    __omap2_sync32k_clocksource_init() function.
> 
> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
> Cc: Jon Hunter <jon-hunter@ti.com>
> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Cc: Vaibhav Hiremath <hvaibhav@ti.com>
> ---
> Finally I'm sending this out...
> I've lost following Tony's branches and deciding which one to base on,
> so I used linux-omap/master as a base for the patch.
> Tony, tell me if you want it based on some other branch.
> This has been compile tested on omap1|2plus_defconfig only.

Yes sorry it's been a bit crazy with branches to get this
header clean up done.. If it applies to master it should
be easy to apply on others.

> --- a/arch/arm/mach-omap2/board-2430sdp.c
> +++ b/arch/arm/mach-omap2/board-2430sdp.c
> @@ -284,6 +284,6 @@ MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
>  	.handle_irq	= omap2_intc_handle_irq,
>  	.init_machine	= omap_2430sdp_init,
>  	.init_late	= omap2430_init_late,
> -	.timer		= &omap2_timer,
> +	.timer		= &omap2_sync32k_timer,
>  	.restart	= omap_prcm_restart,
>  MACHINE_END
> --- a/arch/arm/mach-omap2/board-3430sdp.c
> +++ b/arch/arm/mach-omap2/board-3430sdp.c
> @@ -596,6 +596,6 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
>  	.handle_irq	= omap3_intc_handle_irq,
>  	.init_machine	= omap_3430sdp_init,
>  	.init_late	= omap3430_init_late,
> -	.timer		= &omap3_timer,
> +	.timer		= &omap3_sync32k_timer,
>  	.restart	= omap_prcm_restart,
>  MACHINE_END
...

Can't we assume that the default timer is omap[234]_sync32k_timer to
avoid renaming the timer entries in all the board files?

Then we just need a new timer entries for the hardware that does
not have the sycn32k_timer available?

Regards,

Tony

  reply	other threads:[~2012-11-07 17:33 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-07 14:42 [PATCH] ARM: OMAP2+: timer: remove CONFIG_OMAP_32K_TIMER Igor Grinberg
2012-11-07 14:42 ` Igor Grinberg
2012-11-07 17:33 ` Tony Lindgren [this message]
2012-11-07 17:33   ` Tony Lindgren
2012-11-08  7:13   ` Igor Grinberg
2012-11-08  7:13     ` Igor Grinberg
2012-11-08 16:20     ` Tony Lindgren
2012-11-08 16:20       ` Tony Lindgren
2012-11-08 17:09       ` Hiremath, Vaibhav
2012-11-08 17:09         ` Hiremath, Vaibhav
2012-11-11  9:16       ` Igor Grinberg
2012-11-11  9:16         ` Igor Grinberg
2012-11-12 19:05         ` Jon Hunter
2012-11-12 19:05           ` Jon Hunter
2012-11-13  9:08           ` Igor Grinberg
2012-11-13  9:08             ` Igor Grinberg
2012-11-12 22:06         ` Tony Lindgren
2012-11-12 22:06           ` Tony Lindgren
2012-11-07 21:36 ` Jon Hunter
2012-11-07 21:36   ` Jon Hunter
2012-11-08  7:59   ` Igor Grinberg
2012-11-08  7:59     ` Igor Grinberg
2012-11-08 16:16     ` Jon Hunter
2012-11-08 16:16       ` Jon Hunter
2012-11-08 17:08       ` Hiremath, Vaibhav
2012-11-08 17:08         ` Hiremath, Vaibhav
2012-11-08 17:39         ` Jon Hunter
2012-11-08 17:39           ` Jon Hunter
2012-11-08 17:47           ` Hiremath, Vaibhav
2012-11-08 17:47             ` Hiremath, Vaibhav
2012-11-08 17:58             ` Jon Hunter
2012-11-08 17:58               ` Jon Hunter
2012-11-08 18:06               ` Hiremath, Vaibhav
2012-11-08 18:06                 ` Hiremath, Vaibhav
2012-11-08 18:13                 ` Jon Hunter
2012-11-08 18:13                   ` Jon Hunter
2012-11-08 18:28                   ` Hiremath, Vaibhav
2012-11-08 18:28                     ` Hiremath, Vaibhav
2012-11-08 18:47                     ` Jon Hunter
2012-11-08 18:47                       ` Jon Hunter
2012-11-09  0:55                 ` Jon Hunter
2012-11-09  0:55                   ` Jon Hunter
2012-11-12  6:42                   ` Hiremath, Vaibhav
2012-11-12  6:42                     ` Hiremath, Vaibhav
2012-11-08 17:58           ` Paul Walmsley
2012-11-08 17:58             ` Paul Walmsley
2012-11-08 18:08             ` Jon Hunter
2012-11-08 18:08               ` Jon Hunter
2012-11-08 18:17               ` Paul Walmsley
2012-11-08 18:17                 ` Paul Walmsley
2012-11-08 18:34                 ` Jon Hunter
2012-11-08 18:34                   ` Jon Hunter
2012-11-11 11:35                   ` Igor Grinberg
2012-11-11 11:35                     ` Igor Grinberg
2012-11-12  6:38                     ` Hiremath, Vaibhav
2012-11-12  6:38                       ` Hiremath, Vaibhav
2012-11-12  7:24                       ` Igor Grinberg
2012-11-12  7:24                         ` Igor Grinberg
2012-11-12 10:40                         ` Hiremath, Vaibhav
2012-11-12 10:40                           ` Hiremath, Vaibhav
2012-12-10 20:49                     ` Paul Walmsley
2012-12-10 20:49                       ` Paul Walmsley
2012-12-14 23:58         ` Russ Dill
2012-12-14 23:58           ` Russ Dill
2012-11-11 11:25       ` Igor Grinberg
2012-11-11 11:25         ` Igor Grinberg
2012-11-08 18:54     ` Jon Hunter
2012-11-08 18:54       ` Jon Hunter
2012-11-08 18:59       ` Hiremath, Vaibhav
2012-11-08 18:59         ` Hiremath, Vaibhav
2012-11-08 19:16         ` Jon Hunter
2012-11-08 19:16           ` Jon Hunter
2012-11-11 11:28           ` Igor Grinberg
2012-11-11 11:28             ` Igor Grinberg
2012-11-12 19:15             ` Jon Hunter
2012-11-12 19:15               ` Jon Hunter
2012-11-13  9:14               ` Igor Grinberg
2012-11-13  9:14                 ` Igor Grinberg
2012-11-13 16:13                 ` Jon Hunter
2012-11-13 16:13                   ` Jon Hunter
2012-11-14  7:23                   ` Igor Grinberg
2012-11-14  7:23                     ` Igor Grinberg
2012-11-12 10:38           ` Hiremath, Vaibhav
2012-11-12 10:38             ` Hiremath, Vaibhav
2012-11-12 11:01             ` Benoit Cousson
2012-11-12 11:01               ` Benoit Cousson

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=20121107173343.GF6801@atomide.com \
    --to=tony@atomide.com \
    --cc=grinberg@compulab.co.il \
    --cc=hvaibhav@ti.com \
    --cc=jon-hunter@ti.com \
    --cc=khilman@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=santosh.shilimkar@ti.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.