soc: nxp: imxrt: imxrt118x: change trdc permission getting strategy
When TRDC permission fails to be obtained, it does not recycle to access ELE core to prevent blocking problems. The current practice only generates a log warning alarm. Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
This commit is contained in:
parent
06be6ebf3a
commit
ef348187ae
1 changed files with 21 additions and 16 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2024 NXP
|
* Copyright 2024-2025 NXP
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
@ -7,6 +7,7 @@
|
||||||
#include <zephyr/kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
#include <zephyr/device.h>
|
#include <zephyr/device.h>
|
||||||
#include <zephyr/init.h>
|
#include <zephyr/init.h>
|
||||||
|
#include <zephyr/logging/log.h>
|
||||||
#include <soc.h>
|
#include <soc.h>
|
||||||
#include <zephyr/linker/sections.h>
|
#include <zephyr/linker/sections.h>
|
||||||
#include <zephyr/linker/linker-defs.h>
|
#include <zephyr/linker/linker-defs.h>
|
||||||
|
@ -23,6 +24,8 @@
|
||||||
#include <zephyr/dt-bindings/clock/imx_ccm_rev2.h>
|
#include <zephyr/dt-bindings/clock/imx_ccm_rev2.h>
|
||||||
#include <cmsis_core.h>
|
#include <cmsis_core.h>
|
||||||
|
|
||||||
|
LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set ELE_STICK_FAILED_STS to 0 when ELE status check is not required,
|
* Set ELE_STICK_FAILED_STS to 0 when ELE status check is not required,
|
||||||
* which is useful when debug reset, where the core has already get the
|
* which is useful when debug reset, where the core has already get the
|
||||||
|
@ -528,27 +531,29 @@ static ALWAYS_INLINE void trdc_enable_all_access(void)
|
||||||
sts = ELE_BaseAPI_GetFwStatus(MU_RT_S3MUA, &ele_fw_sts);
|
sts = ELE_BaseAPI_GetFwStatus(MU_RT_S3MUA, &ele_fw_sts);
|
||||||
} while (sts != kStatus_Success);
|
} while (sts != kStatus_Success);
|
||||||
|
|
||||||
do {
|
|
||||||
#if defined(CONFIG_SOC_MIMXRT1189_CM33)
|
#if defined(CONFIG_SOC_MIMXRT1189_CM33)
|
||||||
/* Release TRDC A to CM33 core */
|
/* Release TRDC AON to CM33 core */
|
||||||
sts = ELE_BaseAPI_ReleaseRDC(MU_RT_S3MUA, ELE_TRDC_AON_ID, ELE_CORE_CM33_ID);
|
sts = ELE_BaseAPI_ReleaseRDC(MU_RT_S3MUA, ELE_TRDC_AON_ID, ELE_CORE_CM33_ID);
|
||||||
#elif defined(CONFIG_SOC_MIMXRT1189_CM7)
|
#elif defined(CONFIG_SOC_MIMXRT1189_CM7)
|
||||||
/* Release TRDC A to CM7 core */
|
/* Release TRDC AON to CM7 core */
|
||||||
sts = ELE_BaseAPI_ReleaseRDC(MU_RT_S3MUA, ELE_TRDC_AON_ID, ELE_CORE_CM7_ID);
|
sts = ELE_BaseAPI_ReleaseRDC(MU_RT_S3MUA, ELE_TRDC_AON_ID, ELE_CORE_CM7_ID);
|
||||||
#endif
|
#endif
|
||||||
} while (ELE_IS_FAILED(sts));
|
if (sts != kStatus_Success) {
|
||||||
|
LOG_WRN("warning: TRDC AON permission get failed. If core don't get TRDC "
|
||||||
|
"AON permission, AON domain permission can't be configured.");
|
||||||
|
}
|
||||||
|
|
||||||
/* Release TRDC W to CM33 core */
|
|
||||||
do {
|
|
||||||
#if defined(CONFIG_SOC_MIMXRT1189_CM33)
|
#if defined(CONFIG_SOC_MIMXRT1189_CM33)
|
||||||
/* Release TRDC A to CM33 core */
|
/* Release TRDC Wakeup to CM33 core */
|
||||||
sts = ELE_BaseAPI_ReleaseRDC(MU_RT_S3MUA, ELE_TRDC_WAKEUP_ID, ELE_CORE_CM33_ID);
|
sts = ELE_BaseAPI_ReleaseRDC(MU_RT_S3MUA, ELE_TRDC_WAKEUP_ID, ELE_CORE_CM33_ID);
|
||||||
#elif defined(CONFIG_SOC_MIMXRT1189_CM7)
|
#elif defined(CONFIG_SOC_MIMXRT1189_CM7)
|
||||||
/* Release TRDC A to CM7 core */
|
/* Release TRDC Wakeup to CM7 core */
|
||||||
sts = ELE_BaseAPI_ReleaseRDC(MU_RT_S3MUA, ELE_TRDC_WAKEUP_ID, ELE_CORE_CM7_ID);
|
sts = ELE_BaseAPI_ReleaseRDC(MU_RT_S3MUA, ELE_TRDC_WAKEUP_ID, ELE_CORE_CM7_ID);
|
||||||
#endif
|
#endif
|
||||||
} while (ELE_IS_FAILED(sts));
|
if (sts != kStatus_Success) {
|
||||||
|
LOG_WRN("warning: TRDC Wakeup permission get failed. If core don't get TRDC "
|
||||||
|
"Wakeup permission, Wakeup domain permission can't be configured.");
|
||||||
|
}
|
||||||
|
|
||||||
/* Set the master domain access configuration for eDMA3/eDMA4 */
|
/* Set the master domain access configuration for eDMA3/eDMA4 */
|
||||||
trdc_non_processor_domain_assignment_t edmaAssignment;
|
trdc_non_processor_domain_assignment_t edmaAssignment;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue