summaryrefslogtreecommitdiff
path: root/common/dfu.c
Commit message (Collapse)AuthorAgeFilesLines
* usb: gadget: Do not call board_usb_xxx() directly in USB gadget driversJean-Jacques Hiblot2018-12-071-3/+3
| | | | | | | | | Add 2 functions to wrap the calls to board_usb_init() and board_usb_cleanup(). This is a preparatory work for DM support for UDC drivers (DM_USB_GADGET). Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>
* SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini2018-05-071-2/+1
| | | | | | | | | | | | | | | | | | | | When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
* treewide: replace with error() with pr_err()Masahiro Yamada2017-10-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot widely uses error() as a bit noisier variant of printf(). This macro causes name conflict with the following line in include/linux/compiler-gcc.h: # define __compiletime_error(message) __attribute__((error(message))) This prevents us from using __compiletime_error(), and makes it difficult to fully sync BUILD_BUG macros with Linux. (Notice Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().) Let's convert error() into now treewide-available pr_err(). Done with the help of Coccinelle, excluing tools/ directory. The semantic patch I used is as follows: // <smpl> @@@@ -error +pr_err (...) // </smpl> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Re-run Coccinelle] Signed-off-by: Tom Rini <trini@konsulko.com>
* common: dfu: ignore reset for spl-dfuB, Ravi2017-05-121-1/+1
| | | | | | | | | | The SPL-DFU feature enable to load and execute u-boot from RAM over usb from PC using dfu-util. Hence dfu-reset should not be issued when dfu-util -R switch is issued. Signed-off-by: Ravi Babu <ravibabu@ti.com>
* cmd: dfu: Add error handling for board_usb_initMichal Simek2016-11-031-1/+5
| | | | | | board_usb_init() can failed and error should be handled properly. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* cmd: dfu: Add error handling for failed registrationSanchayan Maity2016-09-271-1/+6
| | | | | | | | | Without this, if g_dnl_register() fails, DFU code continues on blindly and crashes. This fix makes it simply print an error message instead. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> [l.majewski@samsung.com - some manual tweaks needed]
* common: dfu: saperate the dfu common functionalityB, Ravi2016-09-271-0/+87
The cmd_dfu functionality is been used by both SPL and u-boot, saperating the core dfu functionality moving it to common/dfu.c. Signed-off-by: Ravi Babu <ravibabu@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>