summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorYe.Li <B37916@freescale.com>2015-03-23 04:49:51 +0800
committerYe.Li <B37916@freescale.com>2015-03-23 22:30:33 +0800
commitccf3b130d71cf3dd9a97d3bb424931bf6bd7e8c0 (patch)
tree1e402630d3ac9ee5a7b252caae5b114348c1cb29 /arch/arm
parentf2c5102bf3763d77a227c1cba7fcd49e3db53a1d (diff)
downloadu-boot-imx-ccf3b130d71cf3dd9a97d3bb424931bf6bd7e8c0.zip
u-boot-imx-ccf3b130d71cf3dd9a97d3bb424931bf6bd7e8c0.tar.gz
u-boot-imx-ccf3b130d71cf3dd9a97d3bb424931bf6bd7e8c0.tar.bz2
MLK-10448-1 mx6: Add MX6DQP CPU rev type
Add new cpu type for i.MX6DQP and providing a dynamical detecting function. Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Signed-off-by: Ye.Li <B37916@freescale.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/cpu/armv7/mx6/soc.c4
-rw-r--r--arch/arm/include/asm/arch-mx6/imx-regs.h3
-rw-r--r--arch/arm/include/asm/arch-mx6/sys_proto.h5
3 files changed, 10 insertions, 2 deletions
diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
index 207b92b..3545d04 100644
--- a/arch/arm/cpu/armv7/mx6/soc.c
+++ b/arch/arm/cpu/armv7/mx6/soc.c
@@ -62,6 +62,7 @@ u32 get_cpu_rev(void)
struct mxc_ccm_reg *ccm_regs = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
u32 reg = readl(&ccm_regs->digprog_sololite);
u32 type = ((reg >> 16) & 0xff);
+ u32 major;
if (type != MXC_CPU_MX6SL) {
reg = readl(&ccm_regs->digprog);
@@ -79,8 +80,9 @@ u32 get_cpu_rev(void)
}
}
+ major = ((reg >> 8) & 0xff);
reg &= 0xff; /* mx6 silicon revision */
- return (type << 12) | (reg + 0x10);
+ return (type << 12) | (reg + (0x10 * (major + 1)));
}
#ifdef CONFIG_REVISION_TAG
diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h b/arch/arm/include/asm/arch-mx6/imx-regs.h
index fd85803..2c1ea35 100644
--- a/arch/arm/include/asm/arch-mx6/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011-2014 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright (C) 2011-2015 Freescale Semiconductor, Inc. All Rights Reserved.
*
* SPDX-License-Identifier: GPL-2.0+
*/
@@ -325,6 +325,7 @@
#define CHIP_REV_1_3 0x13
#define CHIP_REV_1_4 0x14
#define CHIP_REV_1_5 0x15
+#define CHIP_REV_2_0 0x20
#ifndef CONFIG_MX6SX
#define IRAM_SIZE 0x00040000
#else
diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h b/arch/arm/include/asm/arch-mx6/sys_proto.h
index cc309cd..27b0c6e 100644
--- a/arch/arm/include/asm/arch-mx6/sys_proto.h
+++ b/arch/arm/include/asm/arch-mx6/sys_proto.h
@@ -2,6 +2,8 @@
* (C) Copyright 2009
* Stefano Babic, DENX Software Engineering, sbabic@denx.de.
*
+ * (C) Copyright 2009-2015 Freescale Semiconductor, Inc.
+ *
* SPDX-License-Identifier: GPL-2.0+
*/
@@ -38,6 +40,9 @@ int arch_auxiliary_core_up(u32 core_id, u32 boot_private_data);
int arch_auxiliary_core_check_up(u32 core_id);
#endif
+#define is_mx6dqp() ((is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) \
+ && (is_soc_rev(CHIP_REV_2_0) >= 0))
+
/*
* Initializes on-chip ethernet controllers.
* to override, implement board_eth_init()