Commit cd562c8d07c0684a49edb41eedc207fed7690f56
Committed by
Stefano Babic
1 parent
d1aa6f2d58
Exists in
v2017.01-smarct4x
and in
33 other branches
imx: imx7d: add imx-common cpu support for imx7d
Add imx-common cpu support for imx7d SoC - Update reset_cause for imx7d - Enable watchdog driver built for imx7d Signed-off-by: Adrian Alonso <aalonso@freescale.com> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Showing 6 changed files with 39 additions and 6 deletions Side-by-side Diff
arch/arm/Makefile
| ... | ... | @@ -79,11 +79,11 @@ |
| 79 | 79 | libs-y += arch/arm/lib/ |
| 80 | 80 | |
| 81 | 81 | ifeq ($(CONFIG_SPL_BUILD),y) |
| 82 | -ifneq (,$(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_MX35)$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35)) | |
| 82 | +ifneq (,$(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_MX35)$(filter $(SOC), mx25 mx27 mx5 mx6 mx7 mx31 mx35)) | |
| 83 | 83 | libs-y += arch/arm/imx-common/ |
| 84 | 84 | endif |
| 85 | 85 | else |
| 86 | -ifneq (,$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35 mxs vf610)) | |
| 86 | +ifneq (,$(filter $(SOC), mx25 mx27 mx5 mx6 mx7 mx31 mx35 mxs vf610)) | |
| 87 | 87 | libs-y += arch/arm/imx-common/ |
| 88 | 88 | endif |
| 89 | 89 | endif |
arch/arm/cpu/armv7/Makefile
| ... | ... | @@ -12,7 +12,7 @@ |
| 12 | 12 | obj-y += cpu.o cp15.o |
| 13 | 13 | obj-y += syslib.o |
| 14 | 14 | |
| 15 | -ifneq ($(CONFIG_AM43XX)$(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA)$(CONFIG_MX6)$(CONFIG_TI81XX)$(CONFIG_AT91FAMILY)$(CONFIG_SUNXI)$(CONFIG_ARCH_SOCFPGA),) | |
| 15 | +ifneq ($(CONFIG_AM43XX)$(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA)$(CONFIG_MX6)$(CONFIG_MX7)$(CONFIG_TI81XX)$(CONFIG_AT91FAMILY)$(CONFIG_SUNXI)$(CONFIG_ARCH_SOCFPGA),) | |
| 16 | 16 | ifneq ($(CONFIG_SKIP_LOWLEVEL_INIT),y) |
| 17 | 17 | obj-y += lowlevel_init.o |
| 18 | 18 | endif |
| ... | ... | @@ -44,6 +44,7 @@ |
| 44 | 44 | obj-$(if $(filter ls102xa,$(SOC)),y) += ls102xa/ |
| 45 | 45 | obj-$(if $(filter mx5,$(SOC)),y) += mx5/ |
| 46 | 46 | obj-$(CONFIG_MX6) += mx6/ |
| 47 | +obj-$(CONFIG_MX7) += mx7/ | |
| 47 | 48 | obj-$(CONFIG_OMAP34XX) += omap3/ |
| 48 | 49 | obj-$(CONFIG_OMAP44XX) += omap4/ |
| 49 | 50 | obj-$(CONFIG_OMAP54XX) += omap5/ |
arch/arm/cpu/armv7/mx7/Makefile
arch/arm/imx-common/Makefile
| ... | ... | @@ -7,7 +7,7 @@ |
| 7 | 7 | # SPDX-License-Identifier: GPL-2.0+ |
| 8 | 8 | # |
| 9 | 9 | |
| 10 | -ifeq ($(SOC),$(filter $(SOC),mx25 mx35 mx5 mx6 vf610)) | |
| 10 | +ifeq ($(SOC),$(filter $(SOC),mx25 mx35 mx5 mx6 mx7 vf610)) | |
| 11 | 11 | obj-y = iomux-v3.o |
| 12 | 12 | endif |
| 13 | 13 | ifeq ($(SOC),$(filter $(SOC),mx5 mx6)) |
| ... | ... | @@ -18,7 +18,12 @@ |
| 18 | 18 | obj-y += misc.o |
| 19 | 19 | obj-$(CONFIG_SPL_BUILD) += spl.o |
| 20 | 20 | endif |
| 21 | -ifeq ($(SOC),$(filter $(SOC),mx6)) | |
| 21 | +ifeq ($(SOC),$(filter $(SOC),mx7)) | |
| 22 | +obj-y += cpu.o | |
| 23 | +obj-$(CONFIG_SYS_I2C_MXC) += i2c-mxv7.o | |
| 24 | +obj-$(CONFIG_SYSCOUNTER_TIMER) += syscounter.o | |
| 25 | +endif | |
| 26 | +ifeq ($(SOC),$(filter $(SOC),mx6 mx7)) | |
| 22 | 27 | obj-y += cache.o init.o |
| 23 | 28 | obj-$(CONFIG_CMD_SATA) += sata.o |
| 24 | 29 | obj-$(CONFIG_IMX_VIDEO_SKIP) += video.o |
arch/arm/imx-common/cpu.c
| ... | ... | @@ -46,13 +46,28 @@ |
| 46 | 46 | case 0x00008: |
| 47 | 47 | return "IPP USER"; |
| 48 | 48 | case 0x00010: |
| 49 | +#ifdef CONFIG_MX7 | |
| 50 | + return "WDOG1"; | |
| 51 | +#else | |
| 49 | 52 | return "WDOG"; |
| 53 | +#endif | |
| 50 | 54 | case 0x00020: |
| 51 | 55 | return "JTAG HIGH-Z"; |
| 52 | 56 | case 0x00040: |
| 53 | 57 | return "JTAG SW"; |
| 58 | + case 0x00080: | |
| 59 | + return "WDOG3"; | |
| 60 | +#ifdef CONFIG_MX7 | |
| 61 | + case 0x00100: | |
| 62 | + return "WDOG4"; | |
| 63 | + case 0x00200: | |
| 64 | + return "TEMPSENSE"; | |
| 65 | +#else | |
| 66 | + case 0x00100: | |
| 67 | + return "TEMPSENSE"; | |
| 54 | 68 | case 0x10000: |
| 55 | 69 | return "WARM BOOT"; |
| 70 | +#endif | |
| 56 | 71 | default: |
| 57 | 72 | return "unknown reset"; |
| 58 | 73 | } |
| ... | ... | @@ -122,6 +137,8 @@ |
| 122 | 137 | const char *get_imx_type(u32 imxtype) |
| 123 | 138 | { |
| 124 | 139 | switch (imxtype) { |
| 140 | + case MXC_CPU_MX7D: | |
| 141 | + return "7D"; /* Dual-core version of the mx7 */ | |
| 125 | 142 | case MXC_CPU_MX6QP: |
| 126 | 143 | return "6QP"; /* Quad-Plus version of the mx6 */ |
| 127 | 144 | case MXC_CPU_MX6DP: |
| ... | ... | @@ -236,6 +253,7 @@ |
| 236 | 253 | } |
| 237 | 254 | #endif |
| 238 | 255 | |
| 256 | +#ifndef CONFIG_MX7 | |
| 239 | 257 | u32 get_ahb_clk(void) |
| 240 | 258 | { |
| 241 | 259 | struct mxc_ccm_reg *imx_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; |
| ... | ... | @@ -247,6 +265,7 @@ |
| 247 | 265 | |
| 248 | 266 | return get_periph_clk() / (ahb_podf + 1); |
| 249 | 267 | } |
| 268 | +#endif | |
| 250 | 269 | |
| 251 | 270 | void arch_preboot_os(void) |
| 252 | 271 | { |
drivers/watchdog/Makefile
| ... | ... | @@ -7,7 +7,7 @@ |
| 7 | 7 | |
| 8 | 8 | obj-$(CONFIG_AT91SAM9_WATCHDOG) += at91sam9_wdt.o |
| 9 | 9 | obj-$(CONFIG_FTWDT010_WATCHDOG) += ftwdt010_wdt.o |
| 10 | -ifneq (,$(filter $(SOC), mx31 mx35 mx5 mx6 vf610 ls102xa)) | |
| 10 | +ifneq (,$(filter $(SOC), mx31 mx35 mx5 mx6 mx7 vf610 ls102xa)) | |
| 11 | 11 | obj-y += imx_watchdog.o |
| 12 | 12 | endif |
| 13 | 13 | obj-$(CONFIG_S5P) += s5p_wdt.o |