]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
dfu: Support larger than memory transfers.
authorPantelis Antoniou <panto@antoniou-consulting.com>
Thu, 14 Mar 2013 05:32:48 +0000 (05:32 +0000)
committerMarek Vasut <marex@denx.de>
Wed, 10 Apr 2013 11:42:05 +0000 (13:42 +0200)
commitea2453d56b8860dbd18a3c517531ffc8dcb5c839
tree86b1dfe3a0e0a9f70f2edec54c66628229234948
parentb3ba6e94b8298422aa98961fdd30890f3dd83cc5
dfu: Support larger than memory transfers.

Previously we didn't support upload/download larger than available
memory.  This is pretty bad when you have to update your root filesystem
for example.

This patch removes that limitation (and the crashes when you transfered
any file larger than 4MB) by making raw image writes be done in chunks
and making file maximum size be configurable.

The sequence number is a 16 bit counter; make sure we handle rollover
correctly. This fixes the wrong transfers for large (> 256MB) images.

Also utilize a variable to handle initialization, so that we don't rely
on just the counter sent by the host.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Signed-off-by: Tom Rini <trini@ti.com>
README
drivers/dfu/dfu.c
drivers/dfu/dfu_mmc.c
include/dfu.h