diff mbox

isif - debugging on dm365

Message ID 4BBC9977.8080902@cynove.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Jean-Philippe François April 7, 2010, 2:40 p.m. UTC
None
diff mbox

Patch

Index: b/drivers/media/video/davinci/dm365_ccdc.c
===================================================================
--- a/drivers/media/video/davinci/dm365_ccdc.c	2010-04-02 12:10:06.000000000 +0200
+++ b/drivers/media/video/davinci/dm365_ccdc.c	2010-04-07 16:17:21.000000000 +0200
@@ -1181,8 +1181,9 @@ 
 	case VPFE_BT656_10BIT:
 	case VPFE_YCBCR_SYNC_8:
 		ccdc_cfg.ycbcr.pix_fmt = CCDC_PIXFMT_YCBCR_8BIT;
 		ccdc_cfg.ycbcr.pix_order = CCDC_PIXORDER_CBYCRY;
+		ccdc_cfg.ycbcr.ycswap = params->ycswap;
 		break;
 	case VPFE_BT1120:
 	case VPFE_YCBCR_SYNC_16:
 		ccdc_cfg.ycbcr.pix_fmt = CCDC_PIXFMT_YCBCR_16BIT;
@@ -1285,9 +1286,11 @@ 
 		modeset |=
 			((VPFE_PINPOL_NEGATIVE & CCDC_VD_POL_MASK)
 			<< CCDC_VD_POL_SHIFT);
 		regw(3, REC656IF);
-		ccdcfg = ccdcfg | CCDC_DATA_PACK8 | CCDC_YCINSWP_YCBCR;
+		ccdcfg = ccdcfg | CCDC_DATA_PACK8;
+		if(params->ycswap == VPFE_DATA_Y)
+			ccdcfg |= CCDC_YCINSWP_YCBCR;
 		break;
 	case VPFE_BT656_10BIT:
 		if (params->pix_fmt != CCDC_PIXFMT_YCBCR_8BIT) {
 			dev_dbg(dev, "Invalid pix_fmt(input mode)\n");
@@ -1308,9 +1311,10 @@ 
 		break;
 
 	case VPFE_YCBCR_SYNC_8:
 		ccdcfg |= CCDC_DATA_PACK8;
-		ccdcfg |= CCDC_YCINSWP_YCBCR;
+		if(params->ycswap == VPFE_DATA_Y)
+			ccdcfg |= CCDC_YCINSWP_YCBCR;
 		if (params->pix_fmt != CCDC_PIXFMT_YCBCR_8BIT) {
 			dev_dbg(dev, "Invalid pix_fmt(input mode)\n");
 			return -EINVAL;
 		}
Index: b/include/media/davinci/vpfe_types.h
===================================================================
--- a/include/media/davinci/vpfe_types.h	2009-11-16 04:42:00.000000000 +0100
+++ b/include/media/davinci/vpfe_types.h	2010-04-07 16:22:48.000000000 +0200
@@ -39,13 +39,19 @@ 
 	/* BT656 - 10 bit */
 	VPFE_BT656_10BIT
 };
 
+enum vpfe_data_swap {
+	VPFE_DATA_Y,
+	VPFE_DATA_C
+};
+
 /* interface description */
 struct vpfe_hw_if_param {
 	enum vpfe_hw_if_type if_type;
 	enum vpfe_pin_pol hdpol;
 	enum vpfe_pin_pol vdpol;
+	enum vpfe_data_swap ycswap;
 };
 
 #endif
 #endif
Index: b/arch/arm/mach-davinci/board-dm365-evm.c
===================================================================
--- a/arch/arm/mach-davinci/board-dm365-evm.c	2010-03-30 15:20:56.000000000 +0200
+++ b/arch/arm/mach-davinci/board-dm365-evm.c	2010-04-07 16:19:39.000000000 +0200
@@ -497,8 +497,9 @@ 
 		.ccdc_if_params = {
 			.if_type = VPFE_YCBCR_SYNC_8,
 			.hdpol = VPFE_PINPOL_POSITIVE,
 			.vdpol = VPFE_PINPOL_POSITIVE,
+   			.ycswap = VPFE_DATA_C,
 		},
 		.board_info = {
 			I2C_BOARD_INFO("mt9d131", 0x48),
 			/* this is for PCLK rising edge */
Index: b/include/media/davinci/dm365_ccdc.h
===================================================================
--- a/include/media/davinci/dm365_ccdc.h	2009-11-16 04:42:00.000000000 +0100
+++ b/include/media/davinci/dm365_ccdc.h	2010-04-07 16:18:32.000000000 +0200
@@ -674,8 +674,10 @@ 
 	/* interface HD polarity */
 	enum vpfe_pin_pol hd_pol;
 	/* ccdc pix order. Only used for ycbcr capture */
 	enum ccdc_pixorder pix_order;
+	/* ccdc data connection. 8 bit ycbcr data bus connection */
+	enum vpfe_data_swap ycswap;
 	/* ccdc buffer type. Only used for ycbcr capture */
 	enum ccdc_buftype buf_type;
 };