diff options
author | Tom Rini <trini@ti.com> | 2014-05-22 12:56:15 -0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-05-22 12:56:15 -0400 |
commit | c9afa7cea84c9b7346fcd2710577bcc386631aba (patch) | |
tree | 6b167eb7bd0ab10fff37259467e07feba24ba843 /drivers/dfu/dfu_nand.c | |
parent | d7782d06534fe4fa47a49fa7c106de5ba85a9687 (diff) | |
parent | fc25fa27e5f439705e9ca42182014e2d75d9f0ae (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-usb
Diffstat (limited to 'drivers/dfu/dfu_nand.c')
-rw-r--r-- | drivers/dfu/dfu_nand.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/dfu/dfu_nand.c b/drivers/dfu/dfu_nand.c index 2d07097e85..ccdbef6b75 100644 --- a/drivers/dfu/dfu_nand.c +++ b/drivers/dfu/dfu_nand.c @@ -163,6 +163,18 @@ static int dfu_flush_medium_nand(struct dfu_entity *dfu) return ret; } +unsigned int dfu_polltimeout_nand(struct dfu_entity *dfu) +{ + /* + * Currently, Poll Timeout != 0 is only needed on nand + * ubi partition, as the not used sectors need an erase + */ + if (dfu->data.nand.ubi) + return DFU_MANIFEST_POLL_TIMEOUT; + + return DFU_DEFAULT_POLL_TIMEOUT; +} + int dfu_fill_entity_nand(struct dfu_entity *dfu, char *s) { char *st; @@ -211,6 +223,7 @@ int dfu_fill_entity_nand(struct dfu_entity *dfu, char *s) dfu->read_medium = dfu_read_medium_nand; dfu->write_medium = dfu_write_medium_nand; dfu->flush_medium = dfu_flush_medium_nand; + dfu->poll_timeout = dfu_polltimeout_nand; /* initial state */ dfu->inited = 0; |