Skip to content

Commit

Permalink
[spinand]fix splwrite calc erase start and end range
Browse files Browse the repository at this point in the history
  • Loading branch information
jianjunjiang committed Jun 3, 2022
1 parent 8fa4c53 commit 8b381e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spinand.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,8 @@ int spinand_splwrite(struct xfel_ctx_t * ctx, uint32_t splitsz, uint64_t addr, v
}
uint8_t * pnbuf = nbuf;
base = 0 & ~emask;
cnt = ((0 + nlen + esize - 1) & ~emask) - base;
cnt = (0 & emask) + nlen;
cnt = (cnt + ((cnt & emask) ? esize : 0)) & ~emask;
progress_start(&p, cnt);
while(cnt > 0)
{
Expand Down

0 comments on commit 8b381e2

Please sign in to comment.