diff options
author | Ye.Li <B37916@freescale.com> | 2015-02-01 22:20:33 +0800 |
---|---|---|
committer | Peng Fan <Peng.Fan@freescale.com> | 2015-04-29 14:56:22 +0800 |
commit | 6466e025ff0bf4277dda8bbdc0cc008283fb6eb4 (patch) | |
tree | 09c10753bd2433e4b9c2af34ed0f250ce7cae9e0 /arch/arm/include | |
parent | 93c2123adf6be5294d6c8b2583c499bb50c3cc59 (diff) | |
download | u-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/include')
-rw-r--r-- | arch/arm/include/asm/arch-imx/cpu.h | 5 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-mx7/gpio.h | 12 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-mx7/sys_proto.h | 45 |
3 files changed, 60 insertions, 2 deletions
diff --git a/arch/arm/include/asm/arch-imx/cpu.h b/arch/arm/include/asm/arch-imx/cpu.h index 4715f4e..80a4d77 100644 --- a/arch/arm/include/asm/arch-imx/cpu.h +++ b/arch/arm/include/asm/arch-imx/cpu.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2014 Freescale Semiconductor, Inc. + * Copyright (C) 2014-2015 Freescale Semiconductor, Inc. * * SPDX-License-Identifier: GPL-2.0+ */ @@ -11,7 +11,8 @@ #define MXC_CPU_MX6SX 0x62 #define MXC_CPU_MX6Q 0x63 #define MXC_CPU_MX6D 0x64 -#define MXC_CPU_MX6SOLO 0x65 /* dummy ID */ +#define MXC_CPU_MX6SOLO 0x66 /* dummy */ +#define MXC_CPU_MX7D 0x72 #define CS0_128 0 #define CS0_64M_CS1_64M 1 diff --git a/arch/arm/include/asm/arch-mx7/gpio.h b/arch/arm/include/asm/arch-mx7/gpio.h new file mode 100644 index 0000000..b7890c2 --- /dev/null +++ b/arch/arm/include/asm/arch-mx7/gpio.h @@ -0,0 +1,12 @@ +/* + * Copyright (C) 2015 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __ASM_ARCH_MX7_GPIO_H +#define __ASM_ARCH_MX7_GPIO_H + +#include <asm/imx-common/gpio.h> + +#endif /* __ASM_ARCH_MX7_GPIO_H */ diff --git a/arch/arm/include/asm/arch-mx7/sys_proto.h b/arch/arm/include/asm/arch-mx7/sys_proto.h new file mode 100644 index 0000000..eb6771b --- /dev/null +++ b/arch/arm/include/asm/arch-mx7/sys_proto.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2015 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + + +#ifndef _SYS_PROTO_H_ +#define _SYS_PROTO_H_ + +#include <asm/imx-common/regs-common.h> +#include "../arch-imx/cpu.h" + +#define is_soc_rev(rev) ((int)((get_cpu_rev() & 0xFF) - rev)) +u32 get_cpu_rev(void); + +/* returns MXC_CPU_ value */ +#define cpu_type(rev) (((rev) >> 12)&0xff) + +/* use with MXC_CPU_ constants */ +#define is_cpu_type(cpu) (cpu_type(get_cpu_rev()) == cpu) + +const char *get_imx_type(u32 imxtype); +unsigned imx_ddr_size(void); + +int arch_auxiliary_core_up(u32 core_id, u32 boot_private_data); +int arch_auxiliary_core_check_up(u32 core_id); + +/* + * Initializes on-chip ethernet controllers. + * to override, implement board_eth_init() + */ + +int fecmxc_initialize(bd_t *bis); +u32 get_ahb_clk(void); +u32 get_periph_clk(void); + +int mxs_reset_block(struct mxs_register_32 *reg); +int mxs_wait_mask_set(struct mxs_register_32 *reg, + uint32_t mask, + unsigned int timeout); +int mxs_wait_mask_clr(struct mxs_register_32 *reg, + uint32_t mask, + unsigned int timeout); +#endif |