Commit 66928afb6b55647a446560d32427a032e674301f

Authored by B, Ravi
Committed by Tom Rini
1 parent 1b19cbdbf7

common: dfu: ignore reset for spl-dfu

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>

Showing 3 changed files with 9 additions and 1 deletions Side-by-side Diff

... ... @@ -88,7 +88,7 @@
88 88 board_usb_cleanup(usbctrl_index, USB_INIT_DEVICE);
89 89  
90 90 if (dfu_reset)
91   - run_command("reset", 0);
  91 + do_reset(NULL, 0, 0, NULL);
92 92  
93 93 g_dnl_clear_detach();
94 94  
... ... @@ -6,6 +6,9 @@
6 6 config SUPPORT_TPL
7 7 bool
8 8  
  9 +config SPL_DFU_NO_RESET
  10 + bool
  11 +
9 12 config SPL
10 13 bool
11 14 depends on SUPPORT_SPL
... ... @@ -646,6 +649,7 @@
646 649 config SPL_DFU_SUPPORT
647 650 bool "Support DFU (Device Firmware Upgarde)"
648 651 select SPL_HASH_SUPPORT
  652 + select SPL_DFU_NO_RESET
649 653 depends on SPL_RAM_SUPPORT
650 654 help
651 655 This feature enables the DFU (Device Firmware Upgarde) in SPL with
... ... @@ -35,7 +35,11 @@
35 35 */
36 36 __weak bool dfu_usb_get_reset(void)
37 37 {
  38 +#ifdef CONFIG_SPL_DFU_NO_RESET
  39 + return false;
  40 +#else
38 41 return true;
  42 +#endif
39 43 }
40 44  
41 45 static int dfu_find_alt_num(const char *s)