summaryrefslogtreecommitdiff
path: root/board/warp7/warp7.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-04-30 07:14:05 -0400
committerTom Rini <trini@konsulko.com>2018-04-30 07:14:05 -0400
commitb25f8e2112b1582ce6386e846800a31bab688e50 (patch)
tree7fe8146a99851ce9256b8de3de2c86f1b276b92b /board/warp7/warp7.c
parentabeb9d7897510533ce3a0a9515cac16db5bed834 (diff)
parent07a8f79ee850b1e59371519f179d32fea171bbec (diff)
Merge git://git.denx.de/u-boot-imx
Diffstat (limited to 'board/warp7/warp7.c')
-rw-r--r--board/warp7/warp7.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c
index 327f656c44c..da52b183bd1 100644
--- a/board/warp7/warp7.c
+++ b/board/warp7/warp7.c
@@ -10,6 +10,7 @@
#include <asm/arch/mx7-pins.h>
#include <asm/arch/sys_proto.h>
#include <asm/gpio.h>
+#include <asm/mach-imx/hab.h>
#include <asm/mach-imx/iomux-v3.h>
#include <asm/mach-imx/mxc_i2c.h>
#include <asm/io.h>
@@ -57,6 +58,11 @@ int dram_init(void)
{
gd->ram_size = PHYS_SDRAM_SIZE;
+ /* Subtract the defined OPTEE runtime firmware length */
+#ifdef CONFIG_OPTEE_TZDRAM_SIZE
+ gd->ram_size -= CONFIG_OPTEE_TZDRAM_SIZE;
+#endif
+
return 0;
}
@@ -175,7 +181,17 @@ int checkboard(void)
else
mode = "non-secure";
+#ifdef CONFIG_OPTEE_TZDRAM_SIZE
+ unsigned long optee_start, optee_end;
+
+ optee_end = PHYS_SDRAM + PHYS_SDRAM_SIZE;
+ optee_start = optee_end - CONFIG_OPTEE_TZDRAM_SIZE;
+
+ printf("Board: WARP7 in %s mode OPTEE DRAM 0x%08lx-0x%08lx\n",
+ mode, optee_start, optee_end);
+#else
printf("Board: WARP7 in %s mode\n", mode);
+#endif
return 0;
}
@@ -203,6 +219,13 @@ int board_late_init(void)
*/
clrsetbits_le16(&wdog->wcr, 0, 0x10);
+#ifdef CONFIG_SECURE_BOOT
+ /* Determine HAB state */
+ env_set_ulong(HAB_ENABLED_ENVNAME, imx_hab_is_enabled());
+#else
+ env_set_ulong(HAB_ENABLED_ENVNAME, 0);
+#endif
+
#ifdef CONFIG_SERIAL_TAG
/* Set serial# standard environment variable based on OTP settings */
get_board_serial(&serialnr);