1.emmc相关内容调整

This commit is contained in:
payton 2024-01-12 17:44:45 +08:00
parent 3bfe140a9f
commit c00f7c15f6
2 changed files with 69 additions and 35 deletions

View File

@ -895,25 +895,37 @@ static DCF_HANDLE MovieFast_Get_DCF_Handle(void)
}
INT32 MovieFast_Wait_FileSys(UINT32 timeout_ms)
{
DCF_HANDLE handle = MovieFast_Get_DCF_Handle();
BOOT_INIT boot_init = BOOT_INIT_INVALID;
// DCF_HANDLE handle = MovieFast_Get_DCF_Handle();
// BOOT_INIT boot_init = BOOT_INIT_INVALID;
if(handle == g_dcf_hdl){
boot_init = BOOT_INIT_FILESYSOK;
}
#if (FS_MULTI_STRG_FUNC)
else if(handle == g_dcf_hdl2){
boot_init = BOOT_INIT_FILESYSOK_2;
}
#endif
// if(handle == g_dcf_hdl){
// boot_init = BOOT_INIT_FILESYSOK;
// }
// #if (FS_MULTI_STRG_FUNC)
// else if(handle == g_dcf_hdl2){
// boot_init = BOOT_INIT_FILESYSOK_2;
// }
// #endif
if(boot_init != BOOT_INIT_INVALID)
return fastboot_wait_done_timeout(boot_init, timeout_ms);
else{
DBG_ERR("boot_init = BOOT_INIT_INVALID\n");
// if(boot_init != BOOT_INIT_INVALID)
// return fastboot_wait_done_timeout(boot_init, timeout_ms);
// else{
// DBG_ERR("boot_init = BOOT_INIT_INVALID\n");
// return E_SYS;
// }
INT32 ret = fastboot_wait_done_timeout(BOOT_INIT_FILESYSOK, timeout_ms);
INT32 ret2 = fastboot_wait_done_timeout(BOOT_INIT_FILESYSOK_2, timeout_ms);
// E_OK
if(ret == E_OK && ret2 == E_OK)
{
return E_OK;
}
else {
DBG_ERR("boot_init = BOOT_INIT_INVALID\n");
return E_SYS;
}
}
}
INT32 MovieFast_Wait_FileNaming(UINT32 timeout_ms)
@ -1249,6 +1261,7 @@ static void MovieFast_UserEventCb(UINT32 id, MOVIE_USER_CB_EVENT event_id, UINT3
while (lfqueue_enq(&write_queue, (void*) param) == -1)
{
DBG_ERR("ENQ Full ?\r\n");
vos_util_delay_ms(5);
}
}
else{
@ -1343,8 +1356,13 @@ THREAD_RETTYPE MovieFast_InitFileNamingThread(void *arg)
.WorkbuffSize = POOL_SIZE_DCF_BUFFER,
};
fastboot_wait_done(BOOT_INIT_FILESYSOK);
//fastboot_wait_done(BOOT_INIT_FILESYSOK);
if(fastboot_wait_done_timeout(BOOT_INIT_FILESYSOK, FASTBOOT_WAIT_FILESYS_TIMEOUT_MS) != E_OK)
{
fastboot_msg_en(ENABLE);
DBG_ERR(" FILESYS TIMEOUT failed\r\n");
THREAD_RETURN(1);
}
MovieFast_FileNaming_Init();
if(g_dcf_hdl == -1){
@ -1381,8 +1399,13 @@ THREAD_RETTYPE MovieFast_InitFileNamingThread2(void *arg)
.WorkbuffSize = POOL_SIZE_DCF_BUFFER,
};
fastboot_wait_done(BOOT_INIT_FILESYSOK_2);
//fastboot_wait_done(BOOT_INIT_FILESYSOK_2);
if(fastboot_wait_done_timeout(BOOT_INIT_FILESYSOK_2, FASTBOOT_WAIT_FILESYS_TIMEOUT_MS) != E_OK)
{
fastboot_msg_en(ENABLE);
DBG_ERR(" BOOT_INIT_FILESYSOK_2 TIMEOUT failed\r\n");
THREAD_RETURN(1);
}
MovieFast_FileNaming_Init();
if(g_dcf_hdl2== -1){

View File

@ -969,25 +969,36 @@ DCF_HANDLE PhotoFast_Get_DCF_Handle()
}
INT32 PhotoFast_Wait_FileSys(UINT32 timeout_ms)
{
DCF_HANDLE handle = PhotoFast_Get_DCF_Handle();
BOOT_INIT boot_init = BOOT_INIT_INVALID;
// DCF_HANDLE handle = PhotoFast_Get_DCF_Handle();
// BOOT_INIT boot_init = BOOT_INIT_INVALID;
if(handle == g_dcf_hdl){
boot_init = BOOT_INIT_FILESYSOK;
}
#if (FS_MULTI_STRG_FUNC)
else if(handle == g_dcf_hdl2){
boot_init = BOOT_INIT_FILESYSOK_2;
}
#endif
// if(handle == g_dcf_hdl){
// boot_init = BOOT_INIT_FILESYSOK;
// }
// #if (FS_MULTI_STRG_FUNC)
// else if(handle == g_dcf_hdl2){
// boot_init = BOOT_INIT_FILESYSOK_2;
// }
// #endif
INT32 ret = fastboot_wait_done_timeout(BOOT_INIT_FILESYSOK, timeout_ms);
INT32 ret2 = fastboot_wait_done_timeout(BOOT_INIT_FILESYSOK_2, timeout_ms);
if(boot_init != BOOT_INIT_INVALID)
return fastboot_wait_done_timeout(boot_init, timeout_ms);
else{
DBG_ERR("boot_init = BOOT_INIT_INVALID\n");
// E_OK
if(ret == E_OK && ret2 == E_OK)
{
return E_OK;
}
else {
DBG_ERR("boot_init = BOOT_INIT_INVALID\n");
return E_SYS;
}
}
// if(boot_init != BOOT_INIT_INVALID)
// return fastboot_wait_done_timeout(boot_init, timeout_ms);
// else{
// DBG_ERR("boot_init = BOOT_INIT_INVALID\n");
// return E_SYS;
// }
}
INT32 PhotoFast_Wait_FileNaming(UINT32 timeout_ms)