From patchwork Tue Jul 5 07:41:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 943702 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p657nLTx024322 for ; Tue, 5 Jul 2011 07:49:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754287Ab1GEHno (ORCPT ); Tue, 5 Jul 2011 03:43:44 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:38860 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754063Ab1GEHl5 (ORCPT ); Tue, 5 Jul 2011 03:41:57 -0400 Received: from eu_spt1 (mailout1.w1.samsung.com [210.118.77.11]) by mailout1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0LNU00DULO1VSW@mailout1.w1.samsung.com>; Tue, 05 Jul 2011 08:41:55 +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 <0LNU00GL1O1UEB@spt1.w1.samsung.com>; Tue, 05 Jul 2011 08:41:54 +0100 (BST) Received: from mcdsrvbld02.digital.local (unknown [106.116.37.23]) by linux.samsung.com (Postfix) with ESMTP id 3940C270068; Tue, 05 Jul 2011 09:42:26 +0200 (CEST) Date: Tue, 05 Jul 2011 09:41:50 +0200 From: Marek Szyprowski Subject: [PATCH 8/8] ARM: S5PV210: example of CMA private area for FIMC device on Goni board In-reply-to: <1309851710-3828-1-git-send-email-m.szyprowski@samsung.com> To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-mm@kvack.org, linaro-mm-sig@lists.linaro.org Cc: Michal Nazarewicz , Marek Szyprowski , Kyungmin Park , Andrew Morton , KAMEZAWA Hiroyuki , Ankita Garg , Daniel Walker , Mel Gorman , Arnd Bergmann , Jesse Barker , Jonathan Corbet , Chunsang Jeong Message-id: <1309851710-3828-9-git-send-email-m.szyprowski@samsung.com> MIME-version: 1.0 X-Mailer: git-send-email 1.7.2.5 Content-type: TEXT/PLAIN Content-transfer-encoding: 7BIT References: <1309851710-3828-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 (demeter2.kernel.org [140.211.167.43]); Tue, 05 Jul 2011 07:49:21 +0000 (UTC) This patch is an example how device private CMA area can be activated. It creates one CMA region and assigns it to the first s5p-fimc device on Samsung Goni S5PC110 board. Signed-off-by: Marek Szyprowski Signed-off-by: Kyungmin Park Reviewed-by: Arnd Bergmann --- arch/arm/mach-s5pv210/Kconfig | 1 + arch/arm/mach-s5pv210/mach-goni.c | 8 ++++++++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig index 37b5a97..c09a92c 100644 --- a/arch/arm/mach-s5pv210/Kconfig +++ b/arch/arm/mach-s5pv210/Kconfig @@ -64,6 +64,7 @@ menu "S5PC110 Machines" config MACH_AQUILA bool "Aquila" select CPU_S5PV210 + select CMA select S3C_DEV_FB select S5P_DEV_FIMC0 select S5P_DEV_FIMC1 diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c index 31d5aa7..d9e565d 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 @@ -886,6 +887,12 @@ static void __init goni_machine_init(void) platform_add_devices(goni_devices, ARRAY_SIZE(goni_devices)); } +static void __init goni_reserve(void) +{ + /* Create private 16MiB contiguous memory area for s5p-fimc.0 device */ + dma_declare_contiguous(&s5p_device_fimc0.dev, 16*SZ_1M, 0); +} + MACHINE_START(GONI, "GONI") /* Maintainers: Kyungmin Park */ .boot_params = S5P_PA_SDRAM + 0x100, @@ -893,4 +900,5 @@ MACHINE_START(GONI, "GONI") .map_io = goni_map_io, .init_machine = goni_machine_init, .timer = &s5p_timer, + .reserve = goni_reserve, MACHINE_END