spi: sprd: adi: Add a reset reason for factory test mode
Add a new reset flag to indicate that the system need enter factory test mode after restarting system. Signed-off-by: Sherry Zong <sherry.zong@unisoc.com> Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Link: https://lore.kernel.org/r/8ae5651e876b527920ff878721a8a8ef47b099ac.1564125131.git.baolin.wang@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
cc6b3431b3
commit
9d9aa1cc91
@ -98,6 +98,7 @@
|
|||||||
#define HWRST_STATUS_AUTODLOADER 0xa0
|
#define HWRST_STATUS_AUTODLOADER 0xa0
|
||||||
#define HWRST_STATUS_IQMODE 0xb0
|
#define HWRST_STATUS_IQMODE 0xb0
|
||||||
#define HWRST_STATUS_SPRDISK 0xc0
|
#define HWRST_STATUS_SPRDISK 0xc0
|
||||||
|
#define HWRST_STATUS_FACTORYTEST 0xe0
|
||||||
|
|
||||||
/* Use default timeout 50 ms that converts to watchdog values */
|
/* Use default timeout 50 ms that converts to watchdog values */
|
||||||
#define WDG_LOAD_VAL ((50 * 1000) / 32768)
|
#define WDG_LOAD_VAL ((50 * 1000) / 32768)
|
||||||
@ -339,6 +340,8 @@ static int sprd_adi_restart_handler(struct notifier_block *this,
|
|||||||
reboot_mode = HWRST_STATUS_SPRDISK;
|
reboot_mode = HWRST_STATUS_SPRDISK;
|
||||||
else if (!strncmp(cmd, "tospanic", 8))
|
else if (!strncmp(cmd, "tospanic", 8))
|
||||||
reboot_mode = HWRST_STATUS_SECURITY;
|
reboot_mode = HWRST_STATUS_SECURITY;
|
||||||
|
else if (!strncmp(cmd, "factorytest", 11))
|
||||||
|
reboot_mode = HWRST_STATUS_FACTORYTEST;
|
||||||
else
|
else
|
||||||
reboot_mode = HWRST_STATUS_NORMAL;
|
reboot_mode = HWRST_STATUS_NORMAL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user