aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/dmtimer.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2012-11-09 17:54:17 -0500
committerTony Lindgren <tony@atomide.com>2012-11-09 17:54:17 -0500
commitf56f52e02a9c3da4bc2cc6eb9ddcf5602ea44b37 (patch)
treea9ce4f46ea3b2e516698b2c3817e40414a8bbf51 /arch/arm/plat-omap/dmtimer.c
parent84fbd2b8c8da49b4e53fcb484a1564a9b5da61b3 (diff)
parent6ba54ab4a49bbad736b0254aa6bdf0cb83013815 (diff)
Merge branch 'omap-for-v3.8/cleanup-headers-prepare-multiplatform-v3' into omap-for-v3.8/dt
Conflicts: arch/arm/plat-omap/dmtimer.c Resolved as suggested by Jon Hunter.
Diffstat (limited to 'arch/arm/plat-omap/dmtimer.c')
-rw-r--r--arch/arm/plat-omap/dmtimer.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index b09e55632f4..9dca23e4d6b 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -44,9 +44,6 @@
44#include <linux/of_device.h> 44#include <linux/of_device.h>
45 45
46#include <plat/dmtimer.h> 46#include <plat/dmtimer.h>
47#include <plat/omap-pm.h>
48
49#include <mach/hardware.h>
50 47
51static u32 omap_reserved_systimers; 48static u32 omap_reserved_systimers;
52static LIST_HEAD(omap_timer_list); 49static LIST_HEAD(omap_timer_list);
@@ -332,7 +329,7 @@ int omap_dm_timer_get_irq(struct omap_dm_timer *timer)
332EXPORT_SYMBOL_GPL(omap_dm_timer_get_irq); 329EXPORT_SYMBOL_GPL(omap_dm_timer_get_irq);
333 330
334#if defined(CONFIG_ARCH_OMAP1) 331#if defined(CONFIG_ARCH_OMAP1)
335 332#include <mach/hardware.h>
336/** 333/**
337 * omap_dm_timer_modify_idlect_mask - Check if any running timers use ARMXOR 334 * omap_dm_timer_modify_idlect_mask - Check if any running timers use ARMXOR
338 * @inputmask: current value of idlect mask 335 * @inputmask: current value of idlect mask
@@ -409,7 +406,8 @@ int omap_dm_timer_start(struct omap_dm_timer *timer)
409 omap_dm_timer_enable(timer); 406 omap_dm_timer_enable(timer);
410 407
411 if (!(timer->capability & OMAP_TIMER_ALWON)) { 408 if (!(timer->capability & OMAP_TIMER_ALWON)) {
412 if (omap_pm_get_dev_context_loss_count(&timer->pdev->dev) != 409 if (timer->get_context_loss_count &&
410 timer->get_context_loss_count(&timer->pdev->dev) !=
413 timer->ctx_loss_count) 411 timer->ctx_loss_count)
414 omap_timer_restore_context(timer); 412 omap_timer_restore_context(timer);
415 } 413 }
@@ -438,9 +436,11 @@ int omap_dm_timer_stop(struct omap_dm_timer *timer)
438 436
439 __omap_dm_timer_stop(timer, timer->posted, rate); 437 __omap_dm_timer_stop(timer, timer->posted, rate);
440 438
441 if (!(timer->capability & OMAP_TIMER_ALWON)) 439 if (!(timer->capability & OMAP_TIMER_ALWON)) {
442 timer->ctx_loss_count = 440 if (timer->get_context_loss_count)
443 omap_pm_get_dev_context_loss_count(&timer->pdev->dev); 441 timer->ctx_loss_count =
442 timer->get_context_loss_count(&timer->pdev->dev);
443 }
444 444
445 /* 445 /*
446 * Since the register values are computed and written within 446 * Since the register values are computed and written within
@@ -556,7 +556,8 @@ int omap_dm_timer_set_load_start(struct omap_dm_timer *timer, int autoreload,
556 omap_dm_timer_enable(timer); 556 omap_dm_timer_enable(timer);
557 557
558 if (!(timer->capability & OMAP_TIMER_ALWON)) { 558 if (!(timer->capability & OMAP_TIMER_ALWON)) {
559 if (omap_pm_get_dev_context_loss_count(&timer->pdev->dev) != 559 if (timer->get_context_loss_count &&
560 timer->get_context_loss_count(&timer->pdev->dev) !=
560 timer->ctx_loss_count) 561 timer->ctx_loss_count)
561 omap_timer_restore_context(timer); 562 omap_timer_restore_context(timer);
562 } 563 }
@@ -798,6 +799,7 @@ static int __devinit omap_dm_timer_probe(struct platform_device *pdev)
798 timer->id = pdev->id; 799 timer->id = pdev->id;
799 timer->capability = pdata->timer_capability; 800 timer->capability = pdata->timer_capability;
800 timer->reserved = omap_dm_timer_reserved_systimer(timer->id); 801 timer->reserved = omap_dm_timer_reserved_systimer(timer->id);
802 timer->get_context_loss_count = pdata->get_context_loss_count;
801 } 803 }
802 804
803 timer->irq = irq->start; 805 timer->irq = irq->start;