ARM: keystone: Drop use of meminfo since its not available anymore
authorSantosh Shilimkar <santosh.shilimkar@ti.com>
Thu, 5 Jun 2014 19:22:52 +0000 (15:22 -0400)
committerArnd Bergmann <arnd@arndb.de>
Thu, 5 Jun 2014 20:20:54 +0000 (22:20 +0200)
Laura's series removed the meminfo structure and its no longer available.
Update keystone code to remove the usage of it.

Reported-by: Russell King - ARM Linux <linux@arm.linux.org.uk>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/mach-keystone/keystone.c

index 1f9ae89ee06d1fb39d82816710cfbc89903a3817..7f352de2609909ad6c5087aaa203f744876fd4b7 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/init.h>
 #include <linux/of_platform.h>
 #include <linux/of_address.h>
+#include <linux/memblock.h>
 
 #include <asm/setup.h>
 #include <asm/mach/map.h>
@@ -68,9 +69,8 @@ static void __init keystone_init_meminfo(void)
        phys_addr_t offset = PHYS_OFFSET - KEYSTONE_LOW_PHYS_START;
        phys_addr_t mem_start, mem_end;
 
-       BUG_ON(meminfo.nr_banks < 1);
-       mem_start = meminfo.bank[0].start;
-       mem_end = mem_start + meminfo.bank[0].size - 1;
+       mem_start = memblock_start_of_DRAM();
+       mem_end = memblock_end_of_DRAM();
 
        /* nothing to do if we are running out of the <32-bit space */
        if (mem_start >= KEYSTONE_LOW_PHYS_START &&