aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2011-09-21 16:38:51 -0700
committerTony Lindgren <tony@atomide.com>2011-09-21 16:38:51 -0700
commit0dad9faeaeb0fa3524068a94e1745b91e5597c17 (patch)
tree2dbe24ec9964d605ea39756ed320524901324f17 /arch/arm/plat-omap
parentffe07ceae1ae4b00b776c59694eddd9dd615dcea (diff)
downloadkernel_samsung_smdk4412-0dad9faeaeb0fa3524068a94e1745b91e5597c17.zip
kernel_samsung_smdk4412-0dad9faeaeb0fa3524068a94e1745b91e5597c17.tar.gz
kernel_samsung_smdk4412-0dad9faeaeb0fa3524068a94e1745b91e5597c17.tar.bz2
ARM: OMAP: dmtimer: skip reserved timers
Pass the reserved flag in pdata and use it. We can now make sys_timer_reserved static to mach-omap2/timer.c. Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r--arch/arm/plat-omap/dmtimer.c7
-rw-r--r--arch/arm/plat-omap/include/plat/dmtimer.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index ac904c2..c8df3c3 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -509,6 +509,7 @@ static int __devinit omap_dm_timer_probe(struct platform_device *pdev)
timer->id = pdev->id;
timer->irq = irq->start;
+ timer->reserved = pdata->reserved;
timer->pdev = pdev;
/* Skip pm_runtime_enable for OMAP1 */
@@ -517,6 +518,12 @@ static int __devinit omap_dm_timer_probe(struct platform_device *pdev)
pm_runtime_irq_safe(&pdev->dev);
}
+ if (!timer->reserved) {
+ pm_runtime_get_sync(&pdev->dev);
+ __omap_dm_timer_init_regs(timer);
+ pm_runtime_put(&pdev->dev);
+ }
+
/* add the timer element to the list */
spin_lock_irqsave(&dm_timer_lock, flags);
list_add_tail(&timer->node, &omap_timer_list);
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
index 4e3a326..29764c3 100644
--- a/arch/arm/plat-omap/include/plat/dmtimer.h
+++ b/arch/arm/plat-omap/include/plat/dmtimer.h
@@ -77,6 +77,7 @@ struct dmtimer_platform_data {
int (*set_timer_src)(struct platform_device *pdev, int source);
int timer_ip_version;
u32 needs_manual_reset:1;
+ bool reserved;
};
struct omap_dm_timer *omap_dm_timer_request(void);
@@ -248,7 +249,6 @@ struct omap_dm_timer {
struct list_head node;
};
-extern u32 sys_timer_reserved;
int omap_dm_timer_prepare(struct omap_dm_timer *timer);
static inline u32 __omap_dm_timer_read(struct omap_dm_timer *timer, u32 reg,