diff mbox

[RFC/PATCH,03/11] arm: omap2: timer: remove __omap_gptimer_init()

Message ID 1443559446-26969-4-git-send-email-balbi@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Felipe Balbi Sept. 29, 2015, 8:43 p.m. UTC
since now we can reuse __omap_sync32k_timer_init()
for OMAP3-like devices, we can safely remove
__omap_gptimer_init().

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/timer.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

Comments

Tony Lindgren Oct. 5, 2015, 11:01 a.m. UTC | #1
* Felipe Balbi <balbi@ti.com> [150929 13:48]:
> since now we can reuse __omap_sync32k_timer_init()
> for OMAP3-like devices, we can safely remove
> __omap_gptimer_init().

There are tons of boards out there that need to use the
high frequency ocillator source with gptimer because of the
beagleboard B4 and earlier issue #7. So we need to provide
both options for the boards. Using the high frequency
oscillator source blocks deeper idle states in hardware
so those devices are usable.

Regads,

Tony
Felipe Balbi Oct. 5, 2015, 3:24 p.m. UTC | #2
On Mon, Oct 05, 2015 at 04:01:45AM -0700, Tony Lindgren wrote:
> * Felipe Balbi <balbi@ti.com> [150929 13:48]:
> > since now we can reuse __omap_sync32k_timer_init()
> > for OMAP3-like devices, we can safely remove
> > __omap_gptimer_init().
> 
> There are tons of boards out there that need to use the
> high frequency ocillator source with gptimer because of the
> beagleboard B4 and earlier issue #7. So we need to provide
> both options for the boards. Using the high frequency
> oscillator source blocks deeper idle states in hardware
> so those devices are usable.

have a closer look, that hasn't changed
Tony Lindgren Oct. 5, 2015, 4:02 p.m. UTC | #3
* Felipe Balbi <balbi@ti.com> [151005 08:29]:
> On Mon, Oct 05, 2015 at 04:01:45AM -0700, Tony Lindgren wrote:
> > * Felipe Balbi <balbi@ti.com> [150929 13:48]:
> > > since now we can reuse __omap_sync32k_timer_init()
> > > for OMAP3-like devices, we can safely remove
> > > __omap_gptimer_init().
> > 
> > There are tons of boards out there that need to use the
> > high frequency ocillator source with gptimer because of the
> > beagleboard B4 and earlier issue #7. So we need to provide
> > both options for the boards. Using the high frequency
> > oscillator source blocks deeper idle states in hardware
> > so those devices are usable.
> 
> have a closer look, that hasn't changed

Oh right, you added the argument in the previous patch.
Maybe update the description a bit to make that clear?
I understood that we can only use the sync32k source now..

The __omap_sync32k_timer_init should not be called
"sync32k" as that's TRM name for the always-on counter :)

Regards,

Tony
Felipe Balbi Oct. 5, 2015, 4:08 p.m. UTC | #4
On Mon, Oct 05, 2015 at 09:02:25AM -0700, Tony Lindgren wrote:
> * Felipe Balbi <balbi@ti.com> [151005 08:29]:
> > On Mon, Oct 05, 2015 at 04:01:45AM -0700, Tony Lindgren wrote:
> > > * Felipe Balbi <balbi@ti.com> [150929 13:48]:
> > > > since now we can reuse __omap_sync32k_timer_init()
> > > > for OMAP3-like devices, we can safely remove
> > > > __omap_gptimer_init().
> > > 
> > > There are tons of boards out there that need to use the
> > > high frequency ocillator source with gptimer because of the
> > > beagleboard B4 and earlier issue #7. So we need to provide
> > > both options for the boards. Using the high frequency
> > > oscillator source blocks deeper idle states in hardware
> > > so those devices are usable.
> > 
> > have a closer look, that hasn't changed
> 
> Oh right, you added the argument in the previous patch.
> Maybe update the description a bit to make that clear?
> I understood that we can only use the sync32k source now..
> 
> The __omap_sync32k_timer_init should not be called
> "sync32k" as that's TRM name for the always-on counter :)

that's renamed on a follow-up patch, too ;-)
Tony Lindgren Oct. 5, 2015, 4:30 p.m. UTC | #5
* Felipe Balbi <balbi@ti.com> [151005 09:13]:
> On Mon, Oct 05, 2015 at 09:02:25AM -0700, Tony Lindgren wrote:
> > * Felipe Balbi <balbi@ti.com> [151005 08:29]:
> > > On Mon, Oct 05, 2015 at 04:01:45AM -0700, Tony Lindgren wrote:
> > > > * Felipe Balbi <balbi@ti.com> [150929 13:48]:
> > > > > since now we can reuse __omap_sync32k_timer_init()
> > > > > for OMAP3-like devices, we can safely remove
> > > > > __omap_gptimer_init().
> > > > 
> > > > There are tons of boards out there that need to use the
> > > > high frequency ocillator source with gptimer because of the
> > > > beagleboard B4 and earlier issue #7. So we need to provide
> > > > both options for the boards. Using the high frequency
> > > > oscillator source blocks deeper idle states in hardware
> > > > so those devices are usable.
> > > 
> > > have a closer look, that hasn't changed
> > 
> > Oh right, you added the argument in the previous patch.
> > Maybe update the description a bit to make that clear?
> > I understood that we can only use the sync32k source now..
> > 
> > The __omap_sync32k_timer_init should not be called
> > "sync32k" as that's TRM name for the always-on counter :)
> 
> that's renamed on a follow-up patch, too ;-)

OK so then I suggest updating the description with something
like "With __omap_sync32k_timer_init() now taking the clock
source as a parameter, we no longer need __omap_gptimer_init().
Note that __omap_sync32k_timer_init() gets renamed in the
later patches as it's no longer 32k source specific".

Regards,

Tony
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 4f9cd4b2e6b0..44db46ccd474 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -596,16 +596,6 @@  static inline void __init realtime_counter_init(void)
 {}
 #endif
 
-static void __init __omap_gptimer_init(int clkev_nr, const char *clkev_src,
-		const char *clkev_prop, int clksrc_nr, const char *clksrc_src,
-		const char *clksrc_prop)
-{
-	omap_clk_init();
-	omap_dmtimer_init();
-	omap2_gp_clockevent_init(clkev_nr, clkev_src, clkev_prop);
-	omap2_gptimer_clocksource_init(clksrc_nr, clksrc_src, clksrc_prop);
-}
-
 static void __init __omap_sync32k_timer_init(int clkev_nr, const char *clkev_src,
 		const char *clkev_prop, int clksrc_nr, const char *clksrc_src,
 		const char *clksrc_prop, bool gptimer)
@@ -647,8 +637,8 @@  void __init omap3_secure_sync32k_timer_init(void)
 #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX)
 void __init omap3_gptimer_timer_init(void)
 {
-	__omap_gptimer_init(2, "timer_sys_ck", NULL,
-		       1, "timer_sys_ck", "ti,timer-alwon");
+	__omap_sync32k_timer_init(2, "timer_sys_ck", NULL,
+			1, "timer_sys_ck", "ti,timer-alwon", true);
 }
 #endif