Skip to contentSkip to conversation

mx6: Use imx6_src_get_boot_mode() to check boot device

PATCH In review Harald Seiler 3 participants 3 messages Dec 1, 2021 – Feb 5, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mx6: Use imx6_src_get_boot_mode() to check boot device

Use imx6_src_get_boot_mode() instead of manually reading SBMR1. The existing function has proper handling for software overrides of the bootdevice which can happen, for example, when booting from an alternate source using bmode.

---
 arch/arm/mach-imx/mx6/soc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm/mach-imx/mx6/soc.c +1 -2
index aacfc854a2f8..bc56ef2b0b20 100644
@@ -498,8 +498,7 @@ __weak int board_mmc_get_env_dev(int devno)
 
 static int mmc_get_boot_dev(void)
 {
-	struct src *src_regs = (struct src *)SRC_BASE_ADDR;
-	u32 soc_sbmr = readl(&src_regs->sbmr1);
+	u32 soc_sbmr = imx6_src_get_boot_mode();
 	u32 bootsel;
 	int devno;
 
Signature · 1 line
2.31.1
#2 lore raw

PATCH 1/1 mx6: Use imx6_src_get_boot_mode() to check boot device

In reply to Harald Seiler
Quoted 6 lines

Use imx6_src_get_boot_mode() instead of manually reading SBMR1. The existing function has proper handling for software overrides of the bootdevice which can happen, for example, when booting from an alternate source using bmode.

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

Best regards,
Stefano Babic

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