Skip to content

Commit 1661e5b

Browse files
Hongjun Chenkumargala
authored andcommitted
powerpc/cpm: Clear muram before it is in use.
We need to ensure that MURAM is in a known and cleared out state before using it as the bootloader could have utilized it from its own purposes and left it in an unknown state. If we don't clear it out we've seen issues with UCC ethernet: * Multi ethernet interfaces can't work simultanously. * Multi up/down Ethernet interfaces will halt these ports. * UCC1 RGMII can't work when kernel boots from some hosts. Signed-off-by: Kai.Jiang <Kai.Jiang@freescale.com> Signed-off-by: Hongjun Chen <Hong-jun.Chen@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
1 parent c031ab1 commit 1661e5b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎arch/powerpc/sysdev/cpm_common.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Author: Scott Wood <scottwood@freescale.com>
55
*
6-
* Copyright 2007 Freescale Semiconductor, Inc.
6+
* Copyright 2007-2008,2010 Freescale Semiconductor, Inc.
77
*
88
* Some parts derived from commproc.c/cpm2_common.c, which is:
99
* Copyright (c) 1997 Dan error_act (dmalek@jlc.net)
@@ -146,6 +146,7 @@ unsigned long cpm_muram_alloc(unsigned long size, unsigned long align)
146146
spin_lock_irqsave(&cpm_muram_lock, flags);
147147
cpm_muram_info.alignment = align;
148148
start = rh_alloc(&cpm_muram_info, size, "commproc");
149+
memset(cpm_muram_addr(start), 0, size);
149150
spin_unlock_irqrestore(&cpm_muram_lock, flags);
150151

151152
return start;

0 commit comments

Comments
 (0)