INT32 wmt_plat_init (UINT32 co_clock_en) { CMB_STUB_CB stub_cb; INT32 iret; /*init wmt function ctrl wakelock if wake lock is supported by host platform*/ if(co_clock_en) { wmt_plat_soc_co_clock_flag_set(1); }else { wmt_plat_soc_co_clock_flag_set(0); } stub_cb.aif_ctrl_cb = wmt_plat_audio_ctrl; stub_cb.func_ctrl_cb = wmt_plat_func_ctrl; stub_cb.thermal_query_cb = wmt_plat_thermal_ctrl; stub_cb.deep_idle_ctrl_cb = wmt_plat_deep_idle_ctrl; stub_cb.size = sizeof(stub_cb); /* register to cmb_stub */ iret = mtk_wcn_cmb_stub_reg(&stub_cb); #ifdef CFG_WMT_WAKELOCK_SUPPORT wake_lock_init(&wmtWakeLock, WAKE_LOCK_SUSPEND, "wmtFuncCtrl"); mutex_init(&gOsSLock); #endif iret += mtk_wcn_consys_hw_init(); spin_lock_init(&gbgfIrqBle.lock); WMT_PLAT_DBG_FUNC("WMT-PLAT: ALPS platform init (%d)\n", iret); return 0; }
INT32 wmt_plat_init (P_PWR_SEQ_TIME pPwrSeqTime) { CMB_STUB_CB stub_cb; /*PWR_SEQ_TIME pwr_seq_time;*/ INT32 iret; stub_cb.aif_ctrl_cb = wmt_plat_audio_ctrl; stub_cb.func_ctrl_cb = wmt_plat_func_ctrl; stub_cb.size = sizeof(stub_cb); /* register to cmb_stub */ iret = mtk_wcn_cmb_stub_reg(&stub_cb); /* init cmb_hw */ iret += mtk_wcn_cmb_hw_init(pPwrSeqTime); /*init wmt function ctrl wakelock if wake lock is supported by host platform*/ #ifdef CFG_WMT_WAKELOCK_SUPPORT wake_lock_init(&wmtWakeLock, WAKE_LOCK_SUSPEND, "wmtFuncCtrl"); osal_sleepable_lock_init(&gOsSLock); #endif WMT_DBG_FUNC("WMT-PLAT: ALPS platform init (%d)\n", iret); return 0; }
INT32 wmt_plat_stub_init (void) { INT32 iRet = -1; CMB_STUB_CB stub_cb; stub_cb.aif_ctrl_cb = wmt_plat_audio_ctrl; stub_cb.func_ctrl_cb = wmt_plat_func_ctrl; stub_cb.size = sizeof(stub_cb); /* register to cmb_stub */ iRet = mtk_wcn_cmb_stub_reg(&stub_cb); return iRet; }
INT32 wmt_plat_stub_init (void) { INT32 iRet = -1; CMB_STUB_CB stub_cb; stub_cb.aif_ctrl_cb = wmt_plat_audio_ctrl; stub_cb.func_ctrl_cb = wmt_plat_func_ctrl; stub_cb.thermal_query_cb = wmt_plat_thremal_query; stub_cb.wmt_do_reset_cb = wmt_plat_do_reset; #if MTK_WCN_CMB_FOR_SDIO_1V_AUTOK stub_cb.get_drv_status_cb = wmt_plat_get_drv_status; #endif stub_cb.size = sizeof(stub_cb); /* register to cmb_stub */ iRet = mtk_wcn_cmb_stub_reg(&stub_cb); return iRet; }
INT32 wmt_plat_init(UINT32 co_clock_type) { CMB_STUB_CB stub_cb; INT32 iret; /*init wmt function ctrl wakelock if wake lock is supported by host platform */ wmt_plat_soc_co_clock_flag_set(co_clock_type); stub_cb.aif_ctrl_cb = wmt_plat_audio_ctrl; stub_cb.func_ctrl_cb = wmt_plat_func_ctrl; stub_cb.thermal_query_cb = wmt_plat_thermal_ctrl; stub_cb.deep_idle_ctrl_cb = wmt_plat_deep_idle_ctrl; stub_cb.wmt_do_reset_cb = NULL; stub_cb.size = sizeof(stub_cb); /* register to cmb_stub */ iret = mtk_wcn_cmb_stub_reg(&stub_cb); #ifdef CFG_WMT_WAKELOCK_SUPPORT #ifdef CONFIG_PM_WAKELOCKS wakeup_source_init(&wmtWakeLock, "wmtFuncCtrl"); #else wake_lock_init(&wmtWakeLock, WAKE_LOCK_SUSPEND, "wmtFuncCtrl"); #endif mutex_init(&gOsSLock); #endif #if CONSYS_BT_WIFI_SHARE_V33 gBtWifiV33.counter = 0; spin_lock_init(&gBtWifiV33.lock); #endif iret += mtk_wcn_consys_hw_init(); spin_lock_init(&gbgfIrqBle.lock); WMT_PLAT_DBG_FUNC("WMT-PLAT: ALPS platform init (%d)\n", iret); return 0; }