Skip to contentSkip to conversation

omap3: incorrect logical check in do_emif4_init

RFC New Heinrich Schuchardt 3 participants 6 messages Apr 15, 2017 – Aug 14, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

RFC 1/1 omap3: incorrect logical check in do_emif4_init

((readl(&emif4_base->sdram_iodft_tlgc) & (1<<10)) == 0x01) is always false.
This does not match the comment
/*Wait till that bit clears*/

The problem was indicated by cppcheck.

I do not have the hardware to test if the code change below leads to a correct system behavior.

---
 arch/arm/mach-omap2/omap3/emif4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-omap2/omap3/emif4.c +1 -1
index d540cf08d2..8197e7b032 100644
@@ -76,7 +76,7 @@ static void do_emif4_init(void)
 	regval |= (1<<10);
 	writel(regval, &emif4_base->sdram_iodft_tlgc);
 	/*Wait till that bit clears*/
-	while ((readl(&emif4_base->sdram_iodft_tlgc) & (1<<10)) == 0x1);
+	while ((readl(&emif4_base->sdram_iodft_tlgc) & (1<<10)) != 0x0);
 	/*Re-verify the DDR PHY status*/
 	while ((readl(&emif4_base->sdram_sts) & (1<<2)) == 0x0);
 
Signature · 1 line
2.11.0
#1 lore raw

RFC 1/1 omap3: incorrect logical check in do_emif4_init

Quoted 7 lines · Heinrich Schuchardt

((readl(&emif4_base->sdram_iodft_tlgc) & (1<<10)) == 0x01) is always false.
This does not match the comment
/*Wait till that bit clears*/

The problem was indicated by cppcheck.

Quoted 7 lines

I do not have the hardware to test if the code change below leads to a correct system behavior.

---
 arch/arm/mach-omap2/omap3/emif4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#2 lore raw

RFC 1/1 omap3: incorrect logical check in do_emif4_init - Please, pull.

Hello Tom,

could you, please, pull the patch
https://patchwork.ozlabs.org/patch/751043/
which has been reviewed in April.

Best regards

Heinrich Schuchardt

Quoted 18 lines · Simon Glass
Quoted 7 lines · Heinrich Schuchardt

((readl(&emif4_base->sdram_iodft_tlgc) & (1<<10)) == 0x01) is always false.
This does not match the comment
/*Wait till that bit clears*/

The problem was indicated by cppcheck.

Quoted 7 lines

I do not have the hardware to test if the code change below leads to a correct system behavior.

---
 arch/arm/mach-omap2/omap3/emif4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#3 lore raw

RFC 1/1 omap3: incorrect logical check in do_emif4_init - Please, pull.

Quoted 5 lines · Heinrich Schuchardt

Hello Tom,

could you, please, pull the patch
https://patchwork.ozlabs.org/patch/751043/
which has been reviewed in April.

I actually want to run-test this patch. I happen to have a platform, and I even set it up the other day, but forgot about this patch. I'll set it back up and test it, then apply. Thanks!

Quoted 25 lines

Best regards

Heinrich Schuchardt

Quoted 18 lines · Simon Glass
Quoted 7 lines · Heinrich Schuchardt

((readl(&emif4_base->sdram_iodft_tlgc) & (1<<10)) == 0x01) is always false.
This does not match the comment
/*Wait till that bit clears*/

The problem was indicated by cppcheck.

Quoted 7 lines

I do not have the hardware to test if the code change below leads to a correct system behavior.

---
 arch/arm/mach-omap2/omap3/emif4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170625/2ba95f19/attachment.sig>
#4 lore raw

RFC 1/1 omap3: incorrect logical check in do_emif4_init - Please, pull.

Quoted 4 lines · Tom Rini
Quoted 2 lines · Heinrich Schuchardt

Hello Tom,

Quoted 8 lines
Quoted 3 lines

could you, please, pull the patch
https://patchwork.ozlabs.org/patch/751043/
which has been reviewed in April.

I actually want to run-test this patch. I happen to have a platform, and I even set it up the other day, but forgot about this patch. I'll set it back up and test it, then apply. Thanks!

Hello Tom,

any update?

Regards

Heinrich

Quoted 33 lines
Quoted 25 lines

Best regards

Heinrich Schuchardt

Quoted 18 lines · Simon Glass
Quoted 7 lines · Heinrich Schuchardt

((readl(&emif4_base->sdram_iodft_tlgc) & (1<<10)) == 0x01) is always false.
This does not match the comment
/*Wait till that bit clears*/

The problem was indicated by cppcheck.

Quoted 7 lines

I do not have the hardware to test if the code change below leads to a correct system behavior.

---
 arch/arm/mach-omap2/omap3/emif4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

#5 lore raw

RFC 1/1 omap3: incorrect logical check in do_emif4_init

In reply to Heinrich Schuchardt
Quoted 5 lines · xypron.glpk at gmx.de

((readl(&emif4_base->sdram_iodft_tlgc) & (1<<10)) == 0x01) is always false.
This does not match the comment
/*Wait till that bit clears*/

Quoted 7 lines

The problem was indicated by cppcheck.

I do not have the hardware to test if the code change below leads to a correct system behavior.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170813/938c3209/attachment.sig>