diff options
author | Tom Rini <trini@konsulko.com> | 2020-02-02 15:26:53 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-02-02 15:26:53 -0500 |
commit | 31a790bee939e227dfc7e6a6a323b2b13180707f (patch) | |
tree | 24f3fbd808389138209b5d7270eb11cdcad123a1 /drivers/dfu/dfu_nand.c | |
parent | 427da6f0280ba1ce07e06941dd18a435fabd18fb (diff) | |
parent | 13cb7cc9e8e48eb888b13743f79ff02420405044 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-usb
- DFU and Cadence USB 3 fixes
Diffstat (limited to 'drivers/dfu/dfu_nand.c')
-rw-r--r-- | drivers/dfu/dfu_nand.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/dfu/dfu_nand.c b/drivers/dfu/dfu_nand.c index b812a3dfb1..58b94348c9 100644 --- a/drivers/dfu/dfu_nand.c +++ b/drivers/dfu/dfu_nand.c @@ -50,6 +50,7 @@ static int nand_block_op(enum dfu_op op, struct dfu_entity *dfu, lim, buf); } else { nand_erase_options_t opts; + int write_flags = WITH_WR_VERIFY; memset(&opts, 0, sizeof(opts)); opts.offset = start; @@ -62,8 +63,12 @@ static int nand_block_op(enum dfu_op op, struct dfu_entity *dfu, if (ret) return ret; /* then write */ +#ifdef CONFIG_DFU_NAND_TRIMFFS + if (dfu->data.nand.ubi) + write_flags |= WITH_DROP_FFS; +#endif ret = nand_write_skip_bad(mtd, start, &count, &actual, - lim, buf, WITH_WR_VERIFY); + lim, buf, write_flags); } if (ret != 0) { |