@@ -21,6 +21,7 @@
#include <linux/gpio_keys.h>
#include <linux/input.h>
#include <linux/gpio.h>
+#include <linux/cma.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
@@ -642,6 +643,35 @@ static void __init aquila_sound_init(void)
__raw_writel(__raw_readl(S5P_OTHERS) | (0x3 << 8), S5P_OTHERS);
}
+static void __init aquila_reserve(void)
+{
+ static struct cma_region regions[] = {
+ {
+ .name = "fw",
+ .size = 16 << 20,
+ .alignment = 128 << 10,
+ .start = 0x32000000,
+ },
+ {
+ .name = "b1",
+ .size = 32 << 20,
+ .start = 0x33000000,
+ },
+ {
+ .name = "b2",
+ .size = 32 << 20,
+ .start = 0x44000000,
+ },
+ { }
+ };
+
+ static const char map[] __initconst =
+ "s5p-mfc/f=fw;s5p-mfc/a=b1;s5p-mfc/b=b2;*=b1,b2";
+
+ cma_set_defaults(regions, map);
+ cma_early_regions_reserve(NULL);
+}
+
static void __init aquila_map_io(void)
{
s5p_init_io(NULL, 0, S5P_VA_CHIPID);
@@ -683,4 +713,5 @@ MACHINE_START(AQUILA, "Aquila")
.map_io = aquila_map_io,
.init_machine = aquila_machine_init,
.timer = &s5p_timer,
+ .reserve = aquila_reserve,
MACHINE_END
@@ -26,6 +26,7 @@
#include <linux/input.h>
#include <linux/gpio.h>
#include <linux/interrupt.h>
+#include <linux/cma.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
@@ -833,6 +834,35 @@ static void __init goni_sound_init(void)
__raw_writel(__raw_readl(S5P_OTHERS) | (0x3 << 8), S5P_OTHERS);
}
+static void __init goni_reserve(void)
+{
+ static struct cma_region regions[] = {
+ {
+ .name = "fw",
+ .size = 16 << 20,
+ .alignment = 128 << 10,
+ .start = 0x31000000,
+ },
+ {
+ .name = "b1",
+ .size = 32 << 20,
+ .start = 0x33000000,
+ },
+ {
+ .name = "b2",
+ .size = 32 << 20,
+ .start = 0x44000000,
+ },
+ { }
+ };
+
+ static const char map[] __initconst =
+ "s5p-mfc/f=fw;s5p-mfc/a=b1;s5p-mfc/b=b2;*=b1,b2";
+
+ cma_set_defaults(regions, map);
+ cma_early_regions_reserve(NULL);
+}
+
static void __init goni_map_io(void)
{
s5p_init_io(NULL, 0, S5P_VA_CHIPID);
@@ -893,4 +923,5 @@ MACHINE_START(GONI, "GONI")
.map_io = goni_map_io,
.init_machine = goni_machine_init,
.timer = &s5p_timer,
+ .reserve = goni_reserve,
MACHINE_END