]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
common: dfu: ignore reset for spl-dfu
authorB, Ravi <ravibabu@ti.com>
Thu, 4 May 2017 10:15:29 +0000 (15:45 +0530)
committerTom Rini <trini@konsulko.com>
Fri, 12 May 2017 12:37:09 +0000 (08:37 -0400)
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>
common/dfu.c
common/spl/Kconfig
drivers/dfu/dfu.c

index 0e9f5f59c80a6a597eefada2c66d80c85d1bc6fa..546a1ab9b4c0db72963ab7f14a24d86c6b6f47c6 100644 (file)
@@ -88,7 +88,7 @@ exit:
        board_usb_cleanup(usbctrl_index, USB_INIT_DEVICE);
 
        if (dfu_reset)
-               run_command("reset", 0);
+               do_reset(NULL, 0, 0, NULL);
 
        g_dnl_clear_detach();
 
index 12313515e3a4f77214e79fb78c740d52f7c876fe..f51ae2c4847e8f52379df59901aa496ffe71e7d8 100644 (file)
@@ -6,6 +6,9 @@ config SUPPORT_SPL
 config SUPPORT_TPL
        bool
 
+config SPL_DFU_NO_RESET
+       bool
+
 config SPL
        bool
        depends on SUPPORT_SPL
@@ -646,6 +649,7 @@ config SPL_USBETH_SUPPORT
 config SPL_DFU_SUPPORT
        bool "Support DFU (Device Firmware Upgarde)"
        select SPL_HASH_SUPPORT
+       select SPL_DFU_NO_RESET
        depends on SPL_RAM_SUPPORT
        help
          This feature enables the DFU (Device Firmware Upgarde) in SPL with
index 8dacc1a6d16c21bf371e3571e0bf527fd9854ce8..ceb33e35eed212e837a2f5571cea86f70c135806 100644 (file)
@@ -35,7 +35,11 @@ static struct hash_algo *dfu_hash_algo;
  */
 __weak bool dfu_usb_get_reset(void)
 {
+#ifdef CONFIG_SPL_DFU_NO_RESET
+       return false;
+#else
        return true;
+#endif
 }
 
 static int dfu_find_alt_num(const char *s)