diff options
author | Jacky Bai <ping.bai@nxp.com> | 2020-01-07 15:10:48 +0800 |
---|---|---|
committer | Jacky Bai <ping.bai@nxp.com> | 2020-02-09 20:58:49 +0800 |
commit | 47188dc9ad7290c47f7c966a7db86d6649e0a640 (patch) | |
tree | 0933aebc2b4fce31684bbfcc2ac7fee581a0b683 /plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c | |
parent | 026aac97ede8730f14dffeb04e2d3950da7358a3 (diff) |
plat: imx8mn: Add the csu init on imx8mn
Add the CSU init on i.MX8MN & config the ocram
secure access range. CSU config for specific
system design can be added in the 'csu_cfg' array.
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Diffstat (limited to 'plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c')
-rw-r--r-- | plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c index 190a874e..5c5e40c5 100644 --- a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c +++ b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c @@ -1,5 +1,5 @@ /* - * Copyright 2019 NXP + * Copyright 2019-2020 NXP * * SPDX-License-Identifier: BSD-3-Clause */ @@ -27,6 +27,7 @@ #include <imx_uart.h> #include <imx_rdc.h> #include <imx8m_caam.h> +#include <imx8m_csu.h> #include <plat_imx8.h> static const mmap_region_t imx_mmap[] = { @@ -60,6 +61,22 @@ static const struct imx_rdc_cfg rdc[] = { {0}, }; +static const struct imx_csu_cfg csu_cfg[] = { + /* peripherals csl setting */ + CSU_CSLx(118, CSU_SEC_LEVEL_2, UNLOCKED), + CSU_CSLx(119, CSU_SEC_LEVEL_2, UNLOCKED), + + /* master HP0~1 */ + + /* SA setting */ + + /* HP control setting */ + + /* Sentinel */ + {0} +}; + + static entry_point_info_t bl32_image_ep_info; static entry_point_info_t bl33_image_ep_info; @@ -115,6 +132,11 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, imx_rdc_init(rdc); + imx_csu_init(csu_cfg); + + /* config the ocram memory range for secure access */ + mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, 0xc1); + imx8m_caam_init(); console_imx_uart_register(IMX_BOOT_UART_BASE, IMX_BOOT_UART_CLK_IN_HZ, |