-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix an issue on RT1180 where TRDC permissions failed to be obtained #85545
Fix an issue on RT1180 where TRDC permissions failed to be obtained #85545
Conversation
3a7e740
to
a2ecdfc
Compare
soc/nxp/imxrt/imxrt118x/soc.c
Outdated
#if defined(CONFIG_SOC_MIMXRT1189_CM33) | ||
/* Release TRDC A to CM33 core */ | ||
sts = ELE_BaseAPI_ReleaseRDC(MU_RT_S3MUA, ELE_TRDC_AON_ID, ELE_CORE_CM33_ID); | ||
#elif defined(CONFIG_SOC_MIMXRT1189_CM7) | ||
/* Release TRDC A to CM7 core */ | ||
sts = ELE_BaseAPI_ReleaseRDC(MU_RT_S3MUA, ELE_TRDC_AON_ID, ELE_CORE_CM7_ID); | ||
#endif | ||
} while (ELE_IS_FAILED(sts)); | ||
if (sts != kStatus_Success) { | ||
LOG_ERR("error: TRDC A permission get failed."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As it reports false errors,
a Warning (not Error) can be a compromise.
We do not want stress users by "False" error messages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I have modified to warning log. Thank you.
a2ecdfc
to
49a2b3a
Compare
soc/nxp/imxrt/imxrt118x/soc.c
Outdated
@@ -528,27 +531,27 @@ static ALWAYS_INLINE void trdc_enable_all_access(void) | |||
sts = ELE_BaseAPI_GetFwStatus(MU_RT_S3MUA, &ele_fw_sts); | |||
} while (sts != kStatus_Success); | |||
|
|||
do { | |||
#if defined(CONFIG_SOC_MIMXRT1189_CM33) | |||
/* Release TRDC A to CM33 core */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the code indentation as the enclosing while
loop has been removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Fixed.
@@ -528,27 +531,27 @@ static ALWAYS_INLINE void trdc_enable_all_access(void) | |||
sts = ELE_BaseAPI_GetFwStatus(MU_RT_S3MUA, &ele_fw_sts); | |||
} while (sts != kStatus_Success); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about this while loop? Also line 524 should be fixed to use a tab instead of spaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This while loop don't need to be removed because the correct process need to get FW status firstly, and FW status getting won't block the CPU generally.
524 line have been used tab. Thank you.
soc/nxp/imxrt/imxrt118x/soc.c
Outdated
#if defined(CONFIG_SOC_MIMXRT1189_CM33) | ||
/* Release TRDC A to CM33 core */ | ||
sts = ELE_BaseAPI_ReleaseRDC(MU_RT_S3MUA, ELE_TRDC_AON_ID, ELE_CORE_CM33_ID); | ||
#elif defined(CONFIG_SOC_MIMXRT1189_CM7) | ||
/* Release TRDC A to CM7 core */ | ||
sts = ELE_BaseAPI_ReleaseRDC(MU_RT_S3MUA, ELE_TRDC_AON_ID, ELE_CORE_CM7_ID); | ||
#endif | ||
} while (ELE_IS_FAILED(sts)); | ||
if (sts != kStatus_Success) { | ||
LOG_WRN("warning: TRDC A permission get failed."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change to TRDC AON
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
soc/nxp/imxrt/imxrt118x/soc.c
Outdated
} while (ELE_IS_FAILED(sts)); | ||
|
||
if (sts != kStatus_Success) { | ||
LOG_WRN("warning: TRDC W permission get failed."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change to TRDC Wakeup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the implications if the Release TRDC fails? This should be mentioned in the warning message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. I added information in the warning log.
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 <[email protected]>
49a2b3a
to
9cacfc3
Compare
Hi @lucien-nxp After this commit, @tomi-font has reported error on Zephyr CI Discord: https://discordapp.com/channels/720317445772017664/1014241011989487716/1339527153347330110 Other common samples are fine, so most probably this is a configuration issue (in a worst case to remove the soc logs). |
@lucien-nxp I confirm this is breaking CI in main https://github.com/zephyrproject-rtos/zephyr/actions/runs/13303203198/job/37148374503 |
FWIW the revert PR is here: #85720 |
Mahesh help me resolve the building issue and create #85741. Thank you for you reminding. |
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.