summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorPrzemyslaw Marczak <p.marczak@samsung.com>2014-04-18 09:48:25 +0200
committerMarek Vasut <marex@denx.de>2014-04-30 10:30:57 +0200
commitfd2a89b20ba66d76929f672b03f392733fb1b2a6 (patch)
treeab65175a1f96333ecef9a2250e823d7f43d2ad9a /drivers/usb/gadget
parentadfc17bf09ba67cff11472ffa58fc0208defa29c (diff)
downloadu-boot-imx-fd2a89b20ba66d76929f672b03f392733fb1b2a6.zip
u-boot-imx-fd2a89b20ba66d76929f672b03f392733fb1b2a6.tar.gz
u-boot-imx-fd2a89b20ba66d76929f672b03f392733fb1b2a6.tar.bz2
usb:gadget:f_thor: fix write to filesystem by add dfu_flush()
Since dfu read/write operations needs to be flushed manually, writing to filesystem on MMC by thor was broken. MMC raw write actually is working fine because current dfu_flush() function writes filesystem only. This commit adds dfu_flush() to f_thor and now filesystem write is working. This change was tested on Trats2 board. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Tom Rini <trini@ti.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/f_thor.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/gadget/f_thor.c b/drivers/usb/gadget/f_thor.c
index 231f9c0..ba47945 100644
--- a/drivers/usb/gadget/f_thor.c
+++ b/drivers/usb/gadget/f_thor.c
@@ -229,6 +229,12 @@ static int download_tail(long long int left, int cnt)
if (ret)
error("DFU write failed [%d] cnt: %d", ret, cnt);
+ ret = dfu_flush(dfu_entity, transfer_buffer, 0, cnt);
+ if (ret) {
+ error("DFU flush failed!");
+ return ret;
+ }
+
return ret;
}