| #
4e0114d9 |
| 30-Dec-2014 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
Signed-off-by: Stefano Babic <sbabic@denx.de>
|
| #
7a7ffeda |
| 18-Dec-2014 |
Tom Rini <trini@ti.com> |
Merge branch 'master' of git://git.denx.de/u-boot-usb
|
| #
f597fc3d |
| 15-Dec-2014 |
Przemyslaw Marczak <p.marczak@samsung.com> |
dfu: dfu_get_buf: check the value of env dfu_bufsiz before use
In function dfu_get_buf(), the size of allocated buffer could be defined by the env variable. The size from this variable was passed fo
dfu: dfu_get_buf: check the value of env dfu_bufsiz before use
In function dfu_get_buf(), the size of allocated buffer could be defined by the env variable. The size from this variable was passed for memalign() without checking its value. And the the memalign will return non null pointer for size 0.
This could possibly cause data abort, so now the value of var is checked before use. And if this variable is set to 0 then the default size will be used.
This commit also changes the base passed to simple_strtoul() to 0. Now decimal and hex values can be used for the variable dfu_bufsiz.
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com> [TestHW: Exynos4412-Trats2]
show more ...
|
| #
fe1b28c9 |
| 10-Dec-2014 |
Rob Herring <robh@kernel.org> |
usb, g_dnl: generalize DFU detach functions
In order to add detach functions for fastboot, make the DFU detach related functions common so they can be shared.
Signed-off-by: Rob Herring <robh@kerne
usb, g_dnl: generalize DFU detach functions
In order to add detach functions for fastboot, make the DFU detach related functions common so they can be shared.
Signed-off-by: Rob Herring <robh@kernel.org> Tested-by: Lukasz Majewski <l.majewski@samsung.com> [TestHW: Exynos4412-Trats2]
show more ...
|
| #
fc9b0b80 |
| 11-Dec-2014 |
Tom Rini <trini@ti.com> |
Merge branch 'master' of git://git.denx.de/u-boot-usb
Conflicts: board/freescale/mx6sxsabresd/mx6sxsabresd.c
Signed-off-by: Tom Rini <trini@ti.com>
|
| #
b4141195 |
| 06-Nov-2014 |
Masahiro Yamada <yamada.m@jp.panasonic.com> |
linux/kernel.h: sync min, max, min3, max3 macros with Linux
U-Boot has never cared about the type when we get max/min of two values, but Linux Kernel does. This commit gets min, max, min3, max3 mac
linux/kernel.h: sync min, max, min3, max3 macros with Linux
U-Boot has never cared about the type when we get max/min of two values, but Linux Kernel does. This commit gets min, max, min3, max3 macros synced with the kernel introducing type checks.
Many of references of those macros must be fixed to suppress warnings. We have two options: - Use min, max, min3, max3 only when the arguments have the same type (or add casts to the arguments) - Use min_t/max_t instead with the appropriate type for the first argument
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Pavel Machek <pavel@denx.de> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com> [trini: Fixup arch/blackfin/lib/string.c] Signed-off-by: Tom Rini <trini@ti.com>
show more ...
|
| #
5610b057 |
| 05-Nov-2014 |
Lukasz Majewski <l.majewski@samsung.com> |
dfu: thor: fix: Modify dfu_get_alt() function to support absolute paths
Recently the ext4 file system imposed passing absolute path with its file name parameter. As a result dfu_alt_info env variabl
dfu: thor: fix: Modify dfu_get_alt() function to support absolute paths
Recently the ext4 file system imposed passing absolute path with its file name parameter. As a result dfu_alt_info env variable has been modified to provide absolute path when ext4 file system is accessed (e.g. /uImage ext4 0 2;).
Unfortunately, lthor flashing program provides plain file name (like uImage) and hence those two file names do not match anymore.
Presented commit also allows lthor to write files to sub directories (like /boot/bin/uImage).
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Reviewed-by: Marek Vasut <marex@denx.de>
show more ...
|
| #
48f892dc |
| 02-Sep-2014 |
Tom Rini <trini@ti.com> |
Merge git://git.denx.de/u-boot-usb
|
| #
1cc03c5c |
| 25-Aug-2014 |
Lukasz Majewski <l.majewski@samsung.com> |
dfu: Provide means to find difference between dfu-util -e and -R
This commit provides distinction between DFU device detach and reset. The -R behavior is preserved with proper handling of the dfu-ut
dfu: Provide means to find difference between dfu-util -e and -R
This commit provides distinction between DFU device detach and reset. The -R behavior is preserved with proper handling of the dfu-util's -e switch, which detach the DFU device.
By running dfu-util -e; one can force device to finish the execution of dfu command on target and execute some other scripted commands.
Moreover, some naming has been changed - the dfu_reset() method now is known as dfu_detach(). New name better reflects the purpose of the code.
It was also necessary to increase the number of usb_gadget_handle_interrupts() calls since we also must wait for detection of the USB reset event.
Example usage: 1. -e (detach) switch dfu-util -a0 -D file1.bin;dfu-util -a3 -D uImage;dfu-util -e
access to u-boot prompt.
2. -R (reset) switch dfu-util -a0 -D file1.bin;dfu-util -R -a3 -D uImage
target board reset
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
| #
67ab0a5e |
| 01-Jul-2014 |
Stephen Warren <swarren@nvidia.com> |
dfu: fix readback buffer overflow test
The buffer is too small if it's < size to read, not if it's <= the size. This fixes the 1MB test case on Tegra, which has a 1MB buffer.
Signed-off-by: Stephen
dfu: fix readback buffer overflow test
The buffer is too small if it's < size to read, not if it's <= the size. This fixes the 1MB test case on Tegra, which has a 1MB buffer.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
| #
6f12ebf6 |
| 11-Jun-2014 |
Stephen Warren <swarren@nvidia.com> |
dfu: add SF backend
This allows SPI Flash to be programmed using DFU.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
|
| #
cb7bd2e0 |
| 11-Jun-2014 |
Stephen Warren <swarren@nvidia.com> |
dfu: add free_entity() to struct dfu_entity
This allows the backend to free any resources allocated during the relevant dfu_fill_entity_*() call. This will soon be used by the SF backend.
Signed-of
dfu: add free_entity() to struct dfu_entity
This allows the backend to free any resources allocated during the relevant dfu_fill_entity_*() call. This will soon be used by the SF backend.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
| #
7ac1b410 |
| 11-Jun-2014 |
Stephen Warren <swarren@nvidia.com> |
dfu: allow backend to specify a maximum buffer size
CONFIG_SYS_DFU_DATA_BUF_SIZE may be large to allow for FAT/ext layouts to transfer large files. However, this means that individual write operatio
dfu: allow backend to specify a maximum buffer size
CONFIG_SYS_DFU_DATA_BUF_SIZE may be large to allow for FAT/ext layouts to transfer large files. However, this means that individual write operations will take a long time. Allow backends to specify a maximum buffer size, so that each write operation is limited to a smaller data block. This prevents the DFU protocol from timing out when e.g. writing to SPI flash. I would guess that NAND might benefit from setting this value too, but I can't test that.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
| #
dd64827e |
| 11-Jun-2014 |
Stephen Warren <swarren@nvidia.com> |
dfu: defer parsing of device string to IO backend
Devices are not all identified by a single integer. To support this, defer the parsing of the device string to the IO backed, so that it can apply t
dfu: defer parsing of device string to IO backend
Devices are not all identified by a single integer. To support this, defer the parsing of the device string to the IO backed, so that it can apply the appropriate rules.
SPI devices are specified as controller:chip_select. SPI/SF support will be added soon.
MMC devices can also be specified as controller[.hwpart][:partition] in many commands, although we don't support that syntax in DFU.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
| #
3ee9593f |
| 11-Jun-2014 |
Stephen Warren <swarren@nvidia.com> |
dfu: add write error handling
Fix calls to dfu_write() and dfu_flush() to detect errors in the I/O itself. This could happen due to problems with the storage medium, or simply when trying to write a
dfu: add write error handling
Fix calls to dfu_write() and dfu_flush() to detect errors in the I/O itself. This could happen due to problems with the storage medium, or simply when trying to write a FAT/ext file that is larger than the buffer dfu_mmc.c maintains for this purpose.
Signal the error by switching the DFU state/status. This will be picked up by the DFU client when it sends the next DFU request. Note that errors can't simply be returned from e.g. dnload_request_complete(), since that function has no way to pass errors back to the DFU client; a call to dnload_request_complete() simply means that a USB OUT completed.
This error state/status needs to be cleared when the next DFU client connects. While there is a DFU_CLRSTATUS request, no DFU client seems to send this. Hence, clear this when selecting the USB alternate setting on the USB interface.
Finally, dfu.c relies on a call to dfu_flush() to clear up the internal state of the write transaction. Now that errors in dfu_write() are detected, dfu_flush() may no longer be called for every transaction. Separate out the cleanup code into a new function, and call it whenever dfu_write() fails, as well as from any call to dfu_flush().
Signed-off-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
| #
0e285b50 |
| 11-Jun-2014 |
Stephen Warren <swarren@nvidia.com> |
dfu: fix some issues with reads/uploads
DFU read support appears to rely upon dfu->read_medium() updating the passed-by-reference len parameter to indicate the remaining size available for reading.
dfu: fix some issues with reads/uploads
DFU read support appears to rely upon dfu->read_medium() updating the passed-by-reference len parameter to indicate the remaining size available for reading.
dfu_read_medium_mmc() never does this, and the implementation of dfu_read_medium_nand() will only work if called just once; it hard-codes the value to the total size of the NAND device irrespective of read offset.
I believe that overloading dfu->read_medium() is confusing. As such, this patch introduces a new function dfu->get_medium_size() which can be used to explicitly find out the medium size, and nothing else. dfu_read() is modified to use this function to set the initial value for dfu->r_left, rather than attempting to use the side-effects of dfu->read_medium() for this purpose.
Due to this change, dfu_read() must initially set dfu->b_left to 0, since no data has been read.
dfu_read_buffer_fill() must also be modified not to adjust dfu->r_left when simply copying data from dfu->i_buf_start to the upload request buffer. r_left represents the amount of data left to be read from HW. That value is not affected by the memcpy(), but only by calls to dfu->read_medium().
After this change, I can read from either a 4MB or 1.5MB chunk of a 4MB eMMC boot partion with CONFIG_SYS_DFU_DATA_BUF_SIZE==1MB. Without this change, attempting to do that would result in DFU read returning no data at all due to r_left never being set.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
| #
dab5e346 |
| 16-Jul-2014 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
Signed-off-by: Stefano Babic <sbabic@denx.de>
Conflicts: boards.cfg
|
| #
ed1d98d8 |
| 25-Jun-2014 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Merge branch 'u-boot/master' into 'u-boot-arm/master'
|
| #
61e76f53 |
| 11-Jun-2014 |
Tom Rini <trini@ti.com> |
Merge branch 'master' of git://git.denx.de/u-boot-usb
|
| #
3d83e675 |
| 10-Jun-2014 |
Lukasz Majewski <l.majewski@samsung.com> |
dfu: Disable default calculation of CRC32
Patch (SHA1: bd694244db7bc969954) dfu: Introduction of the "dfu_hash_algo" env variable for checksum method setting
already introduced more generic handlin
dfu: Disable default calculation of CRC32
Patch (SHA1: bd694244db7bc969954) dfu: Introduction of the "dfu_hash_algo" env variable for checksum method setting
already introduced more generic handling of the crc32 calculation. Up till now the CRC32 of received data was calculated unconditionally. This patch changes this and from now - by default the crc32 is NOT calculated anymore.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de>
show more ...
|
| #
bd694244 |
| 12-May-2014 |
Lukasz Majewski <l.majewski@samsung.com> |
dfu: Introduction of the "dfu_hash_algo" env variable for checksum method setting
Up till now the CRC32 of received data was calculated unconditionally. The standard crc32 implementation causes long
dfu: Introduction of the "dfu_hash_algo" env variable for checksum method setting
Up till now the CRC32 of received data was calculated unconditionally. The standard crc32 implementation causes long delay when large images were uploaded.
The "dfu_hash_algo" environment variable gives the opportunity to disable on demand the hash (crc32) calculation. It can be done without the need to recompile the u-boot binary.
By default the crc32 is calculated, which means that legacy behavior has been preserved.
Tests results: 400 MiB ums.img file With crc32 calculation: 65 sec [avg 6.29 MB/s] Without crc32 calculation: 25 sec [avg 16.17 MB/s]
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de>
show more ...
|
| #
8e381285 |
| 22-May-2014 |
Tom Rini <trini@ti.com> |
Merge branch 'pr-15052014' of git://git.denx.de/u-boot-usb
|
| #
e7f93505 |
| 15-May-2014 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot-arm
|
| #
1aa4bdc8 |
| 12-May-2014 |
Przemyslaw Marczak <p.marczak@samsung.com> |
drivers:dfu: dfu_flush(): add raw data flush to complete dfu write
Before dfu write and flush operations separation, dfu write data was flushed by host download request with len of zero size.
Since
drivers:dfu: dfu_flush(): add raw data flush to complete dfu write
Before dfu write and flush operations separation, dfu write data was flushed by host download request with len of zero size.
Since above change manually calling dfu write with zero size has non sense (e.g. in THOR). This should be done by flush operation. So now dfu_write_buffer_drain() is called in dfu_flush(). If there is any raw data to flush (like it can be in thor) then it will be physically written to medium.
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Heiko Schocher <hs@denx.de> Cc: Marek Vasut <marex@denx.de>
show more ...
|
| #
d2a3e911 |
| 09-May-2014 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Merge branch 'u-boot/master'
Conflicts: drivers/net/Makefile
(trivial merge)
|