[media] s5p-fimc: Add a platform data entry for MIPI-CSI data alignment
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Mon, 21 Feb 2011 15:09:01 +0000 (12:09 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 22 Mar 2011 07:54:18 +0000 (04:54 -0300)
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>
drivers/media/video/s5p-fimc/fimc-reg.c
include/media/s5p_fimc.h

index 10684aef5b2d02ef02d48b73011d1f50b2869694..4d929a3945217bf432f94704c0adc3c9d43fbde8 100644 (file)
@@ -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) {
index 82496d38a96aa727a1e900fda69b24ba58aa96c6..9fdff8a4ed2667f36beb2b3d551419f561ba2626 100644 (file)
@@ -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;