[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230815023426.15076-3-jiansheng.wu@unisoc.com>
Date: Tue, 15 Aug 2023 10:34:21 +0800
From: Jiansheng Wu <jiansheng.wu@...soc.com>
To: Mark Brown <broonie@...nel.org>, Orson Zhai <orsonzhai@...il.com>,
Baolin Wang <baolin.wang@...ux.alibaba.com>,
Chunyan Zhang <zhang.lyra@...il.com>
CC: <linux-spi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<yongzhi.chen@...soc.com>, <xiaoqing.wu@...soc.com>,
<jianshengwu16@...il.com>
Subject: [PATCH 3/8] Spi: sprd-adi: Added the cause of reboot
Added the silent and dmverity methods to reboot mode that the system
need enter the silent or secboot mode after restarting system.
Signed-off-by: Jiansheng Wu <jiansheng.wu@...soc.com>
---
drivers/spi/spi-sprd-adi.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/spi/spi-sprd-adi.c b/drivers/spi/spi-sprd-adi.c
index 734245492680..569a66943e8d 100644
--- a/drivers/spi/spi-sprd-adi.c
+++ b/drivers/spi/spi-sprd-adi.c
@@ -118,6 +118,7 @@
/* Definition of PMIC reset status register */
#define HWRST_STATUS_SECURITY 0x02
+#define HWRST_STATUS_SECBOOT 0x03
#define HWRST_STATUS_RECOVERY 0x20
#define HWRST_STATUS_NORMAL 0x40
#define HWRST_STATUS_ALARM 0x50
@@ -129,6 +130,7 @@
#define HWRST_STATUS_AUTODLOADER 0xa0
#define HWRST_STATUS_IQMODE 0xb0
#define HWRST_STATUS_SPRDISK 0xc0
+#define HWRST_STATUS_SILENT 0xd0
#define HWRST_STATUS_FACTORYTEST 0xe0
#define HWRST_STATUS_WATCHDOG 0xf0
@@ -438,8 +440,12 @@ static int sprd_adi_restart_handler(struct notifier_block *this, unsigned long m
reboot_mode = HWRST_STATUS_SPRDISK;
else if (!strncmp(cmd, "tospanic", 8))
reboot_mode = HWRST_STATUS_SECURITY;
+ else if (!strncmp(cmd, "dm-verity", 9))
+ reboot_mode = HWRST_STATUS_SECBOOT;
else if (!strncmp(cmd, "factorytest", 11))
reboot_mode = HWRST_STATUS_FACTORYTEST;
+ else if (!strncmp(cmd, "silent", 6))
+ reboot_mode = HWRST_STATUS_SILENT;
else
reboot_mode = HWRST_STATUS_NORMAL;
--
2.17.1
Powered by blists - more mailing lists