summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-sprd-adi.c
diff options
context:
space:
mode:
authorChenxu Wei <weicx@spreadst.com>2019-07-26 10:20:49 +0300
committerMark Brown <broonie@kernel.org>2019-07-26 14:23:50 +0300
commitcc6b3431b36a1109d44cb8e4015cc68dddc75208 (patch)
treed133dc99fed7ec62ad8a8e0f44b9fa719da02f51 /drivers/spi/spi-sprd-adi.c
parentc627c58acdc48055a9e4d40d6f9f1b434222a68d (diff)
downloadlinux-cc6b3431b36a1109d44cb8e4015cc68dddc75208.tar.xz
spi: sprd: adi: Add a reset reason for TOS panic
Add a new reset flag to indicate the reset reason is caused by TOS. Signed-off-by: Chenxu Wei <weicx@spreadst.com> Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Link: https://lore.kernel.org/r/97583aad1f2b849d69b4e76e8d29113da72a9fff.1564125131.git.baolin.wang@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-sprd-adi.c')
-rw-r--r--drivers/spi/spi-sprd-adi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/spi/spi-sprd-adi.c b/drivers/spi/spi-sprd-adi.c
index 11880db08ce9..0b3f23ad6479 100644
--- a/drivers/spi/spi-sprd-adi.c
+++ b/drivers/spi/spi-sprd-adi.c
@@ -86,6 +86,7 @@
#define BIT_WDG_EN BIT(2)
/* Definition of PMIC reset status register */
+#define HWRST_STATUS_SECURITY 0x02
#define HWRST_STATUS_RECOVERY 0x20
#define HWRST_STATUS_NORMAL 0x40
#define HWRST_STATUS_ALARM 0x50
@@ -336,6 +337,8 @@ static int sprd_adi_restart_handler(struct notifier_block *this,
reboot_mode = HWRST_STATUS_IQMODE;
else if (!strncmp(cmd, "sprdisk", 7))
reboot_mode = HWRST_STATUS_SPRDISK;
+ else if (!strncmp(cmd, "tospanic", 8))
+ reboot_mode = HWRST_STATUS_SECURITY;
else
reboot_mode = HWRST_STATUS_NORMAL;