From patchwork Thu Feb 24 14:33:52 2011 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: 587671 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 p1OEdgU7006514 for ; Thu, 24 Feb 2011 14:39:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754585Ab1BXOjk (ORCPT ); Thu, 24 Feb 2011 09:39:40 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:38863 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755625Ab1BXOjf (ORCPT ); Thu, 24 Feb 2011 09:39:35 -0500 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 <0LH400K0DM1U4I@mailout1.w1.samsung.com>; Thu, 24 Feb 2011 14:39:30 +0000 (GMT) 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 <0LH400HGSM1TJC@spt1.w1.samsung.com>; Thu, 24 Feb 2011 14:39:30 +0000 (GMT) Received: from localhost.localdomain (davsrvsmtp01.bs.local [106.116.38.10]) by linux.samsung.com (Postfix) with ESMTP id A726C27004F; Thu, 24 Feb 2011 15:40:00 +0100 (CET) Date: Thu, 24 Feb 2011 15:33:52 +0100 From: Sylwester Nawrocki Subject: [PATCH 5/7] s5p-fimc: Add a platform data entry for MIPI-CSI data alignment In-reply-to: <1298558034-10768-1-git-send-email-s.nawrocki@samsung.com> To: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: m.szyprowski@samsung.com, kyungmin.park@samsung.com, kgene.kim@samsung.com, s.nawrocki@samsung.com Message-id: <1298558034-10768-6-git-send-email-s.nawrocki@samsung.com> MIME-version: 1.0 X-Mailer: git-send-email 1.7.2.3 Content-type: TEXT/PLAIN Content-transfer-encoding: 7BIT References: <1298558034-10768-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.6 (demeter1.kernel.org [140.211.167.41]); Thu, 24 Feb 2011 14:39:42 +0000 (UTC) diff --git a/drivers/media/video/s5p-fimc/fimc-reg.c b/drivers/media/video/s5p-fimc/fimc-reg.c index 10684ae..4d929a3 100644 --- a/drivers/media/video/s5p-fimc/fimc-reg.c +++ b/drivers/media/video/s5p-fimc/fimc-reg.c @@ -665,10 +665,12 @@ int fimc_hw_set_camera_type(struct fimc_dev *fimc, vid_cap->fmt.code); return -EINVAL; } - writel(tmp | (0x1 << 8), fimc->regs + S5P_CSIIMGFMT); + tmp |= (cam->csi_data_align == 32) << 8; + + writel(tmp, fimc->regs + S5P_CSIIMGFMT); } else if (cam->bus_type == FIMC_ITU_601 || - cam->bus_type == FIMC_ITU_656) { + cam->bus_type == FIMC_ITU_656) { if (cam->mux_id == 0) /* ITU-A, ITU-B: 0, 1 */ cfg |= S5P_CIGCTRL_SELCAM_ITU_A; } else if (cam->bus_type == FIMC_LCD_WB) { diff --git a/include/media/s5p_fimc.h b/include/media/s5p_fimc.h index 96cd6fc..94c9a00 100644 --- a/include/media/s5p_fimc.h +++ b/include/media/s5p_fimc.h @@ -33,6 +33,7 @@ struct i2c_board_info; * @board_info: pointer to I2C subdevice's board info * @clk_frequency: frequency of the clock the host interface provides to sensor * @bus_type: determines bus type, MIPI, ITU-R BT.601 etc. + * @csi_data_align: MIPI-CSI interface data alignment in bits * @i2c_bus_num: i2c control bus id the sensor is attached to * @mux_id: FIMC camera interface multiplexer index (separate for MIPI and ITU) * @flags: flags defining bus signals polarity inversion (High by default) @@ -41,6 +42,7 @@ struct s5p_fimc_isp_info { struct i2c_board_info *board_info; unsigned long clk_frequency; enum cam_bus_type bus_type; + u16 csi_data_align; u16 i2c_bus_num; u16 mux_id; u16 flags;