]> git.baikalelectronics.ru Git - uboot.git/commit
dfu_mtd: Add provision to unlock mtd device
authorSughosh Ganu <sughosh.ganu@linaro.org>
Wed, 30 Dec 2020 13:57:06 +0000 (19:27 +0530)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 31 Dec 2020 13:41:31 +0000 (14:41 +0100)
commit0a62b52392a84e3f00b5929f8abf5368d66af99a
tree3be5b31b24cff0c5075ef85ee2f027091cbf423d
parent489d26471956ef0fac9d51d406b6a86d11ace5f8
dfu_mtd: Add provision to unlock mtd device

Prior to writing to an mtd device, mtd_erase is called. This call
fails in case the sector being erased is locked. Call mtd_unlock to
unlock the region which is to be erased and later written to. Lock the
region once the write to the region has completed.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
drivers/dfu/dfu_mtd.c