bios/boot: remove SFL_CMD_LOAD_NO_CRC support (non longer useful since CRC checking is now fast).

This commit is contained in:
Florent Kermarrec 2020-12-03 12:11:48 +01:00
parent 136db6a0ca
commit 172dc18dfb
2 changed files with 12 additions and 16 deletions

View File

@ -189,7 +189,6 @@ int serialboot(void)
frame.payload[i] = uart_read();
/* Check Frame CRC (if CMD has a CRC) */
if (frame.cmd != SFL_CMD_LOAD_NO_CRC) {
actualcrc = ((int)frame.crc[0] << 8)|(int)frame.crc[1];
goodcrc = crc16(&frame.cmd, frame.payload_length+1);
if(actualcrc != goodcrc) {
@ -203,7 +202,6 @@ int serialboot(void)
uart_write(SFL_ACK_CRCERROR);
continue;
}
}
/* Execute Frame CMD */
switch(frame.cmd) {
@ -211,8 +209,7 @@ int serialboot(void)
failed = 0;
uart_write(SFL_ACK_SUCCESS);
return 1;
case SFL_CMD_LOAD:
case SFL_CMD_LOAD_NO_CRC: {
case SFL_CMD_LOAD: {
char *writepointer;
failed = 0;

View File

@ -19,7 +19,6 @@ struct sfl_frame {
#define SFL_CMD_ABORT 0x00
#define SFL_CMD_LOAD 0x01
#define SFL_CMD_JUMP 0x02
#define SFL_CMD_LOAD_NO_CRC 0x03
#define SFL_CMD_FLASH 0x04
#define SFL_CMD_REBOOT 0x05