From patchwork Tue Jul 21 15:06:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 11675843 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2EC386C1 for ; Tue, 21 Jul 2020 15:06:35 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 07504206E3 for ; Tue, 21 Jul 2020 15:06:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="UVs7cPCp"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="JgwqoZa9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 07504206E3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Z5cr6WkMoB5OaTHQYca8wgJ7b6EBk0Oh865X2riBVkM=; b=UVs7cPCpi6VfVql5BNL4/+1ub uR+ODvE+WWJNw6hBa38ZNjbFe9goILVTxl4mCl/QTPpbrPDTOERaZBYszDdLxTiAhTSW+y1snSiLs sRlHw2ttF6fTt3Kzf/3xIzN5Td9VQS4XpzLosrQPD+yy1ewNWWoE7g4bDT01YEkhecAjgoc5PJDJw bYuo+FraVmnPE5nMUx5QE60rGiFzpNwNp/J70f+BTm4fIoKrfKGWLmi9RQI2bupCiPu2bUC7nSd5z usg+el9q0Z/tvXeNA1QKoXIst0IqxME1k83Ry7ITvScMcOYgXkJrmv7QgBJs5ZAAgaLG0Fahe//xx BStgPqgyw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxtqk-0007OR-Cl; Tue, 21 Jul 2020 15:06:34 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxtqi-0007N1-70 for linux-rockchip@lists.infradead.org; Tue, 21 Jul 2020 15:06:32 +0000 Received: by mail-pg1-x541.google.com with SMTP id o13so12078257pgf.0 for ; Tue, 21 Jul 2020 08:06:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0ew9QjlJbRnQZOLGXciV0S5gezg4N5qJ+NOPGABB76Q=; b=JgwqoZa952Xr67eXenFdDqup607h5vM9gVu1rUuE8FgGpVdLHt7BV9oUkboDJQgZBz QrcbNHJ2guuEpT0k78jjjPw4VbHwi/yWZi8MmXYDWK/G2Mkbcx8tewvOEmcdFZqQHiAn guwVJVi8+lmN3Q85Bp2JquXSUDoy2gcNnl1L8= 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:mime-version:content-transfer-encoding; bh=0ew9QjlJbRnQZOLGXciV0S5gezg4N5qJ+NOPGABB76Q=; b=UkVGLHn2VXvnhVdelTPtM0liQf3kD2zpEns7Wpi0Nq95ByeQZQHwrh5Rm8Mdyyj3cE gbq5FLkXMMjVXyvIXwuERn6GTWWkrUF7WKGJYIfLBBtKuG5+TH1WxxpcQ+PiCj6wAB2q OzrPSM61pK+hkq+N2x+Tfa/YEyzZ4nTHQf90Gx/a5a3wh9utkVp5sUAwe4NDLaz+Gg1W g2mo+l3GTJr5WfURFfE57nFkBUAyzFoOHfdsd21RHzH3de5YOkRTZkxFU/ELQS6goWaR tOSAC+vBkh0rWfpEb/18CwEduKVS3W0EpFSgb3g7jHzSDyNj/+looP1EOMmynXdJn0UJ 6k0w== X-Gm-Message-State: AOAM5323MLPQaYubAOV+/QAVXlqMpr/KCW2+amcD8H10get2qoXLatdM WHCri3WEwJr693JuorBZKkAiTg== X-Google-Smtp-Source: ABdhPJyy2X3rilrzV7m2vDAMVwAA2i8SjhVZlxB1ZVucMoahqOASeTAZnOJYHKComsPNafxiixQwxQ== X-Received: by 2002:a63:2c96:: with SMTP id s144mr22498750pgs.359.1595343989880; Tue, 21 Jul 2020 08:06:29 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:3df7:ef76:b2b5:fa14]) by smtp.gmail.com with ESMTPSA id h9sm20671276pfk.155.2020.07.21.08.06.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2020 08:06:29 -0700 (PDT) From: Jagan Teki To: Kever Yang , Philipp Tomsich , Simon Glass Subject: [PATCH v6 3/5] rockchip: Don't clear the reset status reg Date: Tue, 21 Jul 2020 20:36:02 +0530 Message-Id: <20200721150604.35410-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200721150604.35410-1-jagan@amarulasolutions.com> References: <20200721150604.35410-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200721_110632_309847_36AAF685 X-CRM114-Status: UNSURE ( 9.34 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:541 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula , Jagan Teki , Suniel Mahesh Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org reset reason can be used several stages of U-Boot bootloader like SPL, U-Boot proper based on the requirements. Clearing the status register end of get_reset_cause will end up showing the wrong reset cause when it read the second time. For example, if board resets, SPL reads the reset status as RST whereas U-Boot proper reads the status as POR. However, based on the latest testing clearing reset status won't be required for determine the last reset cause or following resets. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- Changes for v6: - collect Kever r-b arch/arm/include/asm/arch-rockchip/cru.h | 1 - arch/arm/mach-rockchip/cpu-info.c | 6 ------ 2 files changed, 7 deletions(-) diff --git a/arch/arm/include/asm/arch-rockchip/cru.h b/arch/arm/include/asm/arch-rockchip/cru.h index 5eb17f9d55..d2057cb738 100644 --- a/arch/arm/include/asm/arch-rockchip/cru.h +++ b/arch/arm/include/asm/arch-rockchip/cru.h @@ -26,7 +26,6 @@ enum { SND_GLB_TSADC_RST_ST = BIT(3), FST_GLB_WDT_RST_ST = BIT(4), SND_GLB_WDT_RST_ST = BIT(5), - GLB_RST_ST_MASK = GENMASK(5, 0), }; #define MHz 1000000 diff --git a/arch/arm/mach-rockchip/cpu-info.c b/arch/arm/mach-rockchip/cpu-info.c index 21ca9dedce..bb5a198039 100644 --- a/arch/arm/mach-rockchip/cpu-info.c +++ b/arch/arm/mach-rockchip/cpu-info.c @@ -47,12 +47,6 @@ static char *get_reset_cause(void) */ env_set("reset_reason", cause); - /* - * Clear glb_rst_st, so we can determine the last reset cause - * for following resets. - */ - rk_clrreg(&cru->glb_rst_st, GLB_RST_ST_MASK); - return cause; }