From a5ab0289c7dc27c307207d8f9caa39f646a2f49f Mon Sep 17 00:00:00 2001 From: Ji Luo Date: Fri, 18 Jan 2019 18:30:29 +0800 Subject: [PATCH] MA-13964 imx8q: Kick the CAAM JR before kicking the SMMU Kick the CAAM JR3 before kicking the SMMU, so SMMU error won't affect CAAM functions. Test: build and boot on imx8qxp_mek. Change-Id: Iaa9a6084f226f81a087aac1eced93e8785861113 Signed-off-by: Ji Luo --- arch/arm/mach-imx/imx8/cpu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c index c511e909fd..63de88fd69 100644 --- a/arch/arm/mach-imx/imx8/cpu.c +++ b/arch/arm/mach-imx/imx8/cpu.c @@ -185,6 +185,14 @@ int arch_cpu_init(void) gd->arch.ipc_channel_handle = ipcHndl; +/* Dual bootloader feature will require CAAM access, but JR0 and JR1 will be + * assigned to seco for imx8, use JR3 instead. + */ +#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_DUAL_BOOTLOADER) + sc_pm_set_resource_power_mode(ipcHndl, SC_R_CAAM_JR3, SC_PM_PW_MODE_ON); + sc_pm_set_resource_power_mode(ipcHndl, SC_R_CAAM_JR3_OUT, SC_PM_PW_MODE_ON); +#endif + if (IS_ENABLED(CONFIG_XEN)) return 0; @@ -203,14 +211,6 @@ int arch_cpu_init(void) return 0; #endif -/* Dual bootloader feature will require CAAM access, but JR0 and JR1 will be - * assigned to seco for imx8, use JR3 instead. - */ -#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_DUAL_BOOTLOADER) - sc_pm_set_resource_power_mode(ipcHndl, SC_R_CAAM_JR3, SC_PM_PW_MODE_ON); - sc_pm_set_resource_power_mode(ipcHndl, SC_R_CAAM_JR3_OUT, SC_PM_PW_MODE_ON); -#endif - return 0; }