Merge tag 'mips-fixes-for-2020.04' of git://git.denx.de/u-boot-mips
[oweals/u-boot.git] / arch / arm / mach-imx / mx7 / soc.c
index ccfab826e3696158c8cec761d9ed19d3605f8821..4aafeed188101a6d6f90bc5450a985fba3ff6d8f 100644 (file)
@@ -14,6 +14,7 @@
 #include <asm/arch/imx-rdc.h>
 #include <asm/arch/crm_regs.h>
 #include <dm.h>
+#include <env.h>
 #include <imx_thermal.h>
 #include <fsl_sec.h>
 #include <asm/setup.h>
@@ -121,7 +122,7 @@ static void isolate_resource(void)
 }
 #endif
 
-#if defined(CONFIG_SECURE_BOOT)
+#if defined(CONFIG_IMX_HAB)
 struct imx_sec_config_fuse_t const imx_sec_config_fuse = {
        .bank = 1,
        .word = 3,
@@ -192,6 +193,34 @@ static void init_cpu_basic(void)
 #endif
 }
 
+#ifdef CONFIG_IMX_BOOTAUX
+/*
+ * Table of mappings of physical mem regions in both
+ * Cortex-A7 and Cortex-M4 address spaces.
+ *
+ * For additional details check sections 2.1.2 and 2.1.3 in
+ * i.MX7Dual Applications Processor Reference Manual
+ *
+ */
+const struct rproc_att hostmap[] = {
+       /* aux core , host core,  size */
+       { 0x00000000, 0x00180000, 0x8000 }, /* OCRAM_S */
+       { 0x00180000, 0x00180000, 0x8000 }, /* OCRAM_S */
+       { 0x20180000, 0x00180000, 0x8000 }, /* OCRAM_S */
+       { 0x1fff8000, 0x007f8000, 0x8000 }, /* TCML */
+       { 0x20000000, 0x00800000, 0x8000 }, /* TCMU */
+       { 0x00900000, 0x00900000, 0x20000 }, /* OCRAM_128KB */
+       { 0x20200000, 0x00900000, 0x20000 }, /* OCRAM_128KB */
+       { 0x00920000, 0x00920000, 0x20000 }, /* OCRAM_EPDC */
+       { 0x20220000, 0x00920000, 0x20000 }, /* OCRAM_EPDC */
+       { 0x00940000, 0x00940000, 0x20000 }, /* OCRAM_PXP */
+       { 0x20240000, 0x00940000, 0x20000 }, /* OCRAM_PXP */
+       { 0x10000000, 0x80000000, 0x0fff0000 }, /* DDR Code alias */
+       { 0x80000000, 0x80000000, 0xe0000000 }, /* DDRC */
+       { /* sentinel */ }
+};
+#endif
+
 #ifndef CONFIG_SKIP_LOWLEVEL_INIT
 /* enable all periherial can be accessed in nosec mode */
 static void init_csu(void)
@@ -382,7 +411,7 @@ void s_init(void)
 void reset_misc(void)
 {
 #ifndef CONFIG_SPL_BUILD
-#ifdef CONFIG_VIDEO_MXS
+#if defined(CONFIG_VIDEO_MXS) && !defined(CONFIG_DM_VIDEO)
        lcdif_power_down();
 #endif
 #endif