예제 #1
0
AST_HIF_HW_RESULT ast_hif_hw_config(AST_HIF_HW_CONFIG_T* pConfigParam)
{
    HIF_CONFIG_T pHIFConfig;
    pHIFConfig.hif_time_c2ws = pConfigParam->hif_time_c2ws;
    pHIFConfig.hif_time_c2wh = pConfigParam->hif_time_c2wh;
    pHIFConfig.hif_time_wst = pConfigParam->hif_time_wst;
    pHIFConfig.hif_time_c2rs = pConfigParam->hif_time_c2rs;
    pHIFConfig.hif_time_c2rh = pConfigParam->hif_time_c2rh;
    pHIFConfig.hif_time_rlt = pConfigParam->hif_time_rlt;
    pHIFConfig.hif_time_chw = 0;
    pHIFConfig.hif_base_clk = pConfigParam->hif_base_clk;
    pHIFConfig.hif_bus_width = pConfigParam->hif_bus_width;
    
    hif_config(ast_hif_hw_handle, &pHIFConfig);
    return AST_HIF_HW_RESULT_OK;
}
예제 #2
0
HIF_RESULT hif_power_ctrl(HIF_HANDLE handle, kal_bool bPowerOn)
{
    HIF_INTERNAL_HANDLE_T* pHandle = (HIF_INTERNAL_HANDLE_T*) handle;
    kal_uint32 save_irq_mask;
    //ASSERT(pHandle);
    if(pHandle == NULL)
        return HIF_RESULT_INVALID_HANDLE;
    save_irq_mask = SaveAndSetIRQMask();
    if (bPowerOn)
    {
        #if defined MT6752
        if((!hif_power_on[pHandle->engine_id]) || CHECK_HIF_POWER_DOWN)
        #else
        if(!hif_power_on[pHandle->engine_id])
        #endif
        {
            HIF_POWER_ON(pHandle->engine_id);
            
            #if defined(MT6752) //MD HIF re-init MD HIF module, NLI module when power on
            if(hif_config_done[pHandle->engine_id])
            {
                hif_config(handle, &(pHandle->config));
                if(pHandle->ultra_high_en)
                {
                    SET_HIF_ULTRA(pHandle->engine_id, 1);
                }    
            }        
            #endif
            hif_power_on[pHandle->engine_id] = KAL_TRUE;
        }
    }
    else
    {
        hif_power_on[pHandle->engine_id] = KAL_FALSE;
        HIF_POWER_OFF(pHandle->engine_id);
    }
    RestoreIRQMask(save_irq_mask);
    return HIF_RESULT_OK;
}