]> hackdaworld.org Git - my-code/arm.git/blobdiff - betty/fwflash.c
flashing works, sample betty fw announcing itself :)
[my-code/arm.git] / betty / fwflash.c
index ebf7190590310a7e287ae079335b23a241f80ce4..7c9551f14f7837e9d0549233acd64e6c2aae00da 100644 (file)
@@ -364,7 +364,8 @@ int receive_data_and_write_to_flash(u32 addr,u32 datalen) {
        unlock_bypass_reset(bank);
 
        /* modify cksm on purpose, so the user knows ... */
-       cksm+=1;
+       if(ret==-1)
+               cksm+=1;
 
        /* send the cksm */
        uart0_send_byte(cksm);