@@ -133,6 +133,7 @@ struct dmtimer {
133
133
unsigned long rate ;
134
134
unsigned reserved :1 ;
135
135
unsigned posted :1 ;
136
+ unsigned omap1 :1 ;
136
137
struct timer_regs context ;
137
138
int revision ;
138
139
u32 capability ;
@@ -423,7 +424,7 @@ static int omap_dm_timer_set_source(struct omap_dm_timer *cookie, int source)
423
424
* use the clock framework to set the parent clock. To be removed
424
425
* once OMAP1 migrated to using clock framework for dmtimers
425
426
*/
426
- if (pdata && pdata -> set_timer_src )
427
+ if (timer -> omap1 && pdata && pdata -> set_timer_src )
427
428
return pdata -> set_timer_src (timer -> pdev , source );
428
429
429
430
#if defined(CONFIG_COMMON_CLK )
@@ -476,7 +477,7 @@ static int omap_dm_timer_prepare(struct dmtimer *timer)
476
477
* FIXME: OMAP1 devices do not use the clock framework for dmtimers so
477
478
* do not call clk_get() for these devices.
478
479
*/
479
- if (!( timer -> capability & OMAP_TIMER_NEEDS_RESET ) ) {
480
+ if (!timer -> omap1 ) {
480
481
timer -> fclk = clk_get (& timer -> pdev -> dev , "fck" );
481
482
if (WARN_ON_ONCE (IS_ERR (timer -> fclk ))) {
482
483
dev_err (& timer -> pdev -> dev , ": No fclk handle.\n" );
@@ -763,7 +764,7 @@ static int omap_dm_timer_stop(struct omap_dm_timer *cookie)
763
764
764
765
dev = & timer -> pdev -> dev ;
765
766
766
- if (!( timer -> capability & OMAP_TIMER_NEEDS_RESET ) )
767
+ if (!timer -> omap1 )
767
768
rate = clk_get_rate (timer -> fclk );
768
769
769
770
__omap_dm_timer_stop (timer , rate );
@@ -1119,6 +1120,8 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
1119
1120
timer -> reserved = omap_dm_timer_reserved_systimer (timer -> id );
1120
1121
}
1121
1122
1123
+ timer -> omap1 = timer -> capability & OMAP_TIMER_NEEDS_RESET ;
1124
+
1122
1125
if (!(timer -> capability & OMAP_TIMER_ALWON )) {
1123
1126
timer -> nb .notifier_call = omap_timer_context_notifier ;
1124
1127
cpu_pm_register_notifier (& timer -> nb );
0 commit comments