aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/omap3isp/isp.c
diff options
context:
space:
mode:
authorMichael Jones <michael.jones@matrix-vision.de>2011-03-29 04:19:09 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-04-19 10:28:08 -0400
commitc09af044db91bf0f8ca5073f5863c7280de39cc1 (patch)
treea8279dc3db8b1ca73a246c5be857bbc024a87dca /drivers/media/video/omap3isp/isp.c
parent5782f97b55a0cf8ef66dff045f1beafcdaf40dda (diff)
[media] omap3isp: lane shifter support
To use the lane shifter, set different pixel formats at each end of the link at the CCDC input. Signed-off-by: Michael Jones <michael.jones@matrix-vision.de> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/omap3isp/isp.c')
-rw-r--r--drivers/media/video/omap3isp/isp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/video/omap3isp/isp.c b/drivers/media/video/omap3isp/isp.c
index e4fe836ee6d2..5d8e1ce64508 100644
--- a/drivers/media/video/omap3isp/isp.c
+++ b/drivers/media/video/omap3isp/isp.c
@@ -286,7 +286,8 @@ static void isp_power_settings(struct isp_device *isp, int idle)
286 */ 286 */
287void omap3isp_configure_bridge(struct isp_device *isp, 287void omap3isp_configure_bridge(struct isp_device *isp,
288 enum ccdc_input_entity input, 288 enum ccdc_input_entity input,
289 const struct isp_parallel_platform_data *pdata) 289 const struct isp_parallel_platform_data *pdata,
290 unsigned int shift)
290{ 291{
291 u32 ispctrl_val; 292 u32 ispctrl_val;
292 293
@@ -299,9 +300,9 @@ void omap3isp_configure_bridge(struct isp_device *isp,
299 switch (input) { 300 switch (input) {
300 case CCDC_INPUT_PARALLEL: 301 case CCDC_INPUT_PARALLEL:
301 ispctrl_val |= ISPCTRL_PAR_SER_CLK_SEL_PARALLEL; 302 ispctrl_val |= ISPCTRL_PAR_SER_CLK_SEL_PARALLEL;
302 ispctrl_val |= pdata->data_lane_shift << ISPCTRL_SHIFT_SHIFT;
303 ispctrl_val |= pdata->clk_pol << ISPCTRL_PAR_CLK_POL_SHIFT; 303 ispctrl_val |= pdata->clk_pol << ISPCTRL_PAR_CLK_POL_SHIFT;
304 ispctrl_val |= pdata->bridge << ISPCTRL_PAR_BRIDGE_SHIFT; 304 ispctrl_val |= pdata->bridge << ISPCTRL_PAR_BRIDGE_SHIFT;
305 shift += pdata->data_lane_shift * 2;
305 break; 306 break;
306 307
307 case CCDC_INPUT_CSI2A: 308 case CCDC_INPUT_CSI2A:
@@ -320,6 +321,8 @@ void omap3isp_configure_bridge(struct isp_device *isp,
320 return; 321 return;
321 } 322 }
322 323
324 ispctrl_val |= ((shift/2) << ISPCTRL_SHIFT_SHIFT) & ISPCTRL_SHIFT_MASK;
325
323 ispctrl_val &= ~ISPCTRL_SYNC_DETECT_MASK; 326 ispctrl_val &= ~ISPCTRL_SYNC_DETECT_MASK;
324 ispctrl_val |= ISPCTRL_SYNC_DETECT_VSRISE; 327 ispctrl_val |= ISPCTRL_SYNC_DETECT_VSRISE;
325 328