[PATCH] ARM: i.MX8MQ: Check CPU type in imx8mq_init_syscnt_frequency()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add code to make sure that imx8mq_init_syscnt_frequency() is only
executed on i.MX8MQ.

Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux