summaryrefslogtreecommitdiff
path: root/arch/arm/imx-common
diff options
context:
space:
mode:
authorYe.Li <B37916@freescale.com>2015-02-01 22:20:33 +0800
committerPeng Fan <Peng.Fan@freescale.com>2015-04-29 14:56:22 +0800
commit6466e025ff0bf4277dda8bbdc0cc008283fb6eb4 (patch)
tree09c10753bd2433e4b9c2af34ed0f250ce7cae9e0 /arch/arm/imx-common
parent93c2123adf6be5294d6c8b2583c499bb50c3cc59 (diff)
downloadu-boot-imx-6466e025ff0bf4277dda8bbdc0cc008283fb6eb4.zip
u-boot-imx-6466e025ff0bf4277dda8bbdc0cc008283fb6eb4.tar.gz
u-boot-imx-6466e025ff0bf4277dda8bbdc0cc008283fb6eb4.tar.bz2
MLK-10176-4 imx: mx7: Add arch level support
Introduce a new cpu type MXC_CPU_MX7D and relevant functions for mx7d. Implement the soc.c for various system level functions like: temperature check, arch init, get mac fuse, boot mode get/apply, etc. Additional, enable building imx common platform files for mx7d. Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit 47d65aa6bdd109fd9141b5a5d64ab9deeb9dd2b3) Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Conflicts: Makefile arch/arm/cpu/armv7/Makefile arch/arm/imx-common/cpu.c arch/arm/include/asm/arch-imx/cpu.h arch/arm/include/asm/imx-common/boot_mode.h
Diffstat (limited to 'arch/arm/imx-common')
-rw-r--r--arch/arm/imx-common/Makefile8
-rw-r--r--arch/arm/imx-common/cpu.c20
2 files changed, 25 insertions, 3 deletions
diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile
index ecb7e22..a50b52c 100644
--- a/arch/arm/imx-common/Makefile
+++ b/arch/arm/imx-common/Makefile
@@ -7,14 +7,18 @@
# SPDX-License-Identifier: GPL-2.0+
#
-ifeq ($(SOC),$(filter $(SOC),mx25 mx35 mx5 mx6 vf610))
+ifeq ($(SOC),$(filter $(SOC),mx25 mx35 mx5 mx6 mx7 vf610))
obj-y = iomux-v3.o
endif
ifeq ($(SOC),$(filter $(SOC),mx5 mx6))
obj-y += timer.o cpu.o speed.o
obj-$(CONFIG_SYS_I2C_MXC) += i2c-mxv7.o
endif
-ifeq ($(SOC),$(filter $(SOC),mx6 mxs))
+ifeq ($(SOC),$(filter $(SOC),mx7))
+obj-y += cpu.o
+obj-$(CONFIG_SYS_I2C_MXC) += i2c-mxv7.o
+endif
+ifeq ($(SOC),$(filter $(SOC),mx7 mx6 mxs))
obj-y += misc.o
obj-$(CONFIG_SPL_BUILD) += spl.o
endif
diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c
index 7137938..6e3e617 100644
--- a/arch/arm/imx-common/cpu.c
+++ b/arch/arm/imx-common/cpu.c
@@ -49,13 +49,26 @@ static char *get_reset_cause(void)
case 0x00008:
return "IPP USER";
case 0x00010:
+#ifdef CONFIG_MX7
+ return "WDOG1";
+#else
return "WDOG";
+#endif
case 0x00020:
return "JTAG HIGH-Z";
case 0x00040:
return "JTAG SW";
+#ifdef CONFIG_MX7
+ case 0x0080:
+ return "WDOG3";
+ case 0x0100:
+ return "WDOG4";
+ case 0x0200:
+ return "TEMPSENSE";
+#else
case 0x10000:
return "WARM BOOT";
+#endif
default:
return "unknown reset";
}
@@ -124,6 +137,8 @@ unsigned imx_ddr_size(void)
const char *get_imx_type(u32 imxtype)
{
switch (imxtype) {
+ case MXC_CPU_MX7D:
+ return "7D"; /* Dual-core version of the mx7 */
case MXC_CPU_MX6Q:
return "6Q"; /* Quad-core version of the mx6 */
case MXC_CPU_MX6D:
@@ -166,7 +181,8 @@ int print_cpuinfo(void)
(cpurev & 0x0000F) >> 0,
mxc_get_clock(MXC_ARM_CLK) / 1000000);
-#if defined(CONFIG_MX6) && defined(CONFIG_IMX6_THERMAL)
+#if (defined(CONFIG_MX6) && defined(CONFIG_IMX6_THERMAL)) || \
+ (defined(CONFIG_MX7) && defined(CONFIG_IMX7_THERMAL))
ret = uclass_get_device(UCLASS_THERMAL, 0, &thermal_dev);
if (!ret) {
ret = thermal_get_temp(thermal_dev, &cpu_tmp);
@@ -215,6 +231,7 @@ int cpu_mmc_init(bd_t *bis)
}
#endif
+#ifndef CONFIG_MX7
u32 get_ahb_clk(void)
{
struct mxc_ccm_reg *imx_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
@@ -226,6 +243,7 @@ u32 get_ahb_clk(void)
return get_periph_clk() / (ahb_podf + 1);
}
+#endif
void arch_preboot_os(void)
{