linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Nazarewicz <m.nazarewicz@samsung.com>
To: mina86@mina86.com
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Ankita Garg <ankita@in.ibm.com>,
	Bryan Huntsman <bryanh@codeaurora.org>,
	Daniel Walker <dwalker@codeaurora.org>,
	FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Johan Mossberg <johan.xx.mossberg@stericsson.com>,
	Jonathan Corbet <corbet@lwn.net>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Marcus LORENTZON <marcus.xm.lorentzon@stericsson.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Mel Gorman <mel@csn.ul.ie>, Pawel Osciak <pawel@osciak.com>,
	Russell King <linux@arm.linux.org.uk>,
	Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
	Zach Pfeffer <zpfeffer@codeaurora.org>,
	dipankar@in.ibm.com, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	linux-mm@kvack.org
Subject: [RFCv6 13/13] ARM: cma: Added CMA to Aquila, Goni and c210 universal boards
Date: Fri, 19 Nov 2010 16:58:11 +0100	[thread overview]
Message-ID: <c5e5580e35e1a8edf211228c4b5aea83830a7ee6.1290172312.git.m.nazarewicz@samsung.com> (raw)
In-Reply-To: <cover.1290172312.git.m.nazarewicz@samsung.com>

This commit adds CMA memory reservation code to Aquila, Goni and c210
universal boards.

Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 arch/arm/mach-s5pv210/mach-aquila.c         |   26 ++++++++++++++++++++++++++
 arch/arm/mach-s5pv210/mach-goni.c           |   26 ++++++++++++++++++++++++++
 arch/arm/mach-s5pv310/mach-universal_c210.c |   17 +++++++++++++++++
 3 files changed, 69 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c
index 28677ca..f1feb73 100644
--- a/arch/arm/mach-s5pv210/mach-aquila.c
+++ b/arch/arm/mach-s5pv210/mach-aquila.c
@@ -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>
@@ -650,6 +651,30 @@ static void __init aquila_sound_init(void)
 	__raw_writel(__raw_readl(S5P_OTHERS) | (0x3 << 8), S5P_OTHERS);
 }
 
+#ifdef CONFIG_CMA
+
+static void __init aquila_reserve(void)
+{
+	static struct cma_region regions[] = {
+		CMA_REGION("fw",  1 << 20, 128 << 10, 0x32000000),
+		CMA_REGION("b1", 32 << 20,         0, 0x33000000),
+		CMA_REGION("b2", 16 << 20,         0, 0x44000000),
+		{ }
+	};
+
+	static const char map[] __initconst =
+		"s5p-mfc5/f=fw;s5p-mfc5/a=b1;s5p-mfc5/b=b2;*=b1,b2";
+
+	cma_set_defaults(regions, map);
+	cma_early_regions_reserve(NULL);
+}
+
+#else
+
+#define aquila_reserve NULL
+
+#endif
+
 static void __init aquila_map_io(void)
 {
 	s5p_init_io(NULL, 0, S5P_VA_CHIPID);
@@ -690,4 +715,5 @@ MACHINE_START(AQUILA, "Aquila")
 	.map_io		= aquila_map_io,
 	.init_machine	= aquila_machine_init,
 	.timer		= &s3c24xx_timer,
+	.reserve	= aquila_reserve,
 MACHINE_END
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index b1dcf96..0bda14f 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -25,6 +25,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>
@@ -809,6 +810,30 @@ static void __init goni_sound_init(void)
 	__raw_writel(__raw_readl(S5P_OTHERS) | (0x3 << 8), S5P_OTHERS);
 }
 
+#ifdef CONFIG_CMA
+
+static void __init goni_reserve(void)
+{
+	static struct cma_region regions[] = {
+		CMA_REGION("fw",  1 << 20, 128 << 10, 0x32000000),
+		CMA_REGION("b1", 32 << 20,         0, 0x33000000),
+		CMA_REGION("b2", 16 << 20,         0, 0x44000000),
+		{ }
+	};
+
+	static const char map[] __initconst =
+		"s5p-mfc5/f=fw;s5p-mfc5/a=b1;s5p-mfc5/b=b2;*=b1,b2";
+
+	cma_set_defaults(regions, map);
+	cma_early_regions_reserve(NULL);
+}
+
+#else
+
+#define goni_reserve NULL
+
+#endif
+
 static void __init goni_map_io(void)
 {
 	s5p_init_io(NULL, 0, S5P_VA_CHIPID);
@@ -865,4 +890,5 @@ MACHINE_START(GONI, "GONI")
 	.map_io		= goni_map_io,
 	.init_machine	= goni_machine_init,
 	.timer		= &s3c24xx_timer,
+	.reserve	= goni_reserve,
 MACHINE_END
diff --git a/arch/arm/mach-s5pv310/mach-universal_c210.c b/arch/arm/mach-s5pv310/mach-universal_c210.c
index 16d8fc0..90a2296 100644
--- a/arch/arm/mach-s5pv310/mach-universal_c210.c
+++ b/arch/arm/mach-s5pv310/mach-universal_c210.c
@@ -13,6 +13,7 @@
 #include <linux/i2c.h>
 #include <linux/gpio_keys.h>
 #include <linux/gpio.h>
+#include <linux/cma.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach-types.h>
@@ -138,6 +139,21 @@ static void __init universal_map_io(void)
 	s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs));
 }
 
+static void __init universal_reserve(void)
+{
+	static struct cma_region regions[] = {
+		CMA_REGION("r" , 64 << 20, 0, 0),
+		CMA_REGION("fw",  1 << 20, 128 << 10),
+		{ }
+	};
+
+	static const char map[] __initconst =
+		"s3c-mfc5/f=fw;*=r";
+
+	cma_set_defaults(regions, map);
+	cma_early_regions_reserve(NULL);
+}
+
 static void __init universal_machine_init(void)
 {
 	i2c_register_board_info(0, i2c0_devs, ARRAY_SIZE(i2c0_devs));
@@ -152,6 +168,7 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")
 	.boot_params	= S5P_PA_SDRAM + 0x100,
 	.init_irq	= s5pv310_init_irq,
 	.map_io		= universal_map_io,
+	.reserve	= universal_reserve,
 	.init_machine	= universal_machine_init,
 	.timer		= &s5pv310_timer,
 MACHINE_END
-- 
1.7.2.3

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      parent reply	other threads:[~2010-11-19 15:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-19 15:57 [RFCv6 00/13] The Contiguous Memory Allocator framework Michal Nazarewicz
2010-11-19 15:57 ` [RFCv6 01/13] lib: rbtree: rb_root_init() function added Michal Nazarewicz
2010-11-19 15:58 ` [RFCv6 02/13] lib: bitmap: Added alignment offset for bitmap_find_next_zero_area() Michal Nazarewicz
2010-11-19 15:58 ` [RFCv6 03/13] lib: genalloc: Generic allocator improvements Michal Nazarewicz
2010-11-19 15:58 ` [RFCv6 04/13] mm: cma: Contiguous Memory Allocator added Michal Nazarewicz
2010-11-19 15:58 ` [RFCv6 05/13] mm: cma: debugfs support added Michal Nazarewicz
2010-11-19 15:58 ` [RFCv6 06/13] mm: cma: Best-fit algorithm added Michal Nazarewicz
2010-11-19 15:58 ` [RFCv6 07/13] mm: cma: Test device and application added Michal Nazarewicz
2010-11-19 15:58 ` [RFCv6 08/13] mm: move some functions to page_isolation.c Michal Nazarewicz
2010-11-19 15:58 ` [RFCv6 09/13] mm: alloc_contig_free_pages() added Michal Nazarewicz
2010-11-19 15:58 ` [RFCv6 10/13] mm: MIGRATE_CMA migration type added Michal Nazarewicz
2010-11-19 15:58 ` [RFCv6 11/13] mm: MIGRATE_CMA isolation functions added Michal Nazarewicz
2010-11-19 15:58 ` [RFCv6 12/13] mm: cma: Migration support added [wip] Michal Nazarewicz
2010-11-19 15:58 ` Michal Nazarewicz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c5e5580e35e1a8edf211228c4b5aea83830a7ee6.1290172312.git.m.nazarewicz@samsung.com \
    --to=m.nazarewicz@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=ankita@in.ibm.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=bryanh@codeaurora.org \
    --cc=corbet@lwn.net \
    --cc=dipankar@in.ibm.com \
    --cc=dwalker@codeaurora.org \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=hverkuil@xs4all.nl \
    --cc=johan.xx.mossberg@stericsson.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@arm.linux.org.uk \
    --cc=m.szyprowski@samsung.com \
    --cc=marcus.xm.lorentzon@stericsson.com \
    --cc=mel@csn.ul.ie \
    --cc=mina86@mina86.com \
    --cc=pawel@osciak.com \
    --cc=svaidy@linux.vnet.ibm.com \
    --cc=zpfeffer@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox