Received: from milmhbs1.lsil.com (147.145.21.209) by coscas01.lsi.com
 (172.21.36.60) with Microsoft SMTP Server id 8.1.393.1; Sat, 20 Feb 2010
 11:52:28 -0700
Received: from mail2.lsil.com (mail2.lsil.com [147.145.40.22])	by
 milmhbs1.lsil.com (8.12.11/8.12.11) with ESMTP id o1KIqQFX027350	for
 <andy.sharp@lsi.com>; Sat, 20 Feb 2010 10:52:28 -0800
Received: from psmtp.com (na3sys009amx206.postini.com [74.125.149.46])	by
 mail2.lsil.com (8.12.11/8.12.11) with SMTP id o1KIlU6f018009	for
 <andy.sharp@lsi.com>; Sat, 20 Feb 2010 10:47:30 -0800 (PST)
Received: from source ([78.24.191.182]) by na3sys009amx206.postini.com
 ([74.125.148.14]) with SMTP;	Sat, 20 Feb 2010 13:52:25 EST
Received: from localhost.localdomain ([127.0.0.1]:36052 "EHLO
        eddie.linux-mips.org" rhost-flags-OK-OK-OK-FAIL)        by
 eddie.linux-mips.org with ESMTP id S1492102Ab0BTSwL (ORCPT
        <rfc822;andy.sharp@lsi.com>); Sat, 20 Feb 2010 19:52:11 +0100
Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 20 Feb 2010 19:51:52
 +0100 (CET)
Received: from [193.201.54.104] ([193.201.54.104]:56926 "EHLO hauke-m.de"
        rhost-flags-FAIL-FAIL-OK-OK) by eddie.linux-mips.org with ESMTP
        id S1492063Ab0BTSvs (ORCPT <rfc822;linux-mips@linux-mips.org>);
        Sat, 20 Feb 2010 19:51:48 +0100
Received: from localhost (localhost [127.0.0.1])        by hauke-m.de
 (Postfix) with ESMTP id 3FB1F8587;        Sat, 20 Feb 2010 19:51:27 +0100
 (CET)
Received: from hauke-m.de ([127.0.0.1])        by localhost (hauke-m.de
 [127.0.0.1]) (amavisd-new, port 10024)        with ESMTP id uDuCebCU-+31;
 Sat, 20 Feb 2010 19:51:24 +0100 (CET)
Received: from localhost.localdomain (host-091-096-211-027.ewe-ip-backbone.de
 [91.96.211.27])        by hauke-m.de (Postfix) with ESMTPSA id EEFB17E29;
        Sat, 20 Feb 2010 19:51:23 +0100 (CET)
From: Hauke Mehrtens <hauke@hauke-m.de>
To: "ralf@linux-mips.org" <ralf@linux-mips.org>
CC: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>, Hauke Mehrtens
	<hauke@hauke-m.de>
Sender: "linux-mips-bounce@linux-mips.org" <linux-mips-bounce@linux-mips.org>
Date: Sat, 20 Feb 2010 11:51:20 -0700
Subject: [PATCH] MIPS: Bcm47xx: Fix 128MB RAM support
Thread-Topic: [PATCH] MIPS: Bcm47xx: Fix 128MB RAM support
Thread-Index: AcqyXdn+3c/AQ/iTR3eLO4+ddIiNeQ==
Message-ID: <1266691880-372-1-git-send-email-hauke@hauke-m.de>
Accept-Language: en-US
Content-Language: en-US
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-Exchange-Organization-AuthSource: coscas01.lsi.com
X-MS-Has-Attach:
X-Auto-Response-Suppress: All
X-MS-TNEF-Correlator:
x-scanned-by: MIMEDefang 2.39
errors-to: linux-mips-bounce@linux-mips.org
x-pstn-levels: (S:95.34317/99.90000 CV:99.9000 FC:95.5390 LC:95.5390
 R:95.9108 P:95.9108 M:97.0282 C:98.6951 )
x-pstn-settings: 3 (1.0000:1.0000) s cv gt3 gt2 gt1 r p m c 
x-pstn-addresses: from <hauke@hauke-m.de> [22/1] 
x-pstn-neptune: 0/0/0.00/0
x-virus-scanned: Debian amavisd-new at hauke-m.de 
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

Ignoring the last page when ddr size is 128M. Cached
accesses to last page is causing the processor to prefetch
using address above 128M stepping out of the ddr address
space.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 arch/mips/bcm47xx/prom.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/mips/bcm47xx/prom.c b/arch/mips/bcm47xx/prom.c
index 5efc995..0fa646c 100644
--- a/arch/mips/bcm47xx/prom.c
+++ b/arch/mips/bcm47xx/prom.c
@@ -141,6 +141,14 @@ static __init void prom_init_mem(void)
 			break;
 	}
=20
+	/* Ignoring the last page when ddr size is 128M. Cached
+	 * accesses to last page is causing the processor to prefetch
+	 * using address above 128M stepping out of the ddr address
+	 * space.
+	 */
+	if (mem =3D=3D 0x8000000)
+		mem -=3D 0x1000;
+
 	add_memory_region(0, mem, BOOT_MEM_RAM);
 }
=20
--=20
1.6.3.3


