cmd: mtd: Add total length of read operation
PATCH 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 <[email protected]>
--- cmd/mtd.c | 2 ++ 1 file changed, 2 insertions(+)
cmd/mtd.c +2 -0
@@ -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