aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/omap_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-omap/omap_device.c')
-rw-r--r--arch/arm/plat-omap/omap_device.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index abe933cd8f09..57adb270767b 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -280,6 +280,34 @@ static void _add_optional_clock_alias(struct omap_device *od,
280/* Public functions for use by core code */ 280/* Public functions for use by core code */
281 281
282/** 282/**
283 * omap_device_get_context_loss_count - get lost context count
284 * @od: struct omap_device *
285 *
286 * Using the primary hwmod, query the context loss count for this
287 * device.
288 *
289 * Callers should consider context for this device lost any time this
290 * function returns a value different than the value the caller got
291 * the last time it called this function.
292 *
293 * If any hwmods exist for the omap_device assoiated with @pdev,
294 * return the context loss counter for that hwmod, otherwise return
295 * zero.
296 */
297u32 omap_device_get_context_loss_count(struct platform_device *pdev)
298{
299 struct omap_device *od;
300 u32 ret = 0;
301
302 od = _find_by_pdev(pdev);
303
304 if (od->hwmods_cnt)
305 ret = omap_hwmod_get_context_loss_count(od->hwmods[0]);
306
307 return ret;
308}
309
310/**
283 * omap_device_count_resources - count number of struct resource entries needed 311 * omap_device_count_resources - count number of struct resource entries needed
284 * @od: struct omap_device * 312 * @od: struct omap_device *
285 * 313 *