* Transform from little endian to big endian
* and pending zero
*/
- for(i=0 ; i < frag_length; i+=4) {
+ for (i=0 ; i < frag_length; i+=4) {
*seg_ptr++ = ((i+0)<frag_length)?code_virtual_address[i+3]:0;
*seg_ptr++ = ((i+1)<frag_length)?code_virtual_address[i+2]:0;
*seg_ptr++ = ((i+2)<frag_length)?code_virtual_address[i+1]:0;
code_virtual_address += frag_length;
frag_offset += frag_length;
- }while(frag_offset < buffer_len);
+ }while (frag_offset < buffer_len);
return rt_status;
if (CPU_status&CPU_GEN_PUT_CODE_OK)
break;
- }while(check_putcodeOK_time--);
+ }while (check_putcodeOK_time--);
if (!(CPU_status&CPU_GEN_PUT_CODE_OK)) {
RT_TRACE(COMP_ERR, "Download Firmware: Put code fail!\n");
if (CPU_status&CPU_GEN_BOOT_RDY)
break;
- }while(check_bootOk_time--);
+ }while (check_bootOk_time--);
if (!(CPU_status&CPU_GEN_BOOT_RDY))
goto CPUCheckMainCodeOKAndTurnOnCPU_Fail;
if (CPU_status&CPU_GEN_FIRM_RDY)
break;
- }while(check_time--);
+ }while (check_time--);
if (!(CPU_status&CPU_GEN_FIRM_RDY))
goto CPUCheckFirmwareReady_Fail;
* Download boot, main, and data image for System reset.
* Download data image for firmware reset
*/
- for(init_step = starting_state; init_step <= FW_INIT_STEP2_DATA; init_step++) {
+ for (init_step = starting_state; init_step <= FW_INIT_STEP2_DATA; init_step++) {
/*
* Open image file, and map file to continuous memory if open file success.
* or read image file from array. Default load from IMG file