All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang@linaro.org>
To: broonie@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com,
	orsonzhai@gmail.com, zhang.lyra@gmail.com
Cc: weicx@spreadst.com, sherry.zong@unisoc.com,
	baolin.wang@linaro.org, vincent.guittot@linaro.org,
	linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 3/6] spi: sprd: adi: Add a reset reason for factory test mode
Date: Fri, 26 Jul 2019 15:20:50 +0800	[thread overview]
Message-ID: <8ae5651e876b527920ff878721a8a8ef47b099ac.1564125131.git.baolin.wang@linaro.org> (raw)
In-Reply-To: <cover.1564125131.git.baolin.wang@linaro.org>
In-Reply-To: <cover.1564125131.git.baolin.wang@linaro.org>

From: Sherry Zong <sherry.zong@unisoc.com>

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>
---
 drivers/spi/spi-sprd-adi.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/spi/spi-sprd-adi.c b/drivers/spi/spi-sprd-adi.c
index 0b3f23a..509ce69 100644
--- a/drivers/spi/spi-sprd-adi.c
+++ b/drivers/spi/spi-sprd-adi.c
@@ -98,6 +98,7 @@
 #define HWRST_STATUS_AUTODLOADER	0xa0
 #define HWRST_STATUS_IQMODE		0xb0
 #define HWRST_STATUS_SPRDISK		0xc0
+#define HWRST_STATUS_FACTORYTEST	0xe0
 
 /* Use default timeout 50 ms that converts to watchdog values */
 #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;
 	else if (!strncmp(cmd, "tospanic", 8))
 		reboot_mode = HWRST_STATUS_SECURITY;
+	else if (!strncmp(cmd, "factorytest", 11))
+		reboot_mode = HWRST_STATUS_FACTORYTEST;
 	else
 		reboot_mode = HWRST_STATUS_NORMAL;
 
-- 
1.7.9.5


  parent reply	other threads:[~2019-07-26  7:21 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-26  7:20 [PATCH 0/6] Optimize Spreadtrum ADI driver Baolin Wang
2019-07-26  7:20 ` [PATCH 1/6] spi: sprd: adi: Remove redundant address bits setting Baolin Wang
2019-07-26 12:12   ` Applied "spi: sprd: adi: Remove redundant address bits setting" to the spi tree Mark Brown
2019-07-26 12:12     ` Mark Brown
2019-07-26 12:12     ` Mark Brown
2019-07-26  7:20 ` [PATCH 2/6] spi: sprd: adi: Add a reset reason for TOS panic Baolin Wang
2019-07-26 12:12   ` Applied "spi: sprd: adi: Add a reset reason for TOS panic" to the spi tree Mark Brown
2019-07-26 12:12     ` Mark Brown
2019-07-26 12:12     ` Mark Brown
2019-07-26  7:20 ` Baolin Wang [this message]
2019-07-26 12:12   ` Applied "spi: sprd: adi: Add a reset reason for factory test mode" " Mark Brown
2019-07-26 12:12     ` Mark Brown
2019-07-26 12:12     ` Mark Brown
2019-07-26  7:20 ` [PATCH 4/6] spi: sprd: adi: Add a reset reason for watchdog mode Baolin Wang
2019-07-26 12:12   ` Applied "spi: sprd: adi: Add a reset reason for watchdog mode" to the spi tree Mark Brown
2019-07-26 12:12     ` Mark Brown
2019-07-26 12:12     ` Mark Brown
2019-07-26  7:20 ` [PATCH 5/6] spi: sprd: adi: Change hwlock to be optional Baolin Wang
2019-07-26 12:12   ` Applied "spi: sprd: adi: Change hwlock to be optional" to the spi tree Mark Brown
2019-07-26 12:12     ` Mark Brown
2019-07-26 12:12     ` Mark Brown
2019-07-26  7:20 ` [PATCH 6/6] dt-bindings: spi: sprd: Change the hwlock support to be optional Baolin Wang
2019-07-26 11:29   ` Mark Brown
2019-07-26 12:10     ` Baolin Wang
2019-07-26 12:12   ` Applied "spi: sprd: Change the hwlock support to be optional" to the spi tree Mark Brown
2019-07-26 12:12     ` Mark Brown
2019-07-26 12:12     ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8ae5651e876b527920ff878721a8a8ef47b099ac.1564125131.git.baolin.wang@linaro.org \
    --to=baolin.wang@linaro.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=orsonzhai@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sherry.zong@unisoc.com \
    --cc=vincent.guittot@linaro.org \
    --cc=weicx@spreadst.com \
    --cc=zhang.lyra@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.