All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mx6: Use imx6_src_get_boot_mode() to check boot device
@ 2021-12-01  9:11 Harald Seiler
  2022-01-15 13:54 ` Fabio Estevam
  2022-02-05 16:42 ` sbabic
  0 siblings, 2 replies; 3+ messages in thread
From: Harald Seiler @ 2021-12-01  9:11 UTC (permalink / raw)
  To: Stefano Babic, Fabio Estevam
  Cc: Harald Seiler, NXP i.MX U-Boot Team, Simon Glass, Sean Anderson,
	Peng Fan, Soeren Moch, u-boot

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`.

Signed-off-by: Harald Seiler <hws@denx.de>
---
 arch/arm/mach-imx/mx6/soc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c
index aacfc854a2f8..bc56ef2b0b20 100644
--- a/arch/arm/mach-imx/mx6/soc.c
+++ b/arch/arm/mach-imx/mx6/soc.c
@@ -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;
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mx6: Use imx6_src_get_boot_mode() to check boot device
  2021-12-01  9:11 [PATCH] mx6: Use imx6_src_get_boot_mode() to check boot device Harald Seiler
@ 2022-01-15 13:54 ` Fabio Estevam
  2022-02-05 16:42 ` sbabic
  1 sibling, 0 replies; 3+ messages in thread
From: Fabio Estevam @ 2022-01-15 13:54 UTC (permalink / raw)
  To: Harald Seiler
  Cc: Stefano Babic, NXP i.MX U-Boot Team, Simon Glass, Sean Anderson,
	Peng Fan, Soeren Moch, U-Boot-Denx

On Wed, Dec 1, 2021 at 6:11 AM Harald Seiler <hws@denx.de> wrote:
>
> 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`.
>
> Signed-off-by: Harald Seiler <hws@denx.de>

Reviewed-by: Fabio Estevam <festevam@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] mx6: Use imx6_src_get_boot_mode() to check boot device
  2021-12-01  9:11 [PATCH] mx6: Use imx6_src_get_boot_mode() to check boot device Harald Seiler
  2022-01-15 13:54 ` Fabio Estevam
@ 2022-02-05 16:42 ` sbabic
  1 sibling, 0 replies; 3+ messages in thread
From: sbabic @ 2022-02-05 16:42 UTC (permalink / raw)
  To: Harald Seiler, u-boot

> 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`.
> Signed-off-by: Harald Seiler <hws@denx.de>
> Reviewed-by: Fabio Estevam <festevam@gmail.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
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: sbabic@denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-05 16:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-01  9:11 [PATCH] mx6: Use imx6_src_get_boot_mode() to check boot device Harald Seiler
2022-01-15 13:54 ` Fabio Estevam
2022-02-05 16:42 ` sbabic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.