From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from vs10.datenmanufaktur-hosting.net ([185.138.26.202] helo=vs81.iboxed.net) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fI61N-0006mn-6b for barebox@lists.infradead.org; Mon, 14 May 2018 05:27:43 +0000 From: Alexander Kurz Date: Mon, 14 May 2018 05:26:50 +0000 Message-Id: <20180514052650.7778-2-akurz@blala.de> In-Reply-To: <20180514052650.7778-1-akurz@blala.de> References: <20180514052650.7778-1-akurz@blala.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 2/2] ARM: i.MX50: Record reset reason as a part of startup To: barebox@lists.infradead.org, Sascha Hauer Cc: Andrey Smirnov , Alexander Kurz The given SRSR register location is also valid for the i.MX50. Signed-off-by: Alexander Kurz --- arch/arm/mach-imx/imx50.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/mach-imx/imx50.c b/arch/arm/mach-imx/imx50.c index 6d121eaf8..f7cbc9d4b 100644 --- a/arch/arm/mach-imx/imx50.c +++ b/arch/arm/mach-imx/imx50.c @@ -21,6 +21,7 @@ #include #include #include +#include #define SI_REV 0x48 @@ -49,7 +50,10 @@ static int imx50_silicon_revision(void) int imx50_init(void) { + void __iomem *src = IOMEM(MX50_SRC_BASE_ADDR); + imx50_silicon_revision(); + imx_set_reset_reason(src + IMX_SRC_SRSR, imx_reset_reasons); imx53_boot_save_loc(); return 0; -- 2.11.0 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox