linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/44x: mask and shift to zero bug
@ 2017-08-25 10:33 Dan Carpenter
  2017-08-27  4:56 ` Benjamin Herrenschmidt
  2017-08-31 11:36 ` Michael Ellerman
  0 siblings, 2 replies; 6+ messages in thread
From: Dan Carpenter @ 2017-08-25 10:33 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Matthias Fuchs
  Cc: Paul Mackerras, Michael Ellerman, linuxppc-dev, kernel-janitors

My static checker complains that 0x00001800 >> 13 is zero.  Looking at
the context, it seems like a copy and paste bug from the line below and
probably 0x3 << 13 or 0x00006000 was intended.

Fixes: 2af59f7d5c3e ("[POWERPC] 4xx: Add 405GPr and 405EP support in boot wrapper")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Not tested!

diff --git a/arch/powerpc/boot/4xx.c b/arch/powerpc/boot/4xx.c
index 9d3bd4c45a24..f7da65169124 100644
--- a/arch/powerpc/boot/4xx.c
+++ b/arch/powerpc/boot/4xx.c
@@ -564,7 +564,7 @@ void ibm405gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk)
 		fbdv = 16;
 	cbdv = ((pllmr & 0x00060000) >> 17) + 1; /* CPU:PLB */
 	opdv = ((pllmr & 0x00018000) >> 15) + 1; /* PLB:OPB */
-	ppdv = ((pllmr & 0x00001800) >> 13) + 1; /* PLB:PCI */
+	ppdv = ((pllmr & 0x00006000) >> 13) + 1; /* PLB:PCI */
 	epdv = ((pllmr & 0x00001800) >> 11) + 2; /* PLB:EBC */
 	udiv = ((cpc0_cr0 & 0x3e) >> 1) + 1;
 

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

end of thread, other threads:[~2017-08-31 11:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-25 10:33 [PATCH] powerpc/44x: mask and shift to zero bug Dan Carpenter
2017-08-27  4:56 ` Benjamin Herrenschmidt
2017-08-28  7:57   ` Dan Carpenter
2017-08-28  8:36     ` Dan Carpenter
2017-08-28 11:19     ` Michael Ellerman
2017-08-31 11:36 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).