linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: prpmc2800 - Don't trust documented memory size
@ 2007-11-06  1:28 Mark A. Greer
  2007-11-06  1:59 ` Mark A. Greer
  0 siblings, 1 reply; 2+ messages in thread
From: Mark A. Greer @ 2007-11-06  1:28 UTC (permalink / raw)
  To: linuxppc-dev

It turns out that the firmware on some PrPMC2800 processor modules
initializes the memory controller for 512 MB even when there is more
memory.  As a simple work around, set the amount of memory in the
device tree passed to the kernel to the lesser of what the memory
controller is set up for and the actual amount of memory.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
---
 arch/powerpc/boot/prpmc2800.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/boot/prpmc2800.c b/arch/powerpc/boot/prpmc2800.c
index 9614e1d..559c45e 100644
--- a/arch/powerpc/boot/prpmc2800.c
+++ b/arch/powerpc/boot/prpmc2800.c
@@ -405,7 +405,10 @@ static void prpmc2800_fixups(void)
 
 	bip = prpmc2800_get_bip(); /* Get board info based on VPD */
 
-	mem_size = (bip) ? bip->mem_size : mv64x60_get_mem_size(bridge_base);
+	mem_size = mv64x60_get_mem_size(bridge_base);
+	if (bip)
+		mem_size = min(mem_size, bip->mem_size);
+
 	prpmc2800_bridge_setup(mem_size); /* Do necessary bridge setup */
 
 	/* If the VPD doesn't match what we know about, just use the

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

* Re: [PATCH] powerpc: prpmc2800 - Don't trust documented memory size
  2007-11-06  1:28 [PATCH] powerpc: prpmc2800 - Don't trust documented memory size Mark A. Greer
@ 2007-11-06  1:59 ` Mark A. Greer
  0 siblings, 0 replies; 2+ messages in thread
From: Mark A. Greer @ 2007-11-06  1:59 UTC (permalink / raw)
  To: Mark A. Greer; +Cc: linuxppc-dev

On Mon, Nov 05, 2007 at 06:28:05PM -0700, Mark A. Greer wrote:
> It turns out that the firmware on some PrPMC2800 processor modules
> initializes the memory controller for 512 MB even when there is more
> memory.  As a simple work around, set the amount of memory in the
> device tree passed to the kernel to the lesser of what the memory
> controller is set up for and the actual amount of memory.
> 
> Signed-off-by: Mark A. Greer <mgreer@mvista.com>
> ---

Paul, please ignore this patch.  There is still something wrong.

Sorry for the noise.

Mark

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

end of thread, other threads:[~2007-11-06  1:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-06  1:28 [PATCH] powerpc: prpmc2800 - Don't trust documented memory size Mark A. Greer
2007-11-06  1:59 ` Mark A. Greer

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).