Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 272691
b: refs/heads/master
c: ffe07ce
h: refs/heads/master
i:
  272689: 9888c1d
  272687: c12e531
v: v3
  • Loading branch information
Tarun Kanti DebBarma authored and Tony Lindgren committed Sep 21, 2011
1 parent d353dcf commit eaaacd0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3392cdd33a0419e3226910a08b8bdc43b56c95d0
refs/heads/master: ffe07ceae1ae4b00b776c59694eddd9dd615dcea
33 changes: 10 additions & 23 deletions trunk/arch/arm/plat-omap/dmtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/err.h>
#include <linux/pm_runtime.h>

#include <plat/dmtimer.h>

Expand Down Expand Up @@ -202,33 +203,13 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_free);

void omap_dm_timer_enable(struct omap_dm_timer *timer)
{
struct dmtimer_platform_data *pdata = timer->pdev->dev.platform_data;

if (timer->enabled)
return;

if (!pdata->needs_manual_reset) {
clk_enable(timer->fclk);
clk_enable(timer->iclk);
}

timer->enabled = 1;
pm_runtime_get_sync(&timer->pdev->dev);
}
EXPORT_SYMBOL_GPL(omap_dm_timer_enable);

void omap_dm_timer_disable(struct omap_dm_timer *timer)
{
struct dmtimer_platform_data *pdata = timer->pdev->dev.platform_data;

if (!timer->enabled)
return;

if (!pdata->needs_manual_reset) {
clk_disable(timer->iclk);
clk_disable(timer->fclk);
}

timer->enabled = 0;
pm_runtime_put(&timer->pdev->dev);
}
EXPORT_SYMBOL_GPL(omap_dm_timer_disable);

Expand Down Expand Up @@ -460,7 +441,7 @@ int omap_dm_timers_active(void)
struct omap_dm_timer *timer;

list_for_each_entry(timer, &omap_timer_list, node) {
if (!timer->enabled)
if (!timer->reserved)
continue;

if (omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG) &
Expand Down Expand Up @@ -530,6 +511,12 @@ static int __devinit omap_dm_timer_probe(struct platform_device *pdev)
timer->irq = irq->start;
timer->pdev = pdev;

/* Skip pm_runtime_enable for OMAP1 */
if (!pdata->needs_manual_reset) {
pm_runtime_enable(&pdev->dev);
pm_runtime_irq_safe(&pdev->dev);
}

/* add the timer element to the list */
spin_lock_irqsave(&dm_timer_lock, flags);
list_add_tail(&timer->node, &omap_timer_list);
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/arm/plat-omap/include/plat/dmtimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ struct omap_dm_timer {

unsigned long rate;
unsigned reserved:1;
unsigned enabled:1;
unsigned posted:1;
struct platform_device *pdev;
struct list_head node;
Expand Down

0 comments on commit eaaacd0

Please sign in to comment.