aboutsummaryrefslogtreecommitdiff
path: root/board/freescale
diff options
context:
space:
mode:
authorRajesh Bhagat2018-11-05 18:03:04 +0000
committerYork Sun2018-12-06 14:37:19 -0800
commit10c8aa16d4f6b395d72fb0b0d06ed405e1985d81 (patch)
tree231212b49b747c9cd11eaa98d5746bc537c87c60 /board/freescale
parente5141cbe965e947ee42aa77aea569327fb80810d (diff)
armv8: ls1012aqds: Add TFABOOT support
TFABOOT support includes: - ls1012aqds_tfa_defconfig to be loaded by trusted firmware - environment address and size changes for TFABOOT - define BOOTCOMMAND for TFABOOT Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com> Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com> Signed-off-by: Pankit Garg <pankit.garg@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'board/freescale')
-rw-r--r--board/freescale/ls1012aqds/MAINTAINERS2
-rw-r--r--board/freescale/ls1012aqds/ls1012aqds.c17
2 files changed, 16 insertions, 3 deletions
diff --git a/board/freescale/ls1012aqds/MAINTAINERS b/board/freescale/ls1012aqds/MAINTAINERS
index 27c4affd30b..2dcc22a485f 100644
--- a/board/freescale/ls1012aqds/MAINTAINERS
+++ b/board/freescale/ls1012aqds/MAINTAINERS
@@ -1,6 +1,8 @@
LS1012AQDS BOARD
M: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
+M: Rajesh Bhagat <rajesh.bhagat@nxp.com>
S: Maintained
F: board/freescale/ls1012aqds/
F: include/configs/ls1012aqds.h
F: configs/ls1012aqds_qspi_defconfig
+F: configs/ls1012aqds_tfa_defconfig
diff --git a/board/freescale/ls1012aqds/ls1012aqds.c b/board/freescale/ls1012aqds/ls1012aqds.c
index 3a1c2351c43..a862fe6a93d 100644
--- a/board/freescale/ls1012aqds/ls1012aqds.c
+++ b/board/freescale/ls1012aqds/ls1012aqds.c
@@ -57,6 +57,16 @@ int checkboard(void)
return 0;
}
+#ifdef CONFIG_TFABOOT
+int dram_init(void)
+{
+ gd->ram_size = tfa_get_dram_size();
+ if (!gd->ram_size)
+ gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
+
+ return 0;
+}
+#else
int dram_init(void)
{
static const struct fsl_mmdc_info mparam = {
@@ -76,7 +86,6 @@ int dram_init(void)
};
mmdc_init(&mparam);
-
gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
#if !defined(CONFIG_SPL) || defined(CONFIG_SPL_BUILD)
/* This will break-before-make MMU for DDR */
@@ -85,6 +94,7 @@ int dram_init(void)
return 0;
}
+#endif
int board_early_init_f(void)
{
@@ -112,8 +122,9 @@ int board_init(void)
/* Set CCI-400 control override register to enable barrier
* transaction */
- out_le32(&cci->ctrl_ord,
- CCI400_CTRLORD_EN_BARRIER);
+ if (current_el() == 3)
+ out_le32(&cci->ctrl_ord,
+ CCI400_CTRLORD_EN_BARRIER);
#ifdef CONFIG_SYS_FSL_ERRATUM_A010315
erratum_a010315();