yu.dong | c33b307 | 2024-08-21 23:14:49 -0700 | [diff] [blame^] | 1 | #ifndef _SONIC_CONTROL_H_ |
| 2 | #define _SONIC_CONTROL_H_ |
| 3 | |
| 4 | #include "kal_public_api.h" |
| 5 | #include "sonic_control_public.h" |
| 6 | #include "reg_base.h" |
| 7 | #include "dsp_header_define_csif_memory.h" |
| 8 | #include "btdma_public.h" |
| 9 | #include "csif_l1core_public_api.h" |
| 10 | #include "dsp_public_dbgc.h" |
| 11 | #if defined(__MD97P__) |
| 12 | //ToDo: Add idle signal to deactivate mcore |
| 13 | #else |
| 14 | #include "dsp_public_eintc.h" |
| 15 | #endif |
| 16 | |
| 17 | /********************************/ |
| 18 | /* Structure/Enum Define */ |
| 19 | /********************************/ |
| 20 | typedef enum{ |
| 21 | SONIC_THREAD0, |
| 22 | SONIC_THREAD1, |
| 23 | SONIC_THREAD2, |
| 24 | #if (!(defined(MT6853) && defined(__PALMER_SIMULATION__)) && !(defined(MT6833) || defined(MT6877))) |
| 25 | SONIC_THREAD3, |
| 26 | #endif |
| 27 | SONIC_THREAD_NUM |
| 28 | } THREAD_SONIC_ENUM; |
| 29 | |
| 30 | typedef struct{ |
| 31 | kal_uint32 thread0 : 1; |
| 32 | kal_uint32 thread1 : 1; |
| 33 | kal_uint32 thread2 : 1; |
| 34 | kal_uint32 thread3 : 1; |
| 35 | } THREAD_BITWISE_STRUCT; |
| 36 | |
| 37 | typedef struct{ |
| 38 | kal_uint32 start_frc; |
| 39 | kal_uint32 end_frc; |
| 40 | } TIME_RECORD_STRUCT; |
| 41 | |
| 42 | |
| 43 | /********************************/ |
| 44 | /* Function extern */ |
| 45 | /********************************/ |
| 46 | |
| 47 | extern void sonic_activate_by_btdma_ungate(void); |
| 48 | extern void sonic_activate_by_release_idle(kal_uint32 th_bitmap); |
| 49 | extern kal_uint32 sonic_activate(kal_uint32 th_bitmap); |
| 50 | extern void sonic_deactivate(kal_uint32 th_bitmap); |
| 51 | extern kal_uint32 sonic_check_activate_done(kal_uint32 th_bitmap); |
| 52 | extern kal_uint32 sonic_check_deactivate_done(kal_uint32 th_bitmap); |
| 53 | void sonic_deactivate_cb_n0(CSIF_ID_STATUS_t*); |
| 54 | extern void sonic_clear_WFI_mask(void); |
| 55 | extern kal_uint32 sonic_check_idle_flag_by_module(kal_uint32 thread_id, kal_uint32 user_id); |
| 56 | |
| 57 | #endif /*_SONIC_CONTROL_H_*/ |