Пример #1
0
INT32 _stp_trigger_firmware_assert_via_emi(VOID)
{
	PUINT8 p_virtual_addr = NULL;
    INT32 status = -1;
   	INT32 i = 0, j = 0;
	
    do {        
        STP_BTM_INFO_FUNC("[Force Assert] stp_trigger_firmware_assert_via_emi -->\n");
    	p_virtual_addr = wmt_plat_get_emi_virt_add(EXP_APMEM_CTRL_HOST_OUTBAND_ASSERT_W1);
    	if(!p_virtual_addr)
    	{
    		STP_BTM_ERR_FUNC("get virtual address fail\n");
    		return -1;
    	}

    	CONSYS_REG_WRITE(p_virtual_addr, EXP_APMEM_HOST_OUTBAND_ASSERT_MAGIC_W1);
        STP_BTM_INFO_FUNC("[Force Assert] stp_trigger_firmware_assert_via_emi <--\n");
#if 1
        //wait for firmware assert 
        osal_sleep_ms(50); 
        //if firmware is not assert self, host driver helps it.
        do
        {
            if(0 != mtk_wcn_stp_coredump_start_get()){
                status = 0;
                break;
            }  
			
            mtk_wcn_stp_wakeup_consys();
            STP_BTM_INFO_FUNC("[Force Assert] wakeup consys (%d)\n", i);
            stp_dbg_poll_cpupcr(5 , 1 , 1);
            osal_sleep_ms(5);

			i++;
            if(i > 20){
				i = 0;
                break;
            }          
        } while(1);
#endif

        if(0 != mtk_wcn_stp_coredump_start_get()){
            status = 0;
            break;
        }

		j++;
        if(j > 8) {
			j = 0;
            break;        
        }
    } while(1);
    
    return status;
}
Пример #2
0
INT32 wmt_ctrl_soc_wakeup_consys(P_WMT_CTRL_DATA pWmtCtrlData)
{
	INT32 iRet = 0;

	iRet = mtk_wcn_stp_wakeup_consys();
	if(iRet){
		WMT_ERR_FUNC("soc palod ctrl fail(%d)\n",iRet);
	}
	
	return iRet;
}