diff options
author | Ye.Li <B37916@freescale.com> | 2015-03-23 04:49:51 +0800 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2016-03-09 14:42:16 +0100 |
commit | df975a8373cf248d3291253fb2c0575e05fc2ca3 (patch) | |
tree | 0a1618cecc19a4451f699b066bf3020592cf9357 | |
parent | 70438f15bda750dc315188e318bca5265ab00776 (diff) |
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)
-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 d81dd1a733..2ee0ce7f1d 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 a5e7dbf07b..47d3aefeee 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 2fcdd63c47..a2768d1c2b 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() |