MIPS: BCM47xx: Fix 128MB RAM support
authorHauke Mehrtens <hauke@hauke-m.de>
Sat, 20 Feb 2010 18:51:20 +0000 (19:51 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 22 Feb 2010 20:42:12 +0000 (21:42 +0100)
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

index c51405e5792117d868b99dc2fe21c30c8f06061d..29d3cbf9555feae7f96e4faf6b076f797d5b14c4 100644 (file)
@@ -141,6 +141,14 @@ static __init void prom_init_mem(void)
                        break;
        }
 
+       /* 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 == 0x8000000)
+               mem -= 0x1000;
+
        add_memory_region(0, mem, BOOT_MEM_RAM);
 }