Skip to content

Commit b65d124

Browse files
Keerthyjtmlind
authored andcommitted
ARM: OMAP: timer: Wrap the inline functions under OMAP2PLUS define
Wrap the inline functions under OMAP2PLUS/OMAP1 defines. This patch also inlines omap_dm_timer_get_fclk function for non OMAP1 Config. Signed-off-by: Keerthy <j-keerthy@ti.com> Tested-by: Ladislav Michl <ladis@linux-mips.org> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Tony Lindgren <tony@atomide.com>
1 parent fc6db34 commit b65d124

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

‎arch/arm/plat-omap/include/plat/dmtimer.h‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,16 @@ void omap_dm_timer_disable(struct omap_dm_timer *timer);
132132
int omap_dm_timer_get_irq(struct omap_dm_timer *timer);
133133

134134
u32 omap_dm_timer_modify_idlect_mask(u32 inputmask);
135+
136+
#ifndef CONFIG_ARCH_OMAP1
135137
struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer);
138+
#else
139+
static inline
140+
struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer)
141+
{
142+
return NULL;
143+
}
144+
#endif
136145

137146
int omap_dm_timer_trigger(struct omap_dm_timer *timer);
138147
int omap_dm_timer_start(struct omap_dm_timer *timer);
@@ -272,6 +281,12 @@ int omap_dm_timers_active(void);
272281
#define OMAP_TIMER_TICK_INT_MASK_COUNT_REG \
273282
(_OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET | (WP_TOWR << WPSHIFT))
274283

284+
/*
285+
* The below are inlined to optimize code size for system timers. Other code
286+
* should not need these at all, see
287+
* include/linux/platform_data/pwm_omap_dmtimer.h
288+
*/
289+
#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
275290
static inline u32 __omap_dm_timer_read(struct omap_dm_timer *timer, u32 reg,
276291
int posted)
277292
{
@@ -410,5 +425,5 @@ static inline void __omap_dm_timer_write_status(struct omap_dm_timer *timer,
410425
{
411426
writel_relaxed(value, timer->irq_stat);
412427
}
413-
428+
#endif /* CONFIG_ARCH_OMAP1 || CONFIG_ARCH_OMAP2PLUS */
414429
#endif /* __ASM_ARCH_DMTIMER_H */

0 commit comments

Comments
 (0)