Skip to contentSkip to conversation

imx: fix get_boot_device() for imx8

PATCH In review Tim Harvey 4 participants 4 messages Apr 24, 2023 – May 2, 2023

Subsystems (3)
lore
Share & tools
lore

Tim Harvey

author
#0 lore raw

PATCH 1/1 imx: fix get_boot_device() for imx8

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")
---
 arch/arm/mach-imx/romapi.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-imx/romapi.c +2 -0
index b49e7f80a286..ff0522c2d117 100644
@@ -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:
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Tim Harvey

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")
Quoted 17 lines
---
  arch/arm/mach-imx/romapi.c | 2 ++
  1 file changed, 2 insertions(+)
arch/arm/mach-imx/romapi.c +2 -0
index b49e7f80a286..ff0522c2d117 100644
@@ -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:
#3 lore raw

PATCH 1/1 imx: fix get_boot_device() for imx8

In reply to Tim Harvey
Quoted 8 lines

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")

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,        Managing Director: Erika Unter  
HRB 165235 Munich,   Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================