From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtj4y-00082K-Ju for barebox@lists.infradead.org; Wed, 13 Feb 2019 01:11:13 +0000 Received: by mail-pl1-x643.google.com with SMTP id g9so334058plo.3 for ; Tue, 12 Feb 2019 17:11:12 -0800 (PST) From: Andrey Smirnov Date: Tue, 12 Feb 2019 17:11:04 -0800 Message-Id: <20190213011104.21602-1-andrew.smirnov@gmail.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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] ARM: i.MX8MQ: Check CPU type in imx8mq_init_syscnt_frequency() To: barebox@lists.infradead.org Cc: Andrey Smirnov Add code to make sure that imx8mq_init_syscnt_frequency() is only executed on i.MX8MQ. Signed-off-by: Andrey Smirnov --- arch/arm/mach-imx/imx8mq.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/mach-imx/imx8mq.c b/arch/arm/mach-imx/imx8mq.c index d887092ce..3f6b433a5 100644 --- a/arch/arm/mach-imx/imx8mq.c +++ b/arch/arm/mach-imx/imx8mq.c @@ -29,6 +29,9 @@ static int imx8mq_init_syscnt_frequency(void) { + if (!cpu_is_mx8mq()) + return 0; + if (current_el() == 3) { void __iomem *syscnt = IOMEM(MX8MQ_SYSCNT_CTRL_BASE_ADDR); /* -- 2.20.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox