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, 6 Mar 2010
 07:49:02 -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 o26En1D9000372	for
 <andy.sharp@lsi.com>; Sat, 6 Mar 2010 06:49:01 -0800
Received: from psmtp.com (na3sys009amx162.postini.com [74.125.149.88])	by
 mail2.lsil.com (8.12.11/8.12.11) with SMTP id o26Eht1Q010943	for
 <andy.sharp@lsi.com>; Sat, 6 Mar 2010 06:43:56 -0800 (PST)
Received: from source ([78.24.191.182]) by na3sys009amx162.postini.com
 ([74.125.148.14]) with SMTP;	Sat, 06 Mar 2010 14:49:00 GMT
Received: from localhost.localdomain ([127.0.0.1]:41183 "EHLO
        eddie.linux-mips.org" rhost-flags-OK-OK-OK-FAIL)        by
 eddie.linux-mips.org with ESMTP id S1492184Ab0CFOss (ORCPT
        <rfc822;andy.sharp@lsi.com>); Sat, 6 Mar 2010 15:48:48 +0100
Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 06 Mar 2010 15:48:30
 +0100 (CET)
Received: from www.linuxtv.org ([130.149.80.248]:34832 "EHLO www.linuxtv.org"
        rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP        id
 S1492103Ab0CFOs0 (ORCPT <rfc822;linux-mips@linux-mips.org>);        Sat, 6
 Mar 2010 15:48:26 +0100
Received: from mchehab by www.linuxtv.org with local (Exim 4.69)
        (envelope-from <mchehab@linuxtv.org>)        id 1Nnuwe-0000Ld-Ch; Sat,
 06 Mar 2010 15:25:32 +0100
From: Patch from Hauke Mehrtens <linuxtv-commits-bounces@linuxtv.org>
To: "linuxtv-commits@linuxtv.org" <linuxtv-commits@linuxtv.org>
CC: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>, Hauke Mehrtens
	<hauke@hauke-m.de>, Ralf Baechle <ralf@linux-mips.org>
Sender: "linux-mips-bounce@linux-mips.org" <linux-mips-bounce@linux-mips.org>
Date: Sat, 6 Mar 2010 07:25:32 -0700
Subject: [git:v4l-dvb/master] MIPS: BCM47xx: Fix 128MB RAM support
Thread-Topic: [git:v4l-dvb/master] MIPS: BCM47xx: Fix 128MB RAM support
Thread-Index: Acq9PCmxJz5L0vmyQG2LmxmUxHleTw==
Message-ID: <E1Nnuwe-0000Ld-Ch@www.linuxtv.org>
Reply-To: "linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
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:99.90000/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 <linuxtv-commits-bounces@linuxtv.org> [22/1] 
x-pstn-neptune: 0/0/0.00/0
mail-followup-to: linux-media@vger.kernel.org
x-list: linux-mips
x-original-sender: linuxtv-commits-bounces@linuxtv.org
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

From: Hauke Mehrtens <hauke@hauke-m.de>

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>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/981/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

 arch/mips/bcm47xx/prom.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

---

http://git.linuxtv.org/v4l-dvb.git?a=3Dcommitdiff;h=3D84a6fcb368a080620d12f=
c4d79e07902dbee7335

diff --git a/arch/mips/bcm47xx/prom.c b/arch/mips/bcm47xx/prom.c
index c51405e..29d3cbf 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

