X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Feltec%2Fmhpc%2Fflash.c;h=88313287f9f8c4bc5ce80be1a310451983e26eac;hb=8f0732ac3dc3bdbbcada313dc4b4b38d5d2c376a;hp=2fbdb2771826451ba4dd7c540454f2bfee42200b;hpb=f82642e33899766892499b163e60560fbbf87773;p=u-boot diff --git a/board/eltec/mhpc/flash.c b/board/eltec/mhpc/flash.c index 2fbdb27718..88313287f9 100644 --- a/board/eltec/mhpc/flash.c +++ b/board/eltec/mhpc/flash.c @@ -311,7 +311,7 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt) { ulong cp, wp; FPW data; - int count, i, l, rc, port_width; + int i, l, rc, port_width; if (info->flash_id == FLASH_UNKNOWN) { return 4; @@ -330,9 +330,9 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt) */ if ((l = addr - wp) != 0) { data = 0; - for (i=0, cp=wp; i0; ++i) { data = (data << 8) | *src++; --cnt; @@ -351,7 +351,6 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt) /* * handle word aligned part */ - count = 0; while (cnt >= port_width) { data = 0; for (i=0; i