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: 1542 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 216C23F08B for ; Tue, 21 Jul 2020 17:06:32 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id s1sf16423248pge.16 for ; Tue, 21 Jul 2020 08:06:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1595343991; cv=pass; d=google.com; s=arc-20160816; b=WBhVZsbDFCiJwwLciie9psf9frL4VxXiiA8e4Pr6GfvFyQWTw5RvNjunAO3rbrpPqT /WyC4H3Kpg66iP4eCMBm54TBmXdpuIj5zigOEOco5x7LwOMkZ3u/0mHwPSA2QAa1/Rs2 L8lwx+d8MojQ+aPi59Y347IwpKeVfN5oy2KcVmu4gtDpKhYjPO2vG5HPz0HNYTk+MWql 9raYJM2pnl/TmlvaNZigyCpAZW0dTO9+AJZA4eKmYjQknqcsh9QtquIx3OSJ/dFijeZq 2n/DCryi3veYlHNYU5Ym+XMzF3XeNabFWpimdU4JR84oCeuvHDYRDN/b6courcA5ZE8J NOgQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=FEKDw28baidsI6FqQrivi0p/UrIsjX2cyiOzO358Ud4=; b=JNTXz1D+BCp6pbEFB2CCqLez2wOBuSjPFGSHEL8VOnbcfZxIUE7XlWTfWtAMzkDSAI uv6g09Zjlc3aUjI59hTYoS/iWhboG8XmkIh+K4RppKqrHPO1Bt+d7PH1qtWDiGhsnTsQ MxyvFWywzGo7SERPzrVYlVs49T1Vkw/f5Ajq/jWnBi4abtqoM2faP8bvPlE1m3iYCaLR x2qu4Io6wgHrxGEq3WRzzjjIj4eqrAzq7L1M8l/5BT899U2R95eVjB4d2XvhmsBPMC6s U6XOe12IB4BO4P9gKQc2tSPyQ6wToGrNd3AULbLlWy2UGfToQGH1xXn3vez3IQGxXEAA 9yzw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JgwqoZa9; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=FEKDw28baidsI6FqQrivi0p/UrIsjX2cyiOzO358Ud4=; b=AgXu3qS6adblrvumyjrfhYntqEUkRk9fXVIAbiDyi2atoWU6bokaCFU0KOJJWNJStj Odapz42QuDE2Xp9E8XFFI+LdgX0oiQFTm3jh7+5HPBAW3RCHyKPn/coIJ01Xw/72+nfb E47+oqqxKMdO8GRMbfjQQZrTMH6k9TsmIgj/k= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=FEKDw28baidsI6FqQrivi0p/UrIsjX2cyiOzO358Ud4=; b=L2mws37RRkCoWUkP7c6vV8KOw2chm0cTMutfu/iXejHPNshiEwZ616arLMvTT5nmdz cI3lpxlhmLZRAhN57A7cG7S8ADZk3Kc2z7PK7vAFM7NWaJ43DabYDIa9jjUPKM3a5rmT +P9+qR3t81SXu4LPRfy2xQxiT6e+Fknjg4qlz580WAL4sssHEBJZoG0o7R4ioX8e/1W8 KYCG489h1MvY43J3ML9U7gRcuMAJzmVF4TPwXFJ55b7lE6WOfok1wRwPL534gRZlI8ss K2jpAPHLkSx051f+A5fJ3YkCtEm3Ewgk0J3BR6gERCiCfnM+FEEzQllnt92Q2rytppiN fu7Q== X-Gm-Message-State: AOAM531Z+r+4yKF9nI+Sf16ZVLjG7gQOHwEeBq59/H27I+GhBtzehC1o /XbHx4JNLhP/3OPbjdXVvzVweQ2L X-Google-Smtp-Source: ABdhPJxqI97ZpFJAlpR0soieephl7MudaQVbjUCZ34h4kaaLrwtwbmtHq9xDCxsJsc2pw19VYfQIQA== X-Received: by 2002:a17:90b:4ac3:: with SMTP id mh3mr5569999pjb.0.1595343990719; Tue, 21 Jul 2020 08:06:30 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:9f8f:: with SMTP id g15ls4169998plq.6.gmail; Tue, 21 Jul 2020 08:06:30 -0700 (PDT) X-Received: by 2002:a17:902:7807:: with SMTP id p7mr23224338pll.242.1595343990238; Tue, 21 Jul 2020 08:06:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595343990; cv=none; d=google.com; s=arc-20160816; b=aFNmJmB7Y3YmJruvfafqxIwc4z45jygn9ujqJafUFrudm8NC4NRDl02SVKWmJ0TY01 FOdtS4q44WhYm6iMWhoW3vemJNnz8yRgghyNHuDZy/bPYiwDRzD3ImyHgYNbSsYnhPtH gBizy63hmfE5kVdUr/6KIbMvdOJS1HfvXHOdXaD1pFn1BGfxeZPG0m4dCE4CtN4/FAjS Ad0pB2yTcfii90m5tVXUEJV/N/3THiqNfxGGeHObkgmbWfvSmZSgHF/etyPP3c+lt9Mz rqQiczhyY/hYKJ1rrLVTb+bnEWULCkm5edCxQHi6jw2sNuCfaEg4FRbJH9xiDjvpeLKS AZnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=0ew9QjlJbRnQZOLGXciV0S5gezg4N5qJ+NOPGABB76Q=; b=ZDBMepK0Fzi7GG8Sd4eKltozk1PAwleR8wImsRRUs9VhP9r4v3c0HXnzD7op5ADtGH ozYlNlMBY9wPAB3tnMNzWgEjVakgRyoUdPamkyklwVG4E5iktMh01lPkQg95+iYox329 n+2kgG5fosLalk423Gwzi3y11PaS9knkxjYF8Q/tD1cyCQZKcsJsFar2N36MjR2K15Di 2uR4CZN1uD/TFT1176XV17p6qMHpZqvGdv4QGizO/5GCyO3bXE2TMxTubIaMjQ87toXq zH+UkA46zG1LupkTO3ETwds+Fa0oaH6X/VLrdKqSbqpfEJ+oY0LOk12APzNuPKk2XmcJ 9xyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JgwqoZa9; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id s70sor24305076pgc.74.2020.07.21.08.06.30 for (Google Transport Security); Tue, 21 Jul 2020 08:06:30 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; 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 Cc: Suniel Mahesh , U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula , Jagan Teki 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-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JgwqoZa9; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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; }