imx: sys_proto: Fixing function imx6_is_bmode_from_gpr9()
Subsystems (2)
PATCH 1/1 imx: sys_proto: Fixing function imx6_is_bmode_from_gpr9()
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.
--- arch/arm/include/asm/mach-imx/sys_proto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/include/asm/mach-imx/sys_proto.h +1 -1
@@ -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 ; }
Signature · 1 line
2.11.0
PATCH 1/1 imx: sys_proto: Fixing function imx6_is_bmode_from_gpr9()
Hi Christoph,
Quoted 17 lines · Christoph Niedermaier
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 <[email protected]>--- arch/arm/include/asm/mach-imx/sys_proto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/include/asm/mach-imx/sys_proto.h +0
-0
arch/arm/include/asm/mach-imx/sys_proto.h enum imx6_bmode { · line 105
Quoted 8 lines
arch/arm/include/asm/mach-imx/sys_proto.h +1
-1@@ -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
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: sbabic at denx.de =====================================================================
PATCH 1/1 imx: sys_proto: Fixing function imx6_is_bmode_from_gpr9()
Hi Stefano, Christoph,
On Tue, 5 Nov 2019 16:57:18 +0100
Stefano Babic sbabic at denx.de wrote:
...
Quoted 9 lines
arch/arm/include/asm/mach-imx/sys_proto.h enum imx6_bmode { · line 105
Quoted 6 lines
arch/arm/include/asm/mach-imx/sys_proto.h +1
-1-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 !
This function was removed by Claudius (see commit ID e01c8cfe5769) since there are no users any more. No need to rebase/repost.
--
Anatolij
PATCH 1/1 imx: sys_proto: Fixing function imx6_is_bmode_from_gpr9()
Quoted 15 lines · Anatolij Gustschin
Hi Stefano, Christoph,
On Tue, 5 Nov 2019 16:57:18 +0100
Stefano Babic sbabic at denx.de wrote:
...Quoted 9 lines
arch/arm/include/asm/mach-imx/sys_proto.h enum imx6_bmode { · line 105
Quoted 6 lines
arch/arm/include/asm/mach-imx/sys_proto.h +1
-1-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 !
Quoted 1 line
This function was removed by Claudius (see commit ID
e01c8cfe5769)
Yes, but this check just one bit.
Quoted 1 line
since there are no users any more.
Oh yes, you're right !
Quoted 1 line
No need to rebase/repost.
Regards,
Stefano
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: sbabic at denx.de =====================================================================