[ARM] tegra: stingray: Convert from bootmem to memblock
authorColin Cross <ccross@android.com>
Thu, 30 Sep 2010 01:35:48 +0000 (18:35 -0700)
committerColin Cross <ccross@android.com>
Thu, 7 Oct 2010 00:03:36 +0000 (17:03 -0700)
Change-Id: I57f22c22875c4bcfc3a5d4790aef0c59e310c2ca
Signed-off-by: Colin Cross <ccross@android.com>
arch/arm/mach-tegra/board-stingray.c

index 772435d352cb9dca27134d02bb7351d80fa7bc65..2b26aeec2d97c5677c6033e5c5d5de2134eeeb8d 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/reboot.h>
 #include <linux/i2c-tegra.h>
 #include <linux/spi/cpcap.h>
-#include <linux/bootmem.h>
+#include <linux/memblock.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -1043,14 +1043,16 @@ static void __init tegra_stingray_init(void)
 
 void __init stingray_map_io(void)
 {
-       if (reserve_bootmem(0x0, 4096, BOOTMEM_EXCLUSIVE) != 0) {
-               printk(KERN_WARNING "Cannot reserve first 4K of memory for safety\n");
-       }
-
        tegra_map_common_io();
        stingray_fb_alloc();
 }
 
+void __init stingray_reserve(void)
+{
+       if (memblock_reserve(0x0, 4096) < 0)
+               pr_warn("Cannot reserve first 4K of memory for safety\n");
+}
+
 MACHINE_START(STINGRAY, "stingray")
        .boot_params    = 0x00000100,
        .phys_io        = IO_APB_PHYS,
@@ -1059,5 +1061,6 @@ MACHINE_START(STINGRAY, "stingray")
        .init_irq       = tegra_init_irq,
        .init_machine   = tegra_stingray_init,
        .map_io         = stingray_map_io,
+       .reserve        = stingray_reserve,
        .timer          = &tegra_timer,
 MACHINE_END