ARM: shmobile: Add shared R-Car Gen2 CMA reservation code
authorMagnus Damm <damm+renesas@opensource.se>
Mon, 9 Jun 2014 12:38:45 +0000 (21:38 +0900)
committerSimon Horman <horms+renesas@verge.net.au>
Tue, 17 Jun 2014 10:33:22 +0000 (19:33 +0900)
Add R-Car Gen2 CMA memory reservation code that can be
shared between multiple SoCs and boards. At this point
r8a7790 and r8a7791 are supported.

The top 256MiB of the legacy 32-bit physical memory space
is assigned to a separate CMA area that may be assigned
to various devices later on.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
[horms+renesas@verge.net.au: rebased]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/mach-shmobile/rcar-gen2.h
arch/arm/mach-shmobile/setup-r8a7790.c
arch/arm/mach-shmobile/setup-r8a7791.c
arch/arm/mach-shmobile/setup-rcar-gen2.c

index 43f606eb2d828778be62665e9ec51325fd456aa3..ce53cb5f53a12af7da12472bc5fef0a3ef355170 100644 (file)
@@ -4,5 +4,6 @@
 void rcar_gen2_timer_init(void);
 #define MD(nr) BIT(nr)
 u32 rcar_gen2_read_mode_pins(void);
+void rcar_gen2_reserve(void);
 
 #endif /* __ASM_RCAR_GEN2_H__ */
index 516b4e4a3ddd20f02918c41764c7df7ce1bc9134..e1907686ace4abb0e09a80ee7c253b37e4edadc3 100644 (file)
@@ -327,6 +327,7 @@ DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)")
        .init_early     = r8a7790_init_early,
        .init_time      = rcar_gen2_timer_init,
        .init_late      = shmobile_init_late,
+       .reserve        = rcar_gen2_reserve,
        .dt_compat      = r8a7790_boards_compat_dt,
 MACHINE_END
 #endif /* CONFIG_USE_OF */
index 9e16b1daba59de5bf1a7e59f3954e9f556b3857f..7e970d005f7fd711e29f5bd1830fc7b559b13605 100644 (file)
@@ -218,6 +218,7 @@ DT_MACHINE_START(R8A7791_DT, "Generic R8A7791 (Flattened Device Tree)")
        .init_early     = shmobile_init_delay,
        .init_time      = rcar_gen2_timer_init,
        .init_late      = shmobile_init_late,
+       .reserve        = rcar_gen2_reserve,
        .dt_compat      = r8a7791_boards_compat_dt,
 MACHINE_END
 #endif /* CONFIG_USE_OF */
index fdc714ebc4cd9c6745a2949cdb75e87b6e0ccc91..544b9bf28840ea03bdab949ef6dc90e9f2643cdd 100644 (file)
 
 #include <linux/clk/shmobile.h>
 #include <linux/clocksource.h>
+#include <linux/device.h>
+#include <linux/dma-contiguous.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
+#include <linux/of_fdt.h>
 #include <asm/mach/arch.h>
 #include "common.h"
 #include "rcar-gen2.h"