All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] imx: sys_proto: Fixing function imx6_is_bmode_from_gpr9()
@ 2019-11-07 10:16 Christoph Niedermaier
  2019-11-07 10:24 ` Stefano Babic
  0 siblings, 1 reply; 6+ messages in thread
From: Christoph Niedermaier @ 2019-11-07 10:16 UTC (permalink / raw)
  To: u-boot

From: Stefano Babic <sbabic@denx.de>
Sent: Tuesday 5th November 2019 17:26


>On 05/11/19 17:05, Anatolij Gustschin wrote:
>> Hi Stefano, Christoph,
>> 
>> On Tue, 5 Nov 2019 16:57:18 +0100
>> Stefano Babic sbabic at denx.de wrote:
>> ...
>>>> -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)
> 
> Yes, but this check just one bit.
> 
>> since there are no users any more. 
> 
> Oh yes, you're right !
> 
>> No need to rebase/repost.
 
OK, the commit from Claudius solves my problem and my patch is therefore outdated.
It's funny that the useless function has been around for more than two years and now we're both trying to fix it at almost the same time ;-)


Regards,
Christoph

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

* [U-Boot] [PATCH] imx: sys_proto: Fixing function imx6_is_bmode_from_gpr9()
  2019-11-07 10:16 [U-Boot] [PATCH] imx: sys_proto: Fixing function imx6_is_bmode_from_gpr9() Christoph Niedermaier
@ 2019-11-07 10:24 ` Stefano Babic
  0 siblings, 0 replies; 6+ messages in thread
From: Stefano Babic @ 2019-11-07 10:24 UTC (permalink / raw)
  To: u-boot

On 07/11/19 11:16, Christoph Niedermaier wrote:
> From: Stefano Babic <sbabic@denx.de>
> Sent: Tuesday 5th November 2019 17:26
> 
> 
>> On 05/11/19 17:05, Anatolij Gustschin wrote:
>>> Hi Stefano, Christoph,
>>>
>>> On Tue, 5 Nov 2019 16:57:18 +0100
>>> Stefano Babic sbabic at denx.de wrote:
>>> ...
>>>>> -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)
>>
>> Yes, but this check just one bit.
>>
>>> since there are no users any more. 
>>
>> Oh yes, you're right !
>>
>>> No need to rebase/repost.
>  
> OK, the commit from Claudius solves my problem and my patch is therefore outdated.
> It's funny that the useless function has been around for more than two years and now we're both trying to fix it at almost the same time ;-)
> 

It is a common path: nothing for years or all together. It happens many
times ;-)

Regards,
Stefano


-- 
=====================================================================
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
=====================================================================

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

* [U-Boot] [PATCH] imx: sys_proto: Fixing function imx6_is_bmode_from_gpr9()
  2019-11-05 16:05   ` Anatolij Gustschin
@ 2019-11-05 16:25     ` Stefano Babic
  0 siblings, 0 replies; 6+ messages in thread
From: Stefano Babic @ 2019-11-05 16:25 UTC (permalink / raw)
  To: u-boot

On 05/11/19 17:05, Anatolij Gustschin wrote:
> Hi Stefano, Christoph,
> 
> On Tue, 5 Nov 2019 16:57:18 +0100
> Stefano Babic sbabic at denx.de wrote:
> ...
>>> -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)

Yes, but this check just one bit.

> since there are no users any more. 

Oh yes, you're right !

>No need to rebase/repost.

Regards,
Stefano

-- 
=====================================================================
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
=====================================================================

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

* [U-Boot] [PATCH] imx: sys_proto: Fixing function imx6_is_bmode_from_gpr9()
  2019-11-05 15:57 ` Stefano Babic
@ 2019-11-05 16:05   ` Anatolij Gustschin
  2019-11-05 16:25     ` Stefano Babic
  0 siblings, 1 reply; 6+ messages in thread
From: Anatolij Gustschin @ 2019-11-05 16:05 UTC (permalink / raw)
  To: u-boot

Hi Stefano, Christoph,

On Tue, 5 Nov 2019 16:57:18 +0100
Stefano Babic sbabic at denx.de wrote:
...
> > -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

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

* [U-Boot] [PATCH] imx: sys_proto: Fixing function imx6_is_bmode_from_gpr9()
  2019-10-14 12:27 Christoph Niedermaier
@ 2019-11-05 15:57 ` Stefano Babic
  2019-11-05 16:05   ` Anatolij Gustschin
  0 siblings, 1 reply; 6+ messages in thread
From: Stefano Babic @ 2019-11-05 15:57 UTC (permalink / raw)
  To: u-boot

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@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
=====================================================================

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

* [U-Boot] [PATCH] imx: sys_proto: Fixing function imx6_is_bmode_from_gpr9()
@ 2019-10-14 12:27 Christoph Niedermaier
  2019-11-05 15:57 ` Stefano Babic
  0 siblings, 1 reply; 6+ messages in thread
From: Christoph Niedermaier @ 2019-10-14 12:27 UTC (permalink / raw)
  To: u-boot

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@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;
 }
-- 
2.11.0

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

end of thread, other threads:[~2019-11-07 10:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-07 10:16 [U-Boot] [PATCH] imx: sys_proto: Fixing function imx6_is_bmode_from_gpr9() Christoph Niedermaier
2019-11-07 10:24 ` Stefano Babic
  -- strict thread matches above, loose matches on Subject: below --
2019-10-14 12:27 Christoph Niedermaier
2019-11-05 15:57 ` Stefano Babic
2019-11-05 16:05   ` Anatolij Gustschin
2019-11-05 16:25     ` Stefano Babic

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.