MIPS: TXx9: Implement prom_free_prom_memory
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Mon, 1 Sep 2008 13:22:41 +0000 (22:22 +0900)
committerRalf Baechle <ralf@linux-mips.org>
Sat, 11 Oct 2008 15:18:49 +0000 (16:18 +0100)
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/txx9/generic/setup.c

index 7a05c34c1dec06a884eec0cf731e6d8bb315ec59..5526375010f8d952d465757b3f6de06bae338071 100644 (file)
@@ -28,6 +28,7 @@
 #include <asm/time.h>
 #include <asm/reboot.h>
 #include <asm/r4kcache.h>
+#include <asm/sections.h>
 #include <asm/txx9/generic.h>
 #include <asm/txx9/pci.h>
 #include <asm/txx9tmr.h>
@@ -394,6 +395,11 @@ void __init prom_init(void)
 
 void __init prom_free_prom_memory(void)
 {
+       unsigned long saddr = PAGE_SIZE;
+       unsigned long eaddr = __pa_symbol(&_text);
+
+       if (saddr < eaddr)
+               free_init_pages("prom memory", saddr, eaddr);
 }
 
 const char *get_system_type(void)