summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/include/plat/omap_hwmod.h
diff options
context:
space:
mode:
authorKevin Hilman2010-12-22 05:31:55 +0100
committerPaul Walmsley2010-12-22 05:31:55 +0100
commitc80705aa7074045e7431ed2ebeb0f7d5773615ab (patch)
tree8c62b8e0456a95844237bdb87e021318fc588f9a /arch/arm/plat-omap/include/plat/omap_hwmod.h
parentOMAP2+: powerdomain: add API to get context loss count (diff)
downloadkernel-qcow2-linux-c80705aa7074045e7431ed2ebeb0f7d5773615ab.tar.gz
kernel-qcow2-linux-c80705aa7074045e7431ed2ebeb0f7d5773615ab.tar.xz
kernel-qcow2-linux-c80705aa7074045e7431ed2ebeb0f7d5773615ab.zip
OMAP: PM: implement context loss count APIs
Implement OMAP PM layer omap_pm_get_dev_context_loss_count() API by creating similar APIs at the omap_device and omap_hwmod levels. The omap_hwmod level call is the layer with access to the powerdomain core, so it is the place where the powerdomain is queried to get the context loss count. The new APIs return an unsigned value that can wrap as the context-loss count grows. However, the wrapping is not important as the role of this function is to determine context loss by checking for any difference in subsequent calls to this function. Note that these APIs at each level can return zero when no context loss is detected, or on errors. This is to avoid returning error codes which could potentially be mistaken for large context loss counters. NOTE: only works for devices which have been converted to use omap_device/omap_hwmod. Longer term, we could possibly remove this API from the OMAP PM layer, and instead directly use the omap_device level API. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/plat-omap/include/plat/omap_hwmod.h')
-rw-r--r--arch/arm/plat-omap/include/plat/omap_hwmod.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index 619877c6b3ab..2825b456da0e 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -569,6 +569,7 @@ int omap_hwmod_for_each_by_class(const char *classname,
void *user);
int omap_hwmod_set_postsetup_state(struct omap_hwmod *oh, u8 state);
+u32 omap_hwmod_get_context_loss_count(struct omap_hwmod *oh);
/*
* Chip variant-specific hwmod init routines - XXX should be converted