aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-realview
diff options
context:
space:
mode:
authorLaura Abbott <lauraa@codeaurora.org>2014-04-13 17:54:58 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-05-31 20:17:12 -0400
commit1c2f87c22566cd057bc8cde10c37ae9da1a1bb76 (patch)
tree6c135a3b2b6af6be3b6593ac6329d6d4f353b7dd /arch/arm/mach-realview
parent1c8c3cf0b5239388e712508a85821f4718f4d889 (diff)
ARM: 8025/1: Get rid of meminfo
memblock is now fully integrated into the kernel and is the prefered method for tracking memory. Rather than reinvent the wheel with meminfo, migrate to using memblock directly instead of meminfo as an intermediate. Acked-by: Jason Cooper <jason@lakedaemon.net> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> Tested-by: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Laura Abbott <lauraa@codeaurora.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-realview')
-rw-r--r--arch/arm/mach-realview/core.c11
-rw-r--r--arch/arm/mach-realview/core.h3
-rw-r--r--arch/arm/mach-realview/realview_pb1176.c8
-rw-r--r--arch/arm/mach-realview/realview_pbx.c17
4 files changed, 15 insertions, 24 deletions
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index 1d5ee5c9a1dc..c2fae3a5aad8 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -31,6 +31,7 @@
31#include <linux/amba/mmci.h> 31#include <linux/amba/mmci.h>
32#include <linux/gfp.h> 32#include <linux/gfp.h>
33#include <linux/mtd/physmap.h> 33#include <linux/mtd/physmap.h>
34#include <linux/memblock.h>
34 35
35#include <mach/hardware.h> 36#include <mach/hardware.h>
36#include <asm/irq.h> 37#include <asm/irq.h>
@@ -370,19 +371,15 @@ void __init realview_timer_init(unsigned int timer_irq)
370/* 371/*
371 * Setup the memory banks. 372 * Setup the memory banks.
372 */ 373 */
373void realview_fixup(struct tag *tags, char **from, struct meminfo *meminfo) 374void realview_fixup(struct tag *tags, char **from)
374{ 375{
375 /* 376 /*
376 * Most RealView platforms have 512MB contiguous RAM at 0x70000000. 377 * Most RealView platforms have 512MB contiguous RAM at 0x70000000.
377 * Half of this is mirrored at 0. 378 * Half of this is mirrored at 0.
378 */ 379 */
379#ifdef CONFIG_REALVIEW_HIGH_PHYS_OFFSET 380#ifdef CONFIG_REALVIEW_HIGH_PHYS_OFFSET
380 meminfo->bank[0].start = 0x70000000; 381 memblock_add(0x70000000, SZ_512M);
381 meminfo->bank[0].size = SZ_512M;
382 meminfo->nr_banks = 1;
383#else 382#else
384 meminfo->bank[0].start = 0; 383 memblock_add(0, SZ_256M);
385 meminfo->bank[0].size = SZ_256M;
386 meminfo->nr_banks = 1;
387#endif 384#endif
388} 385}
diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h
index 602ca5ec52c5..844946da3c66 100644
--- a/arch/arm/mach-realview/core.h
+++ b/arch/arm/mach-realview/core.h
@@ -51,8 +51,7 @@ extern int realview_flash_register(struct resource *res, u32 num);
51extern int realview_eth_register(const char *name, struct resource *res); 51extern int realview_eth_register(const char *name, struct resource *res);
52extern int realview_usb_register(struct resource *res); 52extern int realview_usb_register(struct resource *res);
53extern void realview_init_early(void); 53extern void realview_init_early(void);
54extern void realview_fixup(struct tag *tags, char **from, 54extern void realview_fixup(struct tag *tags, char **from);
55 struct meminfo *meminfo);
56 55
57extern struct smp_operations realview_smp_ops; 56extern struct smp_operations realview_smp_ops;
58extern void realview_cpu_die(unsigned int cpu); 57extern void realview_cpu_die(unsigned int cpu);
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c
index c5eade76461b..6abf6a037b9e 100644
--- a/arch/arm/mach-realview/realview_pb1176.c
+++ b/arch/arm/mach-realview/realview_pb1176.c
@@ -32,6 +32,7 @@
32#include <linux/irqchip/arm-gic.h> 32#include <linux/irqchip/arm-gic.h>
33#include <linux/platform_data/clk-realview.h> 33#include <linux/platform_data/clk-realview.h>
34#include <linux/reboot.h> 34#include <linux/reboot.h>
35#include <linux/memblock.h>
35 36
36#include <mach/hardware.h> 37#include <mach/hardware.h>
37#include <asm/irq.h> 38#include <asm/irq.h>
@@ -339,15 +340,12 @@ static void realview_pb1176_restart(enum reboot_mode mode, const char *cmd)
339 dsb(); 340 dsb();
340} 341}
341 342
342static void realview_pb1176_fixup(struct tag *tags, char **from, 343static void realview_pb1176_fixup(struct tag *tags, char **from)
343 struct meminfo *meminfo)
344{ 344{
345 /* 345 /*
346 * RealView PB1176 only has 128MB of RAM mapped at 0. 346 * RealView PB1176 only has 128MB of RAM mapped at 0.
347 */ 347 */
348 meminfo->bank[0].start = 0; 348 memblock_add(0, SZ_128M);
349 meminfo->bank[0].size = SZ_128M;
350 meminfo->nr_banks = 1;
351} 349}
352 350
353static void __init realview_pb1176_init(void) 351static void __init realview_pb1176_init(void)
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c
index 9d75493e3f0c..60d322ad9db4 100644
--- a/arch/arm/mach-realview/realview_pbx.c
+++ b/arch/arm/mach-realview/realview_pbx.c
@@ -29,6 +29,7 @@
29#include <linux/irqchip/arm-gic.h> 29#include <linux/irqchip/arm-gic.h>
30#include <linux/platform_data/clk-realview.h> 30#include <linux/platform_data/clk-realview.h>
31#include <linux/reboot.h> 31#include <linux/reboot.h>
32#include <linux/memblock.h>
32 33
33#include <asm/irq.h> 34#include <asm/irq.h>
34#include <asm/mach-types.h> 35#include <asm/mach-types.h>
@@ -325,23 +326,19 @@ static void __init realview_pbx_timer_init(void)
325 realview_pbx_twd_init(); 326 realview_pbx_twd_init();
326} 327}
327 328
328static void realview_pbx_fixup(struct tag *tags, char **from, 329static void realview_pbx_fixup(struct tag *tags, char **from)
329 struct meminfo *meminfo)
330{ 330{
331#ifdef CONFIG_SPARSEMEM 331#ifdef CONFIG_SPARSEMEM
332 /* 332 /*
333 * Memory configuration with SPARSEMEM enabled on RealView PBX (see 333 * Memory configuration with SPARSEMEM enabled on RealView PBX (see
334 * asm/mach/memory.h for more information). 334 * asm/mach/memory.h for more information).
335 */ 335 */
336 meminfo->bank[0].start = 0; 336
337 meminfo->bank[0].size = SZ_256M; 337 memblock_add(0, SZ_256M);
338 meminfo->bank[1].start = 0x20000000; 338 memblock_add(0x20000000, SZ_512M);
339 meminfo->bank[1].size = SZ_512M; 339 memblock_add(0x80000000, SZ_256M);
340 meminfo->bank[2].start = 0x80000000;
341 meminfo->bank[2].size = SZ_256M;
342 meminfo->nr_banks = 3;
343#else 340#else
344 realview_fixup(tags, from, meminfo); 341 realview_fixup(tags, from);
345#endif 342#endif
346} 343}
347 344