aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorHongjun Chen <Hong-jun.Chen@freescale.com>2010-03-26 04:43:46 -0400
committerKumar Gala <galak@kernel.crashing.org>2011-10-22 17:15:50 -0400
commit1661e5bd550bf024b04dfa7abf2963d04ab119e3 (patch)
treed7d418fa4fae60ba540244a5b52531dc56ce90dc /arch/powerpc
parentc031ab15fff38562cc9e5921c9acc118bd99f42d (diff)
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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/sysdev/cpm_common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/cpm_common.c b/arch/powerpc/sysdev/cpm_common.c
index d55d0ad0deab..8db10bb90042 100644
--- a/arch/powerpc/sysdev/cpm_common.c
+++ b/arch/powerpc/sysdev/cpm_common.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * Author: Scott Wood <scottwood@freescale.com> 4 * Author: Scott Wood <scottwood@freescale.com>
5 * 5 *
6 * Copyright 2007 Freescale Semiconductor, Inc. 6 * Copyright 2007-2008,2010 Freescale Semiconductor, Inc.
7 * 7 *
8 * Some parts derived from commproc.c/cpm2_common.c, which is: 8 * Some parts derived from commproc.c/cpm2_common.c, which is:
9 * Copyright (c) 1997 Dan error_act (dmalek@jlc.net) 9 * Copyright (c) 1997 Dan error_act (dmalek@jlc.net)
@@ -146,6 +146,7 @@ unsigned long cpm_muram_alloc(unsigned long size, unsigned long align)
146 spin_lock_irqsave(&cpm_muram_lock, flags); 146 spin_lock_irqsave(&cpm_muram_lock, flags);
147 cpm_muram_info.alignment = align; 147 cpm_muram_info.alignment = align;
148 start = rh_alloc(&cpm_muram_info, size, "commproc"); 148 start = rh_alloc(&cpm_muram_info, size, "commproc");
149 memset(cpm_muram_addr(start), 0, size);
149 spin_unlock_irqrestore(&cpm_muram_lock, flags); 150 spin_unlock_irqrestore(&cpm_muram_lock, flags);
150 151
151 return start; 152 return start;