From patchwork Tue Jul 14 09:32:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 11662165 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 8256E913 for ; Tue, 14 Jul 2020 09:34:48 +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 21AE2212CC for ; Tue, 14 Jul 2020 09:34:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YPMwLPzO"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="OjhN1Yx+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 21AE2212CC 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=jf5Rnv7q7BV3HBctwTMvQOXsAGftAn1bFDxAk4zpDNs=; b=YPMwLPzOCwNy5B3bycVaAdgvX 4WYt1a1Ehwfq7qTkHQCDxiftp/uffsADhQ0kNFplRcDe57gZgSMux97A6i85MLP9ZatFCZqKozBNB wVpi8Hf3Kn2aZIa6r8fEEQSg2MLoZWjGcoRAY6/cMJP9WaQMn0HtXL/CCq6x8hisUn4ScuqyHgS4K ebXevYIj0wEMAbEF9TUIat9swizCHpOmbphe0mv31D0WDeXRB8VNsxDv5rxzi23h8mAMVxxt7zl9j uD1wtVzfaNcV8yulWqdhjNEojmNqqFs08MYnVXnbz4Kz7AluhzeMiuhRf3BU7LCNZPYH4GQqgv8Mi yuDJJYkVw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvHKi-00041z-Op; Tue, 14 Jul 2020 09:34:40 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvHJb-0003TD-Pm for linux-rockchip@lists.infradead.org; Tue, 14 Jul 2020 09:33:34 +0000 Received: by mail-pl1-x643.google.com with SMTP id k5so6777427plk.13 for ; Tue, 14 Jul 2020 02:33:30 -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=Kbsd57x0jxMnHOGcZlWuIFI1qJSopginWYnBL/irn1Q=; b=OjhN1Yx+b/jlxmahBPK/DaW8GBKt431iGv05xv/LDD5UkeCXFfSOnflybZVJAwyxLm zkka0C1tokMy+tN98v1BJ8rid/vpk7+bu3ZwiE7uvnK3JoUYFJqQdjTm1571aoWPQ7bS +dMDyvgoKmCFxt0vfsWw33BUALRr3LnwoTIF4= 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=Kbsd57x0jxMnHOGcZlWuIFI1qJSopginWYnBL/irn1Q=; b=uahBYa7BhkekAtCXjYMTLWnSOJCzMQu82gx5TcAgTxaub5nvglu/sbUG5EurBJtaPc 4KhE5dkSKJJg1a7uLNgmsADXBfgx4mFfhQle8ruo+U3bum/MpKYd2kRhaTapJvJLD0Om s7sDt/tJ6DJjvsTI5WiqhWVXuE2+Q5/3dWBa/cKE5lptjmfS2wWqGoLhmIuYM4Ffk22Y rwRY9Kkui4Gl9dH1oreG9MJ2K28/SkOTEoX8CoGk0nAO12OwQTJpqLhAHAYAtA2HR+W/ GE4CLu53m1pasStR3HVxwl3msuYrkvIvUnAEF0jf7qrwmqOVspUHIQBt/LmXI+Vrprsw u6Xw== X-Gm-Message-State: AOAM530/N1zgmocBH8PT8NtdP9QWJJGAZUDK2ONxKifOh+6TtplCol7U z9ovXc+B4w3pkYC0yJ1Y2Ra2FQ== X-Google-Smtp-Source: ABdhPJz0edsrU32Jy9MIuV/ZdKjwSeYjvQ2tNQg9txZjwJPAofAdNwyPItlGcU65Fdw/KQBaEiuUJg== X-Received: by 2002:a17:902:c181:: with SMTP id d1mr3131662pld.176.1594719208551; Tue, 14 Jul 2020 02:33:28 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:659e:b3d0:e662:3980]) by smtp.gmail.com with ESMTPSA id g6sm16924771pfr.129.2020.07.14.02.33.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 02:33:27 -0700 (PDT) From: Jagan Teki To: Kever Yang , Philipp Tomsich , Simon Glass Subject: [PATCH v5 2/5] rockchip: Don't clear the reset status reg Date: Tue, 14 Jul 2020 15:02:26 +0530 Message-Id: <20200714093229.28763-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200714093229.28763-1-jagan@amarulasolutions.com> References: <20200714093229.28763-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200714_053332_139552_688DF77B X-CRM114-Status: UNSURE ( 9.56 ) 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:643 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -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 Message has at least one valid DKIM or DK signature -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 v5: - new patch 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; }