]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx: fix get_boot_device() for imx8
authorTim Harvey <tharvey@gateworks.com>
Mon, 24 Apr 2023 16:33:44 +0000 (09:33 -0700)
committerStefano Babic <sbabic@denx.de>
Tue, 2 May 2023 08:57:32 +0000 (10:57 +0200)
commit 787f04bb6a0a ("imx: add USB2_BOOT type") broke get_boot_device()
for IMX8 which affects booting from SDP due to boot_instance being
non-zero.

Fix this by only using boot_instance for imx8ulp and imx9.

Fixes: 787f04bb6a0a ("imx: add USB2_BOOT type")
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
arch/arm/mach-imx/romapi.c

index b49e7f80a2866694bd31de97beac4c8c6350f1c4..ff0522c2d117bd7caf8c72606871221937aee9c6 100644 (file)
@@ -70,6 +70,8 @@ enum boot_device get_boot_device(void)
                boot_dev = SPI_NOR_BOOT;
                break;
        case BT_DEV_TYPE_USB:
+               if (!is_imx8ulp() && !is_imx9())
+                       boot_instance = 0;
                boot_dev = boot_instance + USB_BOOT;
                break;
        default: