platform: msm8996: Enable wdog driver
Enable watchdog driver to set bark time for 10seconds to catch
early crashes in the hlos and enter download mode
Change-Id: I474c3fe8253615906479594b7a683230953736cd
diff --git a/platform/msm8996/include/platform/iomap.h b/platform/msm8996/include/platform/iomap.h
index 8e90a0f..a4e7d54 100644
--- a/platform/msm8996/include/platform/iomap.h
+++ b/platform/msm8996/include/platform/iomap.h
@@ -527,4 +527,9 @@
#define QPNP_GREEN_LPG_CTRL_BASE 0xB200
#define QPNP_RED_LPG_CTRL_BASE 0xB300
+#define APSS_WDOG_BASE 0x9830000
+#define APPS_WDOG_BARK_VAL_REG (APSS_WDOG_BASE + 0x10)
+#define APPS_WDOG_BITE_VAL_REG (APSS_WDOG_BASE + 0x14)
+#define APPS_WDOG_RESET_REG (APSS_WDOG_BASE + 0x04)
+#define APPS_WDOG_CTL_REG (APSS_WDOG_BASE + 0x08)
#endif
diff --git a/project/msm8996.mk b/project/msm8996.mk
index f862e50..1eaf598 100644
--- a/project/msm8996.mk
+++ b/project/msm8996.mk
@@ -75,6 +75,11 @@
DEFINES += MDTP_EFUSE_START=0
endif
+ENABLE_WDOG_SUPPORT := 1
+ifeq ($(ENABLE_WDOG_SUPPORT),1)
+DEFINES += WDOG_SUPPORT=1
+endif
+
CFLAGS += -Werror
#SCM call before entering DLOAD mode