Skip to contentSkip to conversation

m68k: Fix bug, "address of" operator was forgotten

PATCH In review Vasili Galka 2 participants 2 messages Jun 30, 2014 – Jul 8, 2014 m68k architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m68k: Fix bug, "address of" operator was forgotten

in_be16() shall be passed a pointer to register and not its value. This is clearly a typo resulting in a wrong memory access, so fix it.

---
 arch/m68k/cpu/mcf5445x/speed.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/m68k/cpu/mcf5445x/speed.c +1 -1
index 07a9b35..4e363a4 100644
@@ -115,7 +115,7 @@ void setup_5441x_clocks(void)
 	gd->cpu_clk = vco / temp;	/* cpu clock */
 	gd->arch.flb_clk = vco / temp;	/* FlexBus clock */
 	gd->arch.flb_clk >>= 1;
-	if (in_be16(ccm->misccr2) & 2)		/* fsys/4 */
+	if (in_be16(&ccm->misccr2) & 2)		/* fsys/4 */
 		gd->arch.flb_clk >>= 1;
 
 	temp = ((pdr & PLL_DR_OUTDIV2_BITS) >> 5) + 1;
Signature · 1 line
1.7.9
#1 lore raw
Quoted 5 lines · Vasili Galka

in_be16() shall be passed a pointer to register and not its value. This is clearly a typo resulting in a wrong memory access, so fix it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140707/06d58d38/attachment.pgp>