• K
    OMAP: PM: implement context loss count APIs · c80705aa
    Kevin Hilman 提交于
    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: NKevin Hilman <khilman@deeprootsystems.com>
    Signed-off-by: NPaul Walmsley <paul@pwsan.com>
    c80705aa
omap_device.c 23.1 KB