diff options
author | Ye.Li <B37916@freescale.com> | 2015-03-23 04:49:51 +0800 |
---|---|---|
committer | Peng Fan <Peng.Fan@freescale.com> | 2015-04-29 15:02:00 +0800 |
commit | e52f776b03b46fc3b3c2c16c0455a2c1e7f67238 (patch) | |
tree | 971c7c469509cc15bc7d510d73ed45fecece3ecf /arch/arm | |
parent | a68c85b315cd37b183fd9c4311e9098fa0d1be82 (diff) | |
download | u-boot-imx-e52f776b03b46fc3b3c2c16c0455a2c1e7f67238.zip u-boot-imx-e52f776b03b46fc3b3c2c16c0455a2c1e7f67238.tar.gz u-boot-imx-e52f776b03b46fc3b3c2c16c0455a2c1e7f67238.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>
(cherry picked from commit ccf3b130d71cf3dd9a97d3bb424931bf6bd7e8c0)
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/cpu/armv7/mx6/soc.c | 4 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-mx6/imx-regs.h | 3 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-mx6/sys_proto.h | 5 |
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 d81dd1a..2ee0ce7 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -72,6 +72,7 @@ u32 get_cpu_rev(void) struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR; u32 reg = readl(&anatop->digprog_sololite); u32 type = ((reg >> 16) & 0xff); + u32 major; if (type != MXC_CPU_MX6SL) { reg = readl(&anatop->digprog); @@ -89,8 +90,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 a5e7dbf..47d3aef 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 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright (C) 2011-2015 Freescale Semiconductor, Inc. All Rights Reserved. * * SPDX-License-Identifier: GPL-2.0+ */ @@ -319,6 +319,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 2fcdd63..a2768d1 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+ */ @@ -43,6 +45,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() |