From patchwork Wed Jun 16 10:12:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 106447 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o5GACY0a002270 for ; Wed, 16 Jun 2010 10:12:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758658Ab0FPKMW (ORCPT ); Wed, 16 Jun 2010 06:12:22 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:57423 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758559Ab0FPKMS (ORCPT ); Wed, 16 Jun 2010 06:12:18 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: TEXT/PLAIN Received: from eu_spt2 ([210.118.77.13]) by mailout3.w1.samsung.com (Sun Java(tm) System Messaging Server 6.3-8.04 (built Jul 29 2009; 32bit)) with ESMTP id <0L4300CRFR09DS00@mailout3.w1.samsung.com>; Wed, 16 Jun 2010 11:12:10 +0100 (BST) Received: from linux.samsung.com ([106.116.38.10]) by spt2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0L4300GPXR09I4@spt2.w1.samsung.com>; Wed, 16 Jun 2010 11:12:10 +0100 (BST) Received: from mcdsrvbld02.digital.local (unknown [106.116.37.23]) by linux.samsung.com (Postfix) with ESMTP id 46E2A270052; Wed, 16 Jun 2010 12:11:25 +0200 (CEST) Date: Wed, 16 Jun 2010 12:12:01 +0200 From: Sylwester Nawrocki Subject: [PATCH 5/7] ARM: S5PV210: Add fifo link definitions for fimc and framebuffer In-reply-to: <1276683123-30224-1-git-send-email-s.nawrocki@samsung.com> To: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org Cc: p.osciak@samsung.com, m.szyprowski@samsung.com, kyungmin.park@samsung.com, ben-linux@fluff.org, kgene.kim@samsung.com, Sylwester Nawrocki Message-id: <1276683123-30224-6-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.7.1 References: <1276683123-30224-1-git-send-email-s.nawrocki@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.3 (demeter.kernel.org [140.211.167.41]); Wed, 16 Jun 2010 10:12:35 +0000 (UTC) diff --git a/arch/arm/mach-s5pv210/setup-fimc0.c b/arch/arm/mach-s5pv210/setup-fimc0.c index 94205f5..fab6e52 100644 --- a/arch/arm/mach-s5pv210/setup-fimc0.c +++ b/arch/arm/mach-s5pv210/setup-fimc0.c @@ -10,6 +10,10 @@ */ #include +#include +#include +#include +#include struct samsung_plat_fimc s5p_fimc0_default_data __initdata = { .capability = S5P_FIMC_IN_ROT | S5P_FIMC_OUT_ROT, @@ -23,3 +27,22 @@ struct samsung_plat_fimc s5p_fimc0_default_data __initdata = { .out_rot_en_w = 1920, .out_rot_dis_w = 4224 }; + +static struct s3c_fifo_link s5pv210_fimc0_win0_link = { + .master_dev = &s5p_device_fimc0.dev, + .slave_dev = &s3c_device_fb.dev, +}; + +void __init s5pv210_setup_fimc0_fb_link(void) +{ + struct s3c_fb_platdata *fb_pd; + struct samsung_plat_fimc *fimc_pd; + + fimc_pd = s5p_device_fimc0.dev.platform_data; + fb_pd = s3c_device_fb.dev.platform_data; + + if (fimc_pd && fb_pd && fb_pd->win[0]) { + fb_pd->win[0]->fifo_sources[0] = &s5pv210_fimc0_win0_link; + fimc_pd->fifo_targets[0] = &s5pv210_fimc0_win0_link; + } +} diff --git a/arch/arm/mach-s5pv210/setup-fimc1.c b/arch/arm/mach-s5pv210/setup-fimc1.c index bfaffe9..2a6e930 100644 --- a/arch/arm/mach-s5pv210/setup-fimc1.c +++ b/arch/arm/mach-s5pv210/setup-fimc1.c @@ -10,6 +10,10 @@ */ #include +#include +#include +#include +#include struct samsung_plat_fimc s5p_fimc1_default_data __initdata = { .capability = S5P_FIMC_IN_ROT | S5P_FIMC_OUT_ROT, @@ -23,3 +27,22 @@ struct samsung_plat_fimc s5p_fimc1_default_data __initdata = { .out_rot_en_w = 1920, .out_rot_dis_w = 4224 }; + +static struct s3c_fifo_link s5pv210_fimc1_win1_link = { + .master_dev = &s5p_device_fimc1.dev, + .slave_dev = &s3c_device_fb.dev, +}; + +void __init s5pv210_setup_fimc1_fb_link(void) +{ + struct s3c_fb_platdata *fb_pd; + struct samsung_plat_fimc *fimc_pd; + + fimc_pd = s5p_device_fimc1.dev.platform_data; + fb_pd = s3c_device_fb.dev.platform_data; + + if (fimc_pd && fb_pd && fb_pd->win[1]) { + fb_pd->win[1]->fifo_sources[0] = &s5pv210_fimc1_win1_link; + fimc_pd->fifo_targets[0] = &s5pv210_fimc1_win1_link; + } +} diff --git a/arch/arm/mach-s5pv210/setup-fimc2.c b/arch/arm/mach-s5pv210/setup-fimc2.c index a53a382..79b61b0 100644 --- a/arch/arm/mach-s5pv210/setup-fimc2.c +++ b/arch/arm/mach-s5pv210/setup-fimc2.c @@ -10,6 +10,10 @@ */ #include +#include +#include +#include +#include struct samsung_plat_fimc s5p_fimc2_default_data __initdata = { .capability = S5P_FIMC_IN_ROT | S5P_FIMC_OUT_ROT, @@ -23,3 +27,22 @@ struct samsung_plat_fimc s5p_fimc2_default_data __initdata = { .out_rot_en_w = 1280, .out_rot_dis_w = 1920 }; + +static struct s3c_fifo_link s5pv210_fimc2_win2_link = { + .master_dev = &s5p_device_fimc2.dev, + .slave_dev = &s3c_device_fb.dev, +}; + +void __init s5pv210_setup_fimc2_fb_link(void) +{ + struct s3c_fb_platdata *fb_pd; + struct samsung_plat_fimc *fimc_pd; + + fimc_pd = s5p_device_fimc2.dev.platform_data; + fb_pd = s3c_device_fb.dev.platform_data; + + if (fimc_pd && fb_pd && fb_pd->win[2]) { + fb_pd->win[2]->fifo_sources[0] = &s5pv210_fimc2_win2_link; + fimc_pd->fifo_targets[0] = &s5pv210_fimc2_win2_link; + } +} diff --git a/arch/arm/plat-samsung/include/plat/fimc.h b/arch/arm/plat-samsung/include/plat/fimc.h index bc6799e..8f95fc0 100644 --- a/arch/arm/plat-samsung/include/plat/fimc.h +++ b/arch/arm/plat-samsung/include/plat/fimc.h @@ -54,5 +54,9 @@ extern void s5p_fimc0_set_platdata(struct samsung_plat_fimc *fimc); extern void s5p_fimc1_set_platdata(struct samsung_plat_fimc *fimc); extern void s5p_fimc2_set_platdata(struct samsung_plat_fimc *fimc); +extern void __init s5pv210_setup_fimc0_fb_link(void); +extern void __init s5pv210_setup_fimc1_fb_link(void); +extern void __init s5pv210_setup_fimc2_fb_link(void); + #endif /* FIMC_H_ */