]> hackdaworld.org Git - my-code/arm.git/commitdiff
fixed 04 record parsing
authorhackbard <hackbard@staubsauger.localdomain>
Thu, 30 Aug 2007 14:51:27 +0000 (16:51 +0200)
committerhackbard <hackbard@staubsauger.localdomain>
Thu, 30 Aug 2007 14:51:27 +0000 (16:51 +0200)
betty/lpcload.c

index bd69fbe1edce3ec1a47c86aa6f1f76d07e4872a7..6c167e27082cfd355f1b47e884ed2f67e4e213b7 100644 (file)
@@ -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);