[U-Boot] [PATCH] mx6: Fix imx6_is_bmode_from_gpr9 always returns 0
Jeroen Vollenbrock
jeroen at athom.nl
Wed Nov 8 17:01:18 UTC 2017
Due to the cast to u8, this function always returned 0.
CC: Stefano Babic <sbabic at denx.de>
---
arch/arm/include/asm/mach-imx/sys_proto.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/include/asm/mach-imx/sys_proto.h b/arch/arm/include/asm/mach-imx/sys_proto.h
index 970c4ca..0447eef 100644
--- a/arch/arm/include/asm/mach-imx/sys_proto.h
+++ b/arch/arm/include/asm/mach-imx/sys_proto.h
@@ -86,7 +86,8 @@ enum imx6_bmode {
static inline u8 imx6_is_bmode_from_gpr9(void)
{
- return readl(&src_base->gpr10) & IMX6_SRC_GPR10_BMODE;
+ return (readl(&src_base->gpr10) & IMX6_SRC_GPR10_BMODE)
+ == IMX6_SRC_GPR10_BMODE;
}
u32 imx6_src_get_boot_mode(void);
--
1.7.10.4
More information about the U-Boot
mailing list