| #ifndef _SONIC_CONTROL_H_ |
| #define _SONIC_CONTROL_H_ |
| |
| #include "kal_public_api.h" |
| #include "sonic_control_public.h" |
| #include "reg_base.h" |
| #include "dsp_header_define_csif_memory.h" |
| #include "btdma_public.h" |
| #include "csif_l1core_public_api.h" |
| #include "dsp_public_dbgc.h" |
| #if defined(__MD97P__) |
| //ToDo: Add idle signal to deactivate mcore |
| #else |
| #include "dsp_public_eintc.h" |
| #endif |
| |
| /********************************/ |
| /* Structure/Enum Define */ |
| /********************************/ |
| typedef enum{ |
| SONIC_THREAD0, |
| SONIC_THREAD1, |
| SONIC_THREAD2, |
| #if (!(defined(MT6853) && defined(__PALMER_SIMULATION__)) && !(defined(MT6833) || defined(MT6877))) |
| SONIC_THREAD3, |
| #endif |
| SONIC_THREAD_NUM |
| } THREAD_SONIC_ENUM; |
| |
| typedef struct{ |
| kal_uint32 thread0 : 1; |
| kal_uint32 thread1 : 1; |
| kal_uint32 thread2 : 1; |
| kal_uint32 thread3 : 1; |
| } THREAD_BITWISE_STRUCT; |
| |
| typedef struct{ |
| kal_uint32 start_frc; |
| kal_uint32 end_frc; |
| } TIME_RECORD_STRUCT; |
| |
| |
| /********************************/ |
| /* Function extern */ |
| /********************************/ |
| |
| extern void sonic_activate_by_btdma_ungate(void); |
| extern void sonic_activate_by_release_idle(kal_uint32 th_bitmap); |
| extern kal_uint32 sonic_activate(kal_uint32 th_bitmap); |
| extern void sonic_deactivate(kal_uint32 th_bitmap); |
| extern kal_uint32 sonic_check_activate_done(kal_uint32 th_bitmap); |
| extern kal_uint32 sonic_check_deactivate_done(kal_uint32 th_bitmap); |
| void sonic_deactivate_cb_n0(CSIF_ID_STATUS_t*); |
| extern void sonic_clear_WFI_mask(void); |
| extern kal_uint32 sonic_check_idle_flag_by_module(kal_uint32 thread_id, kal_uint32 user_id); |
| |
| #endif /*_SONIC_CONTROL_H_*/ |