7d0b605a | 21-Feb-2014 |
Łukasz Majewski <l.majewski@samsung.com> |
dfu: mmc: Replace calls to u-boot commands with native mmc API
For some time we have been using the run_command() with properly crafted string. Such approach turned to be unreliable and error prone.
dfu: mmc: Replace calls to u-boot commands with native mmc API
For some time we have been using the run_command() with properly crafted string. Such approach turned to be unreliable and error prone.
Switch to "native" mmc subsystem API would allow better type checking and shall improve speed.
Also, it seems that this API is changing less often than u-boot commands. The approach similar to env operations on the eMMC has been reused.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|
001a8319 | 18-Mar-2014 |
Heiko Schocher <hs@denx.de> |
usb: dfu: introduce dfuMANIFEST state
on nand flash using ubi, after the download of the new image into the flash, the "rest" of the nand sectors get erased while flushing the medium. With current u
usb: dfu: introduce dfuMANIFEST state
on nand flash using ubi, after the download of the new image into the flash, the "rest" of the nand sectors get erased while flushing the medium. With current u-boot version dfu-util may show:
Starting download: [##################################################] finished! state(7) = dfuMANIFEST, status(0) = No error condition is present unable to read DFU status
as get_status is not answered while erasing sectors, if erasing needs some time.
So do the following changes to prevent this:
- introduce dfuManifest state According to dfu specification ( http://www.usb.org/developers/devclass_docs/usbdfu10.pdf ) section 7: "the device enters the dfuMANIFEST-SYNC state and awaits the solicitation of the status report by the host. Upon receipt of the anticipated DFU_GETSTATUS, the device enters the dfuMANIFEST state, where it completes its reprogramming operations."
- when stepping into dfuManifest state, sending a PollTimeout DFU_MANIFEST_POLL_TIMEOUT in ms, to the host, so the host (dfu-util) waits the PollTimeout before sending a get_status again.
Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Marek Vasut <marex@denx.de> Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
show more ...
|
47d79deb | 07-Nov-2013 |
Bo Shen <voice.shen@atmel.com> |
usb: dfu: make nand upload working
Nowhere pass a value to len, which always 0, make no transfer which cause uploading failed.
This patch make nand upload working. However it needs enough malloc bu
usb: dfu: make nand upload working
Nowhere pass a value to len, which always 0, make no transfer which cause uploading failed.
This patch make nand upload working. However it needs enough malloc buffer to store read data, that means the buffer at least equal to the upload partition size, or else it doesn't work.
Signed-off-by: Bo Shen <voice.shen@atmel.com>
show more ...
|
31bae4c5 | 16-Oct-2013 |
Bo Shen <voice.shen@atmel.com> |
usb: dfu: correct dfu buffer inited value
After dfu buffer is initialized, the buffer should be all available, while not 0. Initialize its value to min(dfu_buf_size, dfu->r_left).
Signed-off-by: Bo
usb: dfu: correct dfu buffer inited value
After dfu buffer is initialized, the buffer should be all available, while not 0. Initialize its value to min(dfu_buf_size, dfu->r_left).
Signed-off-by: Bo Shen <voice.shen@atmel.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|
d4278263 | 08-Oct-2013 |
Lukasz Majewski <l.majewski@samsung.com> |
dfu:core: Export dfu_{get|free}_buf functions
Define the dfu_get_buf() and dfu_free_buf() as global functions. They are necessary for zero copy buffer management, when DFU backend is used for storin
dfu:core: Export dfu_{get|free}_buf functions
Define the dfu_get_buf() and dfu_free_buf() as global functions. They are necessary for zero copy buffer management, when DFU backend is used for storing data.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|
fed936ed | 08-Oct-2013 |
Lukasz Majewski <l.majewski@samsung.com> |
dfu:core: Find DFU alt setting number by passing its name
New function - dfu_get_alt() - has been added to dfu core. If present, it returns alt setting's number corresponding to passed name.
Signed
dfu:core: Find DFU alt setting number by passing its name
New function - dfu_get_alt() - has been added to dfu core. If present, it returns alt setting's number corresponding to passed name.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|
a9479f04 | 17-Sep-2013 |
Afzal Mohammed <afzal.mohd.ma@gmail.com> |
dfu: ram support
DFU spec mentions it as a method to upgrade firmware (software stored in writable non-volatile memory). It also says other potential uses of DFU is beyond scope of the spec.
Here s
dfu: ram support
DFU spec mentions it as a method to upgrade firmware (software stored in writable non-volatile memory). It also says other potential uses of DFU is beyond scope of the spec.
Here such a beyond the scope use is being attempted - directly pumping binary images from host via USB to RAM. This facility is a developer centric one in that it gives advantage over upgrading non-volatile memory for testing new images every time during development and/or testing.
Directly putting image onto RAM would speed up upgrade process. This and convenience was the initial thoughts that led to doing this, speed improvement over MMC was only 1 second though - 6 sec on RAM as opposed to 7 sec on MMC in beagle bone, perhaps enabling cache and/or optimizing DFU framework to avoid multiple copy for ram (if worth) may help, and on other platforms and other boot media like NAND maybe improvement would be higher.
And for a platform that doesn't yet have proper DFU suppport for non-volatile media's, DFU to RAM can be used.
Another minor advantage would be to increase life of mmc/nand as it would be less used during development/testing.
usage: <image name> ram <start address> <size> eg. kernel ram 0x81000000 0x1000000
Downloading images to RAM using DFU is not something new, this is acheived in openmoko also.
DFU on RAM can be used for extracting RAM contents to host using dfu upload. Perhaps this can be extended to io for squeezing out register dump through usb, if it is worth.
Signed-off-by: Afzal Mohammed <afzal.mohd.ma@gmail.com> Cc: Heiko Schocher <hs@denx.de> Cc: Marek Vasut <marex@denx.de> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Pantelis Antoniou <panto@antoniou-consulting.com> Cc: Gerhard Sittig <gsi@denx.de> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Acked-by: Heiko Schocher <hs@denx.de>
show more ...
|
5a127c84 | 17-Sep-2013 |
Afzal Mohammed <afzal.mohd.ma@gmail.com> |
dfu: unify mmc/nand read/write ops enum
MMC and NAND independently defines same enumerators for read/write. Unify them by defining enum in dfu header. RAM support that is being added newly also can
dfu: unify mmc/nand read/write ops enum
MMC and NAND independently defines same enumerators for read/write. Unify them by defining enum in dfu header. RAM support that is being added newly also can make use of it.
Signed-off-by: Afzal Mohammed <afzal.mohd.ma@gmail.com> Cc: Heiko Schocher <hs@denx.de> Cc: Marek Vasut <marex@denx.de> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Pantelis Antoniou <panto@antoniou-consulting.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Heiko Schocher <hs@denx.de>
show more ...
|
9df49553 | 28-Jun-2013 |
Łukasz Majewski <l.majewski@samsung.com> |
dfu:ext4:fix Fix DFU upload functionality
For the first eMMC read of data for upload, use the "large" dfu_buf (now configurable) instead of usb request buffer allocated at composite layer (which is
dfu:ext4:fix Fix DFU upload functionality
For the first eMMC read of data for upload, use the "large" dfu_buf (now configurable) instead of usb request buffer allocated at composite layer (which is 4KiB) [*].
For eMMC the whole file is read, which usually is larger than the buffer [*] provided with usb request.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Cc: Tom Rini <trini@ti.com> Cc: Pantelis Antoniou <panto@antoniou-consulting.com> Cc: Marek Vasut <marex@denx.de> Cc: Heiko Schocher <hs@denx.de>
show more ...
|
051f9a3e | 28-Jun-2013 |
Łukasz Majewski <l.majewski@samsung.com> |
dfu:ext4:fix Fix ext4{read|write} command formatting
In the following commit: "dfu: Support larger than memory transfers." SHA1: ea2453d56b8860dbd18a3c517531ffc8dcb5c839
The ext4{read|write} comman
dfu:ext4:fix Fix ext4{read|write} command formatting
In the following commit: "dfu: Support larger than memory transfers." SHA1: ea2453d56b8860dbd18a3c517531ffc8dcb5c839
The ext4{read|write} command formatting has been changed. It removed a write mandatory [sizebytes] parameter.
It extents DFU_FS_EXT4 case at mmc_file_op to provide mandatory parameter for DFU write.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Cc: Tom Rini <trini@ti.com> Cc: Pantelis Antoniou <panto@antoniou-consulting.com> Cc: Marek Vasut <marex@denx.de> Cc: Heiko Schocher <hs@denx.de>
show more ...
|