[PATCH v1 3/5] cmd: mtd: Add total length of read operation

This patch bypasses the limitation of length for read operations in MTD test module. Thus, the total length of a read operation can be passed down to the continuous read operation in SPI NAND layer.
Signed-off-by: Leo Yu liangyanyu13@gmail.com --- cmd/mtd.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/cmd/mtd.c b/cmd/mtd.c index ad5cc9827d..0b601e08a3 100644 --- a/cmd/mtd.c +++ b/cmd/mtd.c @@ -335,6 +335,8 @@ static int do_mtd_io(struct cmd_tbl *cmdtp, int flag, int argc, io_op.ooblen = woob ? mtd->oobsize : 0; io_op.datbuf = buf; io_op.oobbuf = woob ? &buf[len] : NULL; + /* Total length of this read operation passed by user */ + io_op.totallen = len;
/* Search for the first good block after the given offset */ off = start_off; -- 2.17.1
participants (1)
-
Leo Yu