diff options
author | Harald Seiler <hws@denx.de> | 2021-12-01 12:11:47 +0300 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2022-02-05 15:38:39 +0300 |
commit | 12f9b4d08628c75a02f68a45eb8193efbe8ebb2f (patch) | |
tree | 294d645896e54e43011d97037bb0130209281566 /arch | |
parent | ca27227c5940371c792cfd36826315b3e17e46a1 (diff) | |
download | u-boot-12f9b4d08628c75a02f68a45eb8193efbe8ebb2f.tar.xz |
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`.
Signed-off-by: Harald Seiler <hws@denx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-imx/mx6/soc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index aacfc854a2..bc56ef2b0b 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; |