1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * MX35 CPU type detection
5 * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
7 #include <linux/module.h>
13 static int mx35_cpu_rev
= -1;
15 static int mx35_read_cpu_rev(void)
19 rev
= imx_readl(MX35_IO_ADDRESS(MX35_IIM_BASE_ADDR
+ MXC_IIMSREV
));
22 return IMX_CHIP_REVISION_1_0
;
24 return IMX_CHIP_REVISION_2_0
;
26 return IMX_CHIP_REVISION_2_1
;
28 return IMX_CHIP_REVISION_UNKNOWN
;
32 int mx35_revision(void)
34 if (mx35_cpu_rev
== -1)
35 mx35_cpu_rev
= mx35_read_cpu_rev();
39 EXPORT_SYMBOL(mx35_revision
);