From patchwork Fri Jul 26 07:20:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 169783 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp12647977ilk; Fri, 26 Jul 2019 00:21:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqzQAcENuVI4f8zxUB7UC5EKW3HPBcOm0mYoFvIA4dDGEnbiaYeqqRuBtHJPUKjQHE2b8Aua X-Received: by 2002:a17:902:a606:: with SMTP id u6mr88114596plq.275.1564125692719; Fri, 26 Jul 2019 00:21:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564125692; cv=none; d=google.com; s=arc-20160816; b=1BoYgXdU2iAc0XJTXsTnPLLtoLfGWcU6u7Ni50bRJ5CuWk7rCY4ZbY8j1E9QDsk3Qf gGGJ1jrBlwYxJA3J8G7oByABpdois6ck+lGHIqzlUnxX02QJy72gzkMG5yyshNsO58UV 5axtYApWD7HkBOFaTyEsfD51hXi885vec6gW9BySEpHjR804HtvpGVws336CnGUlwH3k Pz4tcMv9bGHdtoiADZtnT4Y7gbwHT6BWJWtM15bcO99cc+owlOl6ixHhMGOuuO0++IJt XxJAMKDf+A8WYoDusSBV7lOCDoYtg/LKjTmrMqWSCsLzjrXIke0PMPYzxLJjLoQh8mmW AQ9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=b1L8klkoL2Oqr4w2X+VMFT6OyaJM5PiYuc6bxPNU4L8=; b=N5Ndax8tDicII4nUYbx/w77NIjbWkKJA7MTs+uYODh2/J92F2nk+/hBOo6LtaNZ4xI Nsd5h+3Q3GQ1FbDY++7kxGZXrsNqdkXiQGUN6OwPW6y4ZgkutsVrQ92tBJikDNycxnKu gQb0DR1EUTl00ekMrD+mjNzCNZFJ6ahx27DkSaII/IN5G3AfsdYg4Nt07ksL4ZuGO2rJ YcgJGM9NdvITi2PX/G14CIAaAEpfkl49MqOQZdsTdatAOfbcc6/uBaXn9wq9g/qnPW9/ wiUZU0n5GrSpLsflv3JC3ye1rD2dNP8BvkHAZ0/fBMahHOb84zxwhqY39QLQq7oQFGQt sKog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vFi7c+GF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si44695577plv.153.2019.07.26.00.21.32; Fri, 26 Jul 2019 00:21:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vFi7c+GF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725944AbfGZHVb (ORCPT + 29 others); Fri, 26 Jul 2019 03:21:31 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:42665 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725867AbfGZHV3 (ORCPT ); Fri, 26 Jul 2019 03:21:29 -0400 Received: by mail-pf1-f193.google.com with SMTP id q10so24054756pff.9 for ; Fri, 26 Jul 2019 00:21:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=b1L8klkoL2Oqr4w2X+VMFT6OyaJM5PiYuc6bxPNU4L8=; b=vFi7c+GFBkJu3RCOXu9B84n2sjWjYyooQbcp5xnohrzGwUanT74gDGHm+agculUfuB e+79A1x/faNu+a9h13lWaqV6TWZpV6mecRdyBZ6TTI+KoZWr25dixirBm4GiFD5OwLdH tXpgF3leSF9Hs5VNpLmJ/1VMcVsFxY8oZ2tvjTCBmcxd+nyxhsxNINiJiMZWFB7r0bMw nqP6whtn/2Twy8dv5V44OsUyAZiiEPr5BLB9z4reDW3slv0nfeAYEikjH6tR2mHedotn 43lqm3+QaTTwusAVyqhZ+Fb6WO7w9H+n7v9xTrvAgCehB6j4/OOEAyLxgRGq0nTQHjHh IG/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=b1L8klkoL2Oqr4w2X+VMFT6OyaJM5PiYuc6bxPNU4L8=; b=ARlGuVR+GbiBOw32FQ9XgQW6pGMmyco9S3N1wIEtzui9WwjXPYJGU9kePDPOAKpNZR 3N13hu2AO/K3s6rdg7YnEhPRlCHZjIu7GbfkYZS9JM/Xt1DvSeZnec0zsTsFEYtLUg9r ntt8E5JrCQfO8y5DGrqoDk96zJJxf1dC9wrCkrfXvRSuAab0vteoHC8tmw/8PSx6P1ZA wLhodgoa7E/LlnUrcvBzSxcTqiYKkx/3LRl/IVW3arFUvYg1KmtFaSKCRhLmbp0QrTl6 qNphKWs/zvJoJr2UZR02FFTk39YHLZnhWMYFkHWIfHdDtCy3wef+FY0bRUGPCwjEgKI/ lRdg== X-Gm-Message-State: APjAAAV97xdahJHIl3nIuVvwpu6i1ul4FsMEdw72s0qp2zEcYiamSDm6 koWJ+pIlMULVud5KDRT2Zt4b8Q== X-Received: by 2002:a65:6691:: with SMTP id b17mr74681456pgw.217.1564125689079; Fri, 26 Jul 2019 00:21:29 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id o12sm39216152pjr.22.2019.07.26.00.21.25 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Jul 2019 00:21:28 -0700 (PDT) From: Baolin Wang 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 2/6] spi: sprd: adi: Add a reset reason for TOS panic Date: Fri, 26 Jul 2019 15:20:49 +0800 Message-Id: <97583aad1f2b849d69b4e76e8d29113da72a9fff.1564125131.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chenxu Wei Add a new reset flag to indicate the reset reason is caused by TOS. Signed-off-by: Chenxu Wei Signed-off-by: Baolin Wang --- drivers/spi/spi-sprd-adi.c | 3 +++ 1 file changed, 3 insertions(+) -- 1.7.9.5 diff --git a/drivers/spi/spi-sprd-adi.c b/drivers/spi/spi-sprd-adi.c index 11880db..0b3f23a 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;