u-boot/drivers/usb/gadget
Sean Anderson ab12179b3e arm: imx: Check header before calling spl_load_imx_container
Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

    imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

    deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
2023-10-17 20:50:52 -04:00
..
udc common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
at91_udc.c common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
at91_udc.h WS cleanup: remove SPACE(s) followed by TAB 2021-09-30 09:08:16 -04:00
atmel_usba_udc.c usb: gadget: atmel: fix transfer of queued requests 2023-10-13 13:42:10 +02:00
atmel_usba_udc.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
bcm_udc_otg.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
bcm_udc_otg_phy.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ci_udc.c board: usb: Replace legacy usb_gadget_handle_interrupts() 2023-09-15 23:38:02 +02:00
ci_udc.h global: Finish CONFIG -> CFG migration 2023-01-20 12:27:24 -05:00
composite.c usb: gadget: missing fallthrough in composite_setup() 2023-04-04 00:33:32 +02:00
config.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
core.c usb: gadget: Do not export usbd_device_* arrays 2021-01-31 14:08:56 +01:00
dwc2_udc_otg.c common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
dwc2_udc_otg_phy.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
dwc2_udc_otg_priv.h usb: dwc2_udc_otg: Read MAX_HW_ENDPOINT from HWCFG4 register 2019-04-21 10:26:52 +02:00
dwc2_udc_otg_regs.h usb: dwc2: add "u-boot,force-vbus-detection" for stm32 2020-11-22 13:18:20 +01:00
dwc2_udc_otg_xfer_dma.c Fix out of bound access of ep array. 2022-09-26 01:49:36 +02:00
ep0.c usb: Remove CONFIG_USBD_HS 2022-12-22 10:31:49 -05:00
ep0.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
epautoconf.c arm: Remove PXA architecture support 2022-07-07 09:29:08 -04:00
ether.c common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
f_acm.c usb: gadget: acm: Use plain udevice for UDC controller interaction 2023-09-15 23:38:02 +02:00
f_dfu.c usb: gadget: dfu: Fix check of transfer direction 2022-12-08 14:30:39 +01:00
f_dfu.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
f_fastboot.c common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
f_mass_storage.c cmd: ums: Use plain udevice for UDC controller interaction 2023-09-15 23:38:02 +02:00
f_rockusb.c Remove #include <version.h> from files which do not need it 2021-09-17 12:10:44 -04:00
f_sdp.c arm: imx: Check header before calling spl_load_imx_container 2023-10-17 20:50:52 -04:00
f_thor.c common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
f_thor.h gadget: f_thor: update to support more than 4GB file as thor 5.0 2018-05-18 13:17:30 +02:00
g_dnl.c usb: gadget: dnl: set dnl to be super speed 2021-01-31 14:08:56 +01:00
gadget_chips.h usb: Drop unused fotg210 gadget 2023-02-07 14:33:50 -05:00
Kconfig Kconfigs: Correct default of "0" on hex type entries 2023-08-09 09:21:42 -04:00
Makefile usb: gadget: Add and use matching SPL USB ethernet gadget Kconfig symbols 2023-05-17 01:51:39 +02:00
max3420_udc.c spi: spi-uclass: Add new spi_get_bus_and_cs() implementation 2022-05-23 09:33:10 -04:00
ndis.h USB: Add USB RNDIS gadget protocol 2011-02-19 20:32:37 +01:00
rndis.c Prepare v2023.01-rc4 2022-12-21 13:09:01 -05:00
rndis.h usb: gadget: Remove non-DM_ETH code 2022-12-07 16:04:17 -05:00
storage_common.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
u_os_desc.h usb: gadget: OS Feature Descriptors support 2021-01-31 14:08:56 +01:00
usbstring.c usb: gadget: move utf8_to_utf16le to header file 2021-01-31 14:08:56 +01:00