From patchwork Thu Mar 31 13:16:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 679231 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2VDHYpK026241 for ; Thu, 31 Mar 2011 13:17:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757586Ab1CaNQa (ORCPT ); Thu, 31 Mar 2011 09:16:30 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:22671 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757515Ab1CaNQZ (ORCPT ); Thu, 31 Mar 2011 09:16:25 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: TEXT/PLAIN Received: from eu_spt1 ([210.118.77.14]) by mailout4.w1.samsung.com (Sun Java(tm) System Messaging Server 6.3-8.04 (built Jul 29 2009; 32bit)) with ESMTP id <0LIX00C05BIZY9A0@mailout4.w1.samsung.com>; Thu, 31 Mar 2011 14:16:13 +0100 (BST) Received: from linux.samsung.com ([106.116.38.10]) by spt1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LIX00EBVBIYXY@spt1.w1.samsung.com>; Thu, 31 Mar 2011 14:16:11 +0100 (BST) Received: from localhost.localdomain (davsrvsmtp01.bs.local [106.116.38.10]) by linux.samsung.com (Postfix) with ESMTP id 0E91C27005D; Thu, 31 Mar 2011 15:17:34 +0200 (CEST) Date: Thu, 31 Mar 2011 15:16:08 +0200 From: Marek Szyprowski Subject: [PATCH 12/12] ARM: S5PC110: Added CMA regions to Aquila and Goni boards In-reply-to: <1301577368-16095-1-git-send-email-m.szyprowski@samsung.com> To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-media@vger.kernel.org, linux-mm@kvack.org Cc: Michal Nazarewicz , Marek Szyprowski , Kyungmin Park , Andrew Morton , KAMEZAWA Hiroyuki , Ankita Garg , Daniel Walker , Johan MOSSBERG , Mel Gorman , Pawel Osciak Message-id: <1301577368-16095-13-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.7.2.3 References: <1301577368-16095-1-git-send-email-m.szyprowski@samsung.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 31 Mar 2011 13:17:34 +0000 (UTC) diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c index 4e1d8ff..de3c41f 100644 --- a/arch/arm/mach-s5pv210/mach-aquila.c +++ b/arch/arm/mach-s5pv210/mach-aquila.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -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 diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c index 31d5aa7..24f3f5c 100644 --- a/arch/arm/mach-s5pv210/mach-goni.c +++ b/arch/arm/mach-s5pv210/mach-goni.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -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