soc: qcom: Add snapshot of watchdog_v2 driver
This is a snapshot of the watchdog_v2 driver as of msm-4.4
commit 'fb5706b7462b0b855d10da12ed88ebf10a2e8643'. Add driver
support to configure watchdog with bark and pet time. If the
watchdog is not "pet" at regular intervals, the system is
assumed to be non reponsive and needs to be reset. Added
comment for all memory barriers and converted printk to
dev_info on top of the snapshot.
CRs-Fixed: 1051937
Change-Id: I182782ac66999aa04bf72c9f6df12df7c4e8c0fb
Signed-off-by: Satyajit Desai <sadesai@codeaurora.org>
diff --git a/include/soc/qcom/watchdog.h b/include/soc/qcom/watchdog.h
new file mode 100644
index 0000000..2697573
--- /dev/null
+++ b/include/soc/qcom/watchdog.h
@@ -0,0 +1,29 @@
+/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef _ASM_ARCH_MSM_WATCHDOG_H_
+#define _ASM_ARCH_MSM_WATCHDOG_H_
+
+#ifdef CONFIG_QCOM_FORCE_WDOG_BITE_ON_PANIC
+#define WDOG_BITE_ON_PANIC 1
+#else
+#define WDOG_BITE_ON_PANIC 0
+#endif
+
+#ifdef CONFIG_QCOM_WATCHDOG_V2
+void msm_trigger_wdog_bite(void);
+#else
+static inline void msm_trigger_wdog_bite(void) { }
+#endif
+
+#endif