Merge branch 'Branch_S550_Fast_Emmc' of 192.168.6.216:linux-em-group/s530-ntk into S550_Base
This commit is contained in:
commit
b8a373de22
|
@ -1161,12 +1161,7 @@ SINT32 sf_svr_packet_proc(SINT32 fd, UINT8 *pAppData, UINT16 dataLen)
|
||||||
// HI_MESSAGE_S stMessage;
|
// HI_MESSAGE_S stMessage;
|
||||||
MLOGI(" s\n");
|
MLOGI(" s\n");
|
||||||
|
|
||||||
char *strg_path = sf_get_root_path();
|
char *strg_path = NULL;
|
||||||
if(strg_path == NULL)
|
|
||||||
{
|
|
||||||
free(strg_path);
|
|
||||||
return SF_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
UINT32 dcf_handle = 0; /* 0:emmc 1:sd */
|
UINT32 dcf_handle = 0; /* 0:emmc 1:sd */
|
||||||
//char *dcf_file = System_Get_DCF_Disk_Drive(dcf_handle) == SF_EMMC_DCF_HANDLE ? SF_EMMC_DCF_FILE_NAME : SF_SD_DCF_FILE_NAME;
|
//char *dcf_file = System_Get_DCF_Disk_Drive(dcf_handle) == SF_EMMC_DCF_HANDLE ? SF_EMMC_DCF_FILE_NAME : SF_SD_DCF_FILE_NAME;
|
||||||
|
@ -1966,7 +1961,16 @@ SINT32 sf_svr_packet_proc(SINT32 fd, UINT8 *pAppData, UINT16 dataLen)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sprintf((char *)fileName, "%s%s",strg_path,pMsgStruct->msgBuf.ctrlFileTransfer.fileName);
|
strg_path = sf_get_root_path();
|
||||||
|
if(strg_path == NULL)
|
||||||
|
{
|
||||||
|
free(strg_path);
|
||||||
|
sprintf((char *)fileName, "%s%s",SF_EMMC_ROOT,pMsgStruct->msgBuf.ctrlFileTransfer.fileName);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
sprintf((char *)fileName, "%s%s",strg_path,pMsgStruct->msgBuf.ctrlFileTransfer.fileName);
|
||||||
|
free(strg_path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//MLOGI("rec file cmd:%s\n", fileName);
|
//MLOGI("rec file cmd:%s\n", fileName);
|
||||||
}
|
}
|
||||||
|
@ -2330,7 +2334,6 @@ SINT32 sf_svr_packet_proc(SINT32 fd, UINT8 *pAppData, UINT16 dataLen)
|
||||||
printf("offset=%d\n",offset);
|
printf("offset=%d\n",offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free(strg_path);
|
|
||||||
return ntohs(pMsgStruct->cmd);
|
return ntohs(pMsgStruct->cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -178,19 +178,19 @@ void sf_power_off(void)
|
||||||
sf_log_sava();
|
sf_log_sava();
|
||||||
FileSys_CloseEx('A', FST_TIME_INFINITE);
|
FileSys_CloseEx('A', FST_TIME_INFINITE);
|
||||||
FileSys_CloseEx('B', FST_TIME_INFINITE);
|
FileSys_CloseEx('B', FST_TIME_INFINITE);
|
||||||
fastboot_set_done(BOOT_FLOW_BOOT);
|
sf_mcu_reg_set(SF_MCU_POWEROFF,0);
|
||||||
flow_wait_linux();
|
|
||||||
}
|
}
|
||||||
THREAD_RETTYPE MovieFast_PowerOffTsk(void *arg)
|
THREAD_RETTYPE MovieFast_PowerOffTsk(void *arg)
|
||||||
{
|
{
|
||||||
const BOOL delay_ms = 200;
|
const BOOL delay_ms = 200;
|
||||||
VOS_TICK t1, t2;
|
//VOS_TICK t1, t2;
|
||||||
|
int cnt = 0;
|
||||||
THREAD_ENTRY();
|
THREAD_ENTRY();
|
||||||
|
|
||||||
DBG_DUMP("MovieFast_PowerOffTsk started\n");
|
DBG_DUMP("MovieFast_PowerOffTsk started\n");
|
||||||
|
|
||||||
g_moviefast_poweroff_tsk_run = TRUE;
|
g_moviefast_poweroff_tsk_run = TRUE;
|
||||||
vos_perf_mark(&t1);
|
//vos_perf_mark(&t1);
|
||||||
|
|
||||||
while(g_moviefast_poweroff_tsk_run)
|
while(g_moviefast_poweroff_tsk_run)
|
||||||
{
|
{
|
||||||
|
@ -199,15 +199,16 @@ THREAD_RETTYPE MovieFast_PowerOffTsk(void *arg)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
vos_perf_mark(&t2);
|
//vos_perf_mark(&t2);
|
||||||
if((vos_perf_duration(t1, t2) / 1000) > (30*1000))
|
//if((vos_perf_duration(t1, t2) / 1000) > (50*1000))
|
||||||
|
if(cnt > 200)//200*200= 40S
|
||||||
{
|
{
|
||||||
fastboot_msg_en(ENABLE);
|
fastboot_msg_en(ENABLE);
|
||||||
DBG_ERR("failed timeout ID:%d\n", MOVIEFAST_FLG_ID);
|
DBG_ERR("failed timeout ID:%d\n", MOVIEFAST_FLG_ID);
|
||||||
sf_power_off();
|
sf_power_off();
|
||||||
goto exit;
|
goto exit;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
cnt++;
|
||||||
vos_util_delay_ms(delay_ms);
|
vos_util_delay_ms(delay_ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user