aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/pm-debug.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@deeprootsystems.com>2010-12-21 23:31:55 -0500
committerPaul Walmsley <paul@pwsan.com>2010-12-21 23:31:55 -0500
commit6081dc348f122cdb76093b2fc6cf5742c968cb69 (patch)
tree8036b8bbc876515462cee608d400293bc490a6ec /arch/arm/mach-omap2/pm-debug.c
parentc80705aa7074045e7431ed2ebeb0f7d5773615ab (diff)
OMAP: PM noop: implement context loss count for non-omap_devices
For devices which have not (yet) been converted to use omap_device, implement the context loss counter using the "brutal method" as originally proposed by Paul Walmsley[1]. The dummy context loss counter is incremented every time it is checked, but only when off-mode is enabled. When off-mode is disabled, the dummy counter stops incrementing. Tested on 36xx/Zoom3 using MMC driver, which is currently the only in-tree user of this API. This patch should be reverted after all devices are converted to using omap_device. [1] http://marc.info/?l=linux-omap&m=129176260000626&w=2 Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> [paul@pwsan.com: fixed compile warning; fixed to compile on OMAP1] Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/pm-debug.c')
-rw-r--r--arch/arm/mach-omap2/pm-debug.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
index e535082b0c2e..125f56591fb5 100644
--- a/arch/arm/mach-omap2/pm-debug.c
+++ b/arch/arm/mach-omap2/pm-debug.c
@@ -32,6 +32,7 @@
32#include "powerdomain.h" 32#include "powerdomain.h"
33#include "clockdomain.h" 33#include "clockdomain.h"
34#include <plat/dmtimer.h> 34#include <plat/dmtimer.h>
35#include <plat/omap-pm.h>
35 36
36#include "cm2xxx_3xxx.h" 37#include "cm2xxx_3xxx.h"
37#include "prm2xxx_3xxx.h" 38#include "prm2xxx_3xxx.h"
@@ -581,6 +582,10 @@ static int option_set(void *data, u64 val)
581 *option = val; 582 *option = val;
582 583
583 if (option == &enable_off_mode) { 584 if (option == &enable_off_mode) {
585 if (val)
586 omap_pm_enable_off_mode();
587 else
588 omap_pm_disable_off_mode();
584 if (cpu_is_omap34xx()) 589 if (cpu_is_omap34xx())
585 omap3_pm_off_mode_enable(val); 590 omap3_pm_off_mode_enable(val);
586 } 591 }