summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/imx27.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2008-02-19 15:50:43 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2008-02-19 15:50:43 +0100
commit2ae190a9ddb4b88c996e25cb96ae2ea1b4184dfa (patch)
tree1011c9dff457d048e88293aa566313f18aee5e24 /arch/arm/mach-imx/imx27.c
parentbb6d50805ac3bc2d23e4e0ed20ffed11b304bd87 (diff)
downloadbarebox-2ae190a9ddb4b88c996e25cb96ae2ea1b4184dfa.tar.gz
barebox-2ae190a9ddb4b88c996e25cb96ae2ea1b4184dfa.tar.xz
[i.MX] add function to determine chip revision
Diffstat (limited to 'arch/arm/mach-imx/imx27.c')
-rw-r--r--arch/arm/mach-imx/imx27.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/imx27.c b/arch/arm/mach-imx/imx27.c
new file mode 100644
index 0000000000..7255a77704
--- /dev/null
+++ b/arch/arm/mach-imx/imx27.c
@@ -0,0 +1,25 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <asm/arch/imx-regs.h>
+
+int imx_silicon_revision(void)
+{
+ return CID >> 28;
+}
+