From 62705741dedf6ab00e73f00c49113e04752885ee Mon Sep 17 00:00:00 2001 From: Lily Zhang Date: Fri, 9 Mar 2012 19:23:02 +0800 Subject: 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 --- include/asm-arm/arch-mx6/mx6.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/asm-arm') 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 { -- cgit v1.1