]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: mach-k3: sysfw-loader: Add support to load SYSFW from USB
authorFaiz Abbas <faiz_abbas@ti.com>
Mon, 3 Aug 2020 06:05:07 +0000 (11:35 +0530)
committerLokesh Vutla <lokeshvutla@ti.com>
Tue, 11 Aug 2020 15:04:46 +0000 (20:34 +0530)
Add support for loading system firmware from a USB mass storage device

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
arch/arm/mach-k3/sysfw-loader.c

index 96be069ee801747bb1adc94de849b2dd3613a02f..f4b0d4a92830466c9ee250bffbedab54a5e974fa 100644 (file)
@@ -300,6 +300,17 @@ void k3_sysfw_loader(void (*config_pm_pre_callback) (void),
                ret = k3_sysfw_dfu_download(sysfw_load_address);
                break;
 #endif
+#if CONFIG_IS_ENABLED(USB_STORAGE)
+       case BOOT_DEVICE_USB:
+               ret = spl_usb_load(&spl_image, &bootdev,
+                                  CONFIG_SYS_USB_FAT_BOOT_PARTITION,
+#ifdef CONFIG_K3_SYSFW_IMAGE_NAME
+                                  CONFIG_K3_SYSFW_IMAGE_NAME);
+#else
+                                  NULL);
+#endif
+#endif
+               break;
        default:
                panic("Loading SYSFW image from device %u not supported!\n",
                      bootdev.boot_device);