OMAP: PM noop: implement context loss count for non-omap_devices
authorKevin Hilman <khilman@deeprootsystems.com>
Wed, 22 Dec 2010 04:31:55 +0000 (21:31 -0700)
committerPaul Walmsley <paul@pwsan.com>
Wed, 22 Dec 2010 04:31:55 +0000 (21:31 -0700)
commit6081dc348f122cdb76093b2fc6cf5742c968cb69
tree8036b8bbc876515462cee608d400293bc490a6ec
parentc80705aa7074045e7431ed2ebeb0f7d5773615ab
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>
arch/arm/mach-omap2/pm-debug.c
arch/arm/plat-omap/include/plat/omap-pm.h
arch/arm/plat-omap/omap-pm-noop.c