summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLily Zhang <r58066@freescale.com>2012-03-09 19:23:02 +0800
committerLily Zhang <r58066@freescale.com>2012-03-13 14:55:06 +0800
commit62705741dedf6ab00e73f00c49113e04752885ee (patch)
treebd71e010a865b08b5a96e63e7f5a44d3db3c47ea /include
parent01133f43a8fc4ef42c2851fb6fac02b744754bad (diff)
downloadu-boot-imx-62705741dedf6ab00e73f00c49113e04752885ee.zip
u-boot-imx-62705741dedf6ab00e73f00c49113e04752885ee.tar.gz
u-boot-imx-62705741dedf6ab00e73f00c49113e04752885ee.tar.bz2
ENGR00176347-5 mx6solo sabreauto: set system_rev
Add set_system_rev function. The layout of system_rev is: bit 0-7: Chip Revision ID. Read from Anatop register bit 8-11: Board Revision ID. Read from fuse OCOTP_GP1[15:8] 1: RevA Board 0: RevB board, Unknown board bit 12-19: Chip Silicon ID. Read from Anatop register 0x63: i.MX 6Dual/Quad 0x61: i.MX 6Solo/DualLite board_is_rev(system_rev,BOARD_REV_1) can be used to distinguish RevB board. board_is_rev(system_rev,BOARD_REV_2) is for RevA board. Signed-off-by: Lily Zhang <r58066@freescale.com>
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-mx6/mx6.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/asm-arm/arch-mx6/mx6.h b/include/asm-arm/arch-mx6/mx6.h
index 81edff6..c87f4cc 100644
--- a/include/asm-arm/arch-mx6/mx6.h
+++ b/include/asm-arm/arch-mx6/mx6.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright (C) 2011-2012 Freescale Semiconductor, Inc. All Rights Reserved.
*
* 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
@@ -627,6 +627,9 @@
#define SRC_GPR9 0x40
#define SRC_GPR10 0x44
+/* Get Board ID */
+#define board_is_rev(system_rev, rev) (((system_rev & 0x0F00) == rev) ? 1 : 0)
+
#ifndef __ASSEMBLER__
enum boot_device {