aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2011-02-21 10:09:01 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-22 03:54:18 -0400
commite0eec9af8bf599642f2730ed207296a92e6204aa (patch)
tree7b84caef97d1cfeb47dfcbe8fa31e5f8d0b716a2
parent117182d18399a956719be94d3e6e17aad9210cda (diff)
[media] s5p-fimc: Add a platform data entry for MIPI-CSI data alignment
Allow the MIPI-CSI data alignment to be defined in the board setup as it may be different across various camera sensors. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/s5p-fimc/fimc-reg.c6
-rw-r--r--include/media/s5p_fimc.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/video/s5p-fimc/fimc-reg.c b/drivers/media/video/s5p-fimc/fimc-reg.c
index 10684aef5b2d..4d929a394521 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,
665 vid_cap->fmt.code); 665 vid_cap->fmt.code);
666 return -EINVAL; 666 return -EINVAL;
667 } 667 }
668 writel(tmp | (0x1 << 8), fimc->regs + S5P_CSIIMGFMT); 668 tmp |= (cam->csi_data_align == 32) << 8;
669
670 writel(tmp, fimc->regs + S5P_CSIIMGFMT);
669 671
670 } else if (cam->bus_type == FIMC_ITU_601 || 672 } else if (cam->bus_type == FIMC_ITU_601 ||
671 cam->bus_type == FIMC_ITU_656) { 673 cam->bus_type == FIMC_ITU_656) {
672 if (cam->mux_id == 0) /* ITU-A, ITU-B: 0, 1 */ 674 if (cam->mux_id == 0) /* ITU-A, ITU-B: 0, 1 */
673 cfg |= S5P_CIGCTRL_SELCAM_ITU_A; 675 cfg |= S5P_CIGCTRL_SELCAM_ITU_A;
674 } else if (cam->bus_type == FIMC_LCD_WB) { 676 } else if (cam->bus_type == FIMC_LCD_WB) {
diff --git a/include/media/s5p_fimc.h b/include/media/s5p_fimc.h
index 82496d38a96a..9fdff8a4ed26 100644
--- a/include/media/s5p_fimc.h
+++ b/include/media/s5p_fimc.h
@@ -33,6 +33,7 @@ struct i2c_board_info;
33 * @board_info: pointer to I2C subdevice's board info 33 * @board_info: pointer to I2C subdevice's board info
34 * @clk_frequency: frequency of the clock the host interface provides to sensor 34 * @clk_frequency: frequency of the clock the host interface provides to sensor
35 * @bus_type: determines bus type, MIPI, ITU-R BT.601 etc. 35 * @bus_type: determines bus type, MIPI, ITU-R BT.601 etc.
36 * @csi_data_align: MIPI-CSI interface data alignment in bits
36 * @i2c_bus_num: i2c control bus id the sensor is attached to 37 * @i2c_bus_num: i2c control bus id the sensor is attached to
37 * @mux_id: FIMC camera interface multiplexer index (separate for MIPI and ITU) 38 * @mux_id: FIMC camera interface multiplexer index (separate for MIPI and ITU)
38 * @flags: flags defining bus signals polarity inversion (High by default) 39 * @flags: flags defining bus signals polarity inversion (High by default)
@@ -41,6 +42,7 @@ struct s5p_fimc_isp_info {
41 struct i2c_board_info *board_info; 42 struct i2c_board_info *board_info;
42 unsigned long clk_frequency; 43 unsigned long clk_frequency;
43 enum cam_bus_type bus_type; 44 enum cam_bus_type bus_type;
45 u16 csi_data_align;
44 u16 i2c_bus_num; 46 u16 i2c_bus_num;
45 u16 mux_id; 47 u16 mux_id;
46 u16 flags; 48 u16 flags;