diff options
| author | Satya Durga Srinivasu Prabhala <satyap@codeaurora.org> | 2016-12-15 13:33:39 -0800 |
|---|---|---|
| committer | Satya Durga Srinivasu Prabhala <satyap@codeaurora.org> | 2016-12-16 10:53:56 -0800 |
| commit | ef124ecde2998f08ee84f5badd3d95a0a7308977 (patch) | |
| tree | 000a4d7cdcc4307eda2a5c58a3af1970ce2171aa /include | |
| parent | 3162449f7d245d45f007d4ea3224576ddf1bcc63 (diff) | |
soc: qcom: ssr: add crash status to know why subsys crashed
In some specific cases, clients may want to know why subsystem
crashed, for example, in case of watch dog bite, subsystem may not
be able to execute error handling. Which would need different code
paths to be exercised on the apps processor.
Change-Id: I073733b8a56b57f14906b25cba08012c2f0b414a
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/soc/qcom/subsystem_restart.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/include/soc/qcom/subsystem_restart.h b/include/soc/qcom/subsystem_restart.h index 780666c332e2..763eaa9ad918 100644 --- a/include/soc/qcom/subsystem_restart.h +++ b/include/soc/qcom/subsystem_restart.h @@ -25,6 +25,12 @@ enum { RESET_LEVEL_MAX }; +enum crash_status { + CRASH_STATUS_NO_CRASH = 0, + CRASH_STATUS_ERR_FATAL, + CRASH_STATUS_WDOG_BITE, +}; + struct device; struct module; @@ -89,7 +95,7 @@ struct subsys_desc { /** * struct notif_data - additional notif information - * @crashed: indicates if subsystem has crashed + * @crashed: indicates if subsystem has crashed due to wdog bite or err fatal * @enable_ramdump: ramdumps disabled if set to 0 * @enable_mini_ramdumps: enable flag for minimized critical-memory-only * ramdumps @@ -97,7 +103,7 @@ struct subsys_desc { * @pdev: subsystem platform device pointer */ struct notif_data { - bool crashed; + enum crash_status crashed; int enable_ramdump; int enable_mini_ramdumps; bool no_auth; @@ -120,8 +126,9 @@ extern struct subsys_device *subsys_register(struct subsys_desc *desc); extern void subsys_unregister(struct subsys_device *dev); extern void subsys_default_online(struct subsys_device *dev); -extern void subsys_set_crash_status(struct subsys_device *dev, bool crashed); -extern bool subsys_get_crash_status(struct subsys_device *dev); +extern void subsys_set_crash_status(struct subsys_device *dev, + enum crash_status crashed); +extern enum crash_status subsys_get_crash_status(struct subsys_device *dev); void notify_proxy_vote(struct device *device); void notify_proxy_unvote(struct device *device); void complete_err_ready(struct subsys_device *subsys); @@ -174,9 +181,10 @@ struct subsys_device *subsys_register(struct subsys_desc *desc) static inline void subsys_unregister(struct subsys_device *dev) { } static inline void subsys_default_online(struct subsys_device *dev) { } +static inline void subsys_set_crash_status(struct subsys_device *dev, + enum crash_status crashed) { } static inline -void subsys_set_crash_status(struct subsys_device *dev, bool crashed) { } -static inline bool subsys_get_crash_status(struct subsys_device *dev) +enum crash_status subsys_get_crash_status(struct subsys_device *dev) { return false; } |
