[U-Boot] [PATCH] imx: sys_proto: Fixing function imx6_is_bmode_from_gpr9()

Stefano Babic sbabic at denx.de
Tue Nov 5 15:57:18 UTC 2019


Hi Christoph,

On 14/10/19 14:27, Christoph Niedermaier wrote:
> A return type of u08 cuts the return value always to 0,
> because IMX6_SRC_GPR10_BMODE = bit 28 is above u08.
> Changing the return type to u32 gives
> the function the expected operation.
> 
> Fixes: cba586b400 ("imx6: Add imx6_src_get_boot_mode")
> Signed-off-by: Christoph Niedermaier <cniedermaier at dh-electronics.com>
> ---
>  arch/arm/include/asm/mach-imx/sys_proto.h | 2 +-
>  1 file changed, 1 insertion(+), 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 aa66fdc88f..5222f6957d 100644
> --- a/arch/arm/include/asm/mach-imx/sys_proto.h
> +++ b/arch/arm/include/asm/mach-imx/sys_proto.h
> @@ -99,7 +99,7 @@ enum imx6_bmode {
>  	IMX6_BMODE_NAND_MAX = 0xf,
>  };
>  
> -static inline u8 imx6_is_bmode_from_gpr9(void)
> +static inline u32 imx6_is_bmode_from_gpr9(void)
>  {
>  	return readl(&src_base->gpr10) & IMX6_SRC_GPR10_BMODE;
>  }
> 

This is correct but it rather conflicts with another patch I already
applied. Could you rebase and repost ? 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 at denx.de
=====================================================================


More information about the U-Boot mailing list