|
1 | 1 | /*
|
2 |
| - * Copyright 2024-2025 NXP |
| 2 | + * Copyright 2024 NXP |
3 | 3 | *
|
4 | 4 | * SPDX-License-Identifier: Apache-2.0
|
5 | 5 | */
|
6 | 6 |
|
7 | 7 | #include <zephyr/kernel.h>
|
8 | 8 | #include <zephyr/device.h>
|
9 | 9 | #include <zephyr/init.h>
|
10 |
| -#include <zephyr/logging/log.h> |
11 | 10 | #include <soc.h>
|
12 | 11 | #include <zephyr/linker/sections.h>
|
13 | 12 | #include <zephyr/linker/linker-defs.h>
|
|
24 | 23 | #include <zephyr/dt-bindings/clock/imx_ccm_rev2.h>
|
25 | 24 | #include <cmsis_core.h>
|
26 | 25 |
|
27 |
| -LOG_MODULE_DECLARE(soc, CONFIG_SOC_LOG_LEVEL); |
28 |
| - |
29 | 26 | /*
|
30 | 27 | * Set ELE_STICK_FAILED_STS to 0 when ELE status check is not required,
|
31 | 28 | * which is useful when debug reset, where the core has already get the
|
@@ -524,36 +521,34 @@ static ALWAYS_INLINE void trdc_enable_all_access(void)
|
524 | 521 | status_t sts;
|
525 | 522 | uint8_t i, j;
|
526 | 523 |
|
527 |
| - /* Get ELE FW status */ |
| 524 | + /* Get ELE FW status */ |
528 | 525 | do {
|
529 | 526 | uint32_t ele_fw_sts;
|
530 | 527 |
|
531 | 528 | sts = ELE_BaseAPI_GetFwStatus(MU_RT_S3MUA, &ele_fw_sts);
|
532 | 529 | } while (sts != kStatus_Success);
|
533 | 530 |
|
| 531 | + do { |
534 | 532 | #if defined(CONFIG_SOC_MIMXRT1189_CM33)
|
535 |
| - /* Release TRDC AON to CM33 core */ |
536 |
| - sts = ELE_BaseAPI_ReleaseRDC(MU_RT_S3MUA, ELE_TRDC_AON_ID, ELE_CORE_CM33_ID); |
| 533 | + /* Release TRDC A to CM33 core */ |
| 534 | + sts = ELE_BaseAPI_ReleaseRDC(MU_RT_S3MUA, ELE_TRDC_AON_ID, ELE_CORE_CM33_ID); |
537 | 535 | #elif defined(CONFIG_SOC_MIMXRT1189_CM7)
|
538 |
| - /* Release TRDC AON to CM7 core */ |
539 |
| - sts = ELE_BaseAPI_ReleaseRDC(MU_RT_S3MUA, ELE_TRDC_AON_ID, ELE_CORE_CM7_ID); |
| 536 | + /* Release TRDC A to CM7 core */ |
| 537 | + sts = ELE_BaseAPI_ReleaseRDC(MU_RT_S3MUA, ELE_TRDC_AON_ID, ELE_CORE_CM7_ID); |
540 | 538 | #endif
|
541 |
| - if (sts != kStatus_Success) { |
542 |
| - LOG_WRN("warning: TRDC AON permission get failed. If core don't get TRDC " |
543 |
| - "AON permission, AON domain permission can't be configured."); |
544 |
| - } |
| 539 | + } while (ELE_IS_FAILED(sts)); |
545 | 540 |
|
| 541 | + /* Release TRDC W to CM33 core */ |
| 542 | + do { |
546 | 543 | #if defined(CONFIG_SOC_MIMXRT1189_CM33)
|
547 |
| - /* Release TRDC Wakeup to CM33 core */ |
548 |
| - sts = ELE_BaseAPI_ReleaseRDC(MU_RT_S3MUA, ELE_TRDC_WAKEUP_ID, ELE_CORE_CM33_ID); |
| 544 | + /* Release TRDC A to CM33 core */ |
| 545 | + sts = ELE_BaseAPI_ReleaseRDC(MU_RT_S3MUA, ELE_TRDC_WAKEUP_ID, ELE_CORE_CM33_ID); |
549 | 546 | #elif defined(CONFIG_SOC_MIMXRT1189_CM7)
|
550 |
| - /* Release TRDC Wakeup to CM7 core */ |
551 |
| - sts = ELE_BaseAPI_ReleaseRDC(MU_RT_S3MUA, ELE_TRDC_WAKEUP_ID, ELE_CORE_CM7_ID); |
| 547 | + /* Release TRDC A to CM7 core */ |
| 548 | + sts = ELE_BaseAPI_ReleaseRDC(MU_RT_S3MUA, ELE_TRDC_WAKEUP_ID, ELE_CORE_CM7_ID); |
552 | 549 | #endif
|
553 |
| - if (sts != kStatus_Success) { |
554 |
| - LOG_WRN("warning: TRDC Wakeup permission get failed. If core don't get TRDC " |
555 |
| - "Wakeup permission, Wakeup domain permission can't be configured."); |
556 |
| - } |
| 550 | + } while (ELE_IS_FAILED(sts)); |
| 551 | + |
557 | 552 |
|
558 | 553 | /* Set the master domain access configuration for eDMA3/eDMA4 */
|
559 | 554 | trdc_non_processor_domain_assignment_t edmaAssignment;
|
|
0 commit comments