diff options
author | Rajesh Bhagat <rajesh.bhagat@nxp.com> | 2018-11-05 18:03:08 +0000 |
---|---|---|
committer | York Sun <york.sun@nxp.com> | 2018-12-06 14:37:57 -0800 |
commit | 7f91b6584446856f8b4b4d8bb28ac77f9f011e6c (patch) | |
tree | 13c17648c52ca2a4af4d8d972f0e775a03c7fe19 /board/freescale | |
parent | 10c8aa16d4f6b395d72fb0b0d06ed405e1985d81 (diff) |
armv8: ls1012afrx: Add TFABOOT support
TFABOOT support includes:
- ls1012a2g5rdb/ls1012afrdm/ls1012afrwy_tfa_defconfig to be
loaded by trusted firmware
- define BOOTCOMMAND for TFABOOT
Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[YS: remove unnecessary braces]
Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'board/freescale')
-rw-r--r-- | board/freescale/ls1012afrdm/MAINTAINERS | 3 | ||||
-rw-r--r-- | board/freescale/ls1012afrdm/ls1012afrdm.c | 28 |
2 files changed, 30 insertions, 1 deletions
diff --git a/board/freescale/ls1012afrdm/MAINTAINERS b/board/freescale/ls1012afrdm/MAINTAINERS index f3fcdb87ae..5ef4ae8fe9 100644 --- a/board/freescale/ls1012afrdm/MAINTAINERS +++ b/board/freescale/ls1012afrdm/MAINTAINERS @@ -1,9 +1,12 @@ LS1012AFRDM BOARD M: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> +M: Rajesh Bhagat <rajesh.bhagat@nxp.com> S: Maintained F: board/freescale/ls1012afrdm/ F: include/configs/ls1012afrdm.h F: configs/ls1012afrdm_qspi_defconfig +F: configs/ls1012afrdm_tfa_defconfig +F: configs/ls1012afrwy_tfa_defconfig LS1012AFRWY BOARD M: Bhaskar Upadhaya <bhaskar.upadhaya@nxp.com> diff --git a/board/freescale/ls1012afrdm/ls1012afrdm.c b/board/freescale/ls1012afrdm/ls1012afrdm.c index 5db1027717..b4c611e19f 100644 --- a/board/freescale/ls1012afrdm/ls1012afrdm.c +++ b/board/freescale/ls1012afrdm/ls1012afrdm.c @@ -80,6 +80,30 @@ int esdhc_status_fixup(void *blob, const char *compat) } #endif +#ifdef CONFIG_TFABOOT +int dram_init(void) +{ +#ifdef CONFIG_TARGET_LS1012AFRWY + int board_rev; +#endif + + gd->ram_size = tfa_get_dram_size(); + + if (!gd->ram_size) { +#ifdef CONFIG_TARGET_LS1012AFRWY + board_rev = get_board_version(); + + if (board_rev & BOARD_REV_C) + gd->ram_size = SYS_SDRAM_SIZE_1024; + else + gd->ram_size = SYS_SDRAM_SIZE_512; +#else + gd->ram_size = CONFIG_SYS_SDRAM_SIZE; +#endif + } + return 0; +} +#else int dram_init(void) { #ifdef CONFIG_TARGET_LS1012AFRWY @@ -122,6 +146,7 @@ int dram_init(void) return 0; } +#endif int board_early_init_f(void) { @@ -139,7 +164,8 @@ 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_ENV_IS_NOWHERE gd->env_addr = (ulong)&default_environment[0]; |