X-Git-Url: https://hackdaworld.org/gitweb/?p=my-code%2Farm.git;a=blobdiff_plain;f=betty%2Flpcload.c;h=6c167e27082cfd355f1b47e884ed2f67e4e213b7;hp=bd69fbe1edce3ec1a47c86aa6f1f76d07e4872a7;hb=50d38dd59a332ed9378386f89807a56eaa90c101;hpb=0063836254cf1caf26cb35af0486fab97b2d1407 diff --git a/betty/lpcload.c b/betty/lpcload.c index bd69fbe..6c167e2 100644 --- a/betty/lpcload.c +++ b/betty/lpcload.c @@ -442,10 +442,6 @@ int firmware_to_ram(t_lpc *lpc) { /* read len */ ret=read(lpc->fwfd,buf,2); sscanf(buf,"%02x",&len); - if(len%4) { - printf("fw to ram: len not a multiple of 4\n"); - return -1; - } /* read addr */ ret=read(lpc->fwfd,buf,4); sscanf(buf,"%04x",&addr); @@ -478,8 +474,7 @@ int firmware_to_ram(t_lpc *lpc) { write_to_ram(lpc,buf,addr,len); break; case 0x04: - lpc->roff=((buf[0]<<28)|(buf[1]<<24)); - lpc->roff|=((buf[2]<<20)|(buf[3]<<16)); + lpc->roff=((buf[0]<<24)|(buf[1]<<16)); break; default: printf("fw to ram: unknown type %02x\n",type);