Commit f8e81935 authored by Magnus Damm's avatar Magnus Damm Committed by Simon Horman

ARM: shmobile: Add shared R-Car Gen2 CMA reservation code

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: default avatarMagnus Damm <damm+renesas@opensource.se>
[horms+renesas@verge.net.au: rebased]
Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
parent 3d65226b
...@@ -4,5 +4,6 @@ ...@@ -4,5 +4,6 @@
void rcar_gen2_timer_init(void); void rcar_gen2_timer_init(void);
#define MD(nr) BIT(nr) #define MD(nr) BIT(nr)
u32 rcar_gen2_read_mode_pins(void); u32 rcar_gen2_read_mode_pins(void);
void rcar_gen2_reserve(void);
#endif /* __ASM_RCAR_GEN2_H__ */ #endif /* __ASM_RCAR_GEN2_H__ */
...@@ -327,6 +327,7 @@ DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") ...@@ -327,6 +327,7 @@ DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)")
.init_early = r8a7790_init_early, .init_early = r8a7790_init_early,
.init_time = rcar_gen2_timer_init, .init_time = rcar_gen2_timer_init,
.init_late = shmobile_init_late, .init_late = shmobile_init_late,
.reserve = rcar_gen2_reserve,
.dt_compat = r8a7790_boards_compat_dt, .dt_compat = r8a7790_boards_compat_dt,
MACHINE_END MACHINE_END
#endif /* CONFIG_USE_OF */ #endif /* CONFIG_USE_OF */
...@@ -218,6 +218,7 @@ DT_MACHINE_START(R8A7791_DT, "Generic R8A7791 (Flattened Device Tree)") ...@@ -218,6 +218,7 @@ DT_MACHINE_START(R8A7791_DT, "Generic R8A7791 (Flattened Device Tree)")
.init_early = shmobile_init_delay, .init_early = shmobile_init_delay,
.init_time = rcar_gen2_timer_init, .init_time = rcar_gen2_timer_init,
.init_late = shmobile_init_late, .init_late = shmobile_init_late,
.reserve = rcar_gen2_reserve,
.dt_compat = r8a7791_boards_compat_dt, .dt_compat = r8a7791_boards_compat_dt,
MACHINE_END MACHINE_END
#endif /* CONFIG_USE_OF */ #endif /* CONFIG_USE_OF */
...@@ -20,8 +20,11 @@ ...@@ -20,8 +20,11 @@
#include <linux/clk/shmobile.h> #include <linux/clk/shmobile.h>
#include <linux/clocksource.h> #include <linux/clocksource.h>
#include <linux/device.h>
#include <linux/dma-contiguous.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/of_fdt.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include "common.h" #include "common.h"
#include "rcar-gen2.h" #include "rcar-gen2.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment