aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/blackfin/mach-bf609/boards/ezkit.c2
-rw-r--r--drivers/media/i2c/adv7842.c11
-rw-r--r--include/media/adv7842.h14
3 files changed, 22 insertions, 5 deletions
diff --git a/arch/blackfin/mach-bf609/boards/ezkit.c b/arch/blackfin/mach-bf609/boards/ezkit.c
index 28bdd8ba3a86..39a7969287ab 100644
--- a/arch/blackfin/mach-bf609/boards/ezkit.c
+++ b/arch/blackfin/mach-bf609/boards/ezkit.c
@@ -1025,6 +1025,8 @@ static struct adv7842_platform_data adv7842_data = {
1025 .ain_sel = ADV7842_AIN10_11_12_NC_SYNC_4_1, 1025 .ain_sel = ADV7842_AIN10_11_12_NC_SYNC_4_1,
1026 .prim_mode = ADV7842_PRIM_MODE_SDP, 1026 .prim_mode = ADV7842_PRIM_MODE_SDP,
1027 .vid_std_select = ADV7842_SDP_VID_STD_CVBS_SD_4x1, 1027 .vid_std_select = ADV7842_SDP_VID_STD_CVBS_SD_4x1,
1028 .hdmi_free_run_enable = 1,
1029 .sdp_free_run_auto = 1,
1028 .i2c_sdp_io = 0x40, 1030 .i2c_sdp_io = 0x40,
1029 .i2c_sdp = 0x41, 1031 .i2c_sdp = 0x41,
1030 .i2c_cp = 0x42, 1032 .i2c_cp = 0x42,
diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c
index ecbe3f29c1ab..518f1e29b9b0 100644
--- a/drivers/media/i2c/adv7842.c
+++ b/drivers/media/i2c/adv7842.c
@@ -1624,8 +1624,6 @@ static void select_input(struct v4l2_subdev *sd,
1624 /* deinterlacer enabled and 3D comb */ 1624 /* deinterlacer enabled and 3D comb */
1625 sdp_write_and_or(sd, 0x12, 0xf6, 0x09); 1625 sdp_write_and_or(sd, 0x12, 0xf6, 0x09);
1626 1626
1627 sdp_write(sd, 0xdd, 0x08); /* free run auto */
1628
1629 break; 1627 break;
1630 1628
1631 case ADV7842_MODE_COMP: 1629 case ADV7842_MODE_COMP:
@@ -2538,7 +2536,14 @@ static int adv7842_core_init(struct v4l2_subdev *sd)
2538 pdata->drive_strength.sync); 2536 pdata->drive_strength.sync);
2539 2537
2540 /* HDMI free run */ 2538 /* HDMI free run */
2541 cp_write(sd, 0xba, (pdata->hdmi_free_run_mode << 1) | 0x01); 2539 cp_write_and_or(sd, 0xba, 0xfc, pdata->hdmi_free_run_enable |
2540 (pdata->hdmi_free_run_mode << 1));
2541
2542 /* SPD free run */
2543 sdp_write_and_or(sd, 0xdd, 0xf0, pdata->sdp_free_run_force |
2544 (pdata->sdp_free_run_cbar_en << 1) |
2545 (pdata->sdp_free_run_man_col_en << 2) |
2546 (pdata->sdp_free_run_force << 3));
2542 2547
2543 /* TODO from platform data */ 2548 /* TODO from platform data */
2544 cp_write(sd, 0x69, 0x14); /* Enable CP CSC */ 2549 cp_write(sd, 0x69, 0x14); /* Enable CP CSC */
diff --git a/include/media/adv7842.h b/include/media/adv7842.h
index a4851bff8fae..772cdecfa71b 100644
--- a/include/media/adv7842.h
+++ b/include/media/adv7842.h
@@ -192,8 +192,18 @@ struct adv7842_platform_data {
192 unsigned sd_ram_size; /* ram size in MB */ 192 unsigned sd_ram_size; /* ram size in MB */
193 unsigned sd_ram_ddr:1; /* ddr or sdr sdram */ 193 unsigned sd_ram_ddr:1; /* ddr or sdr sdram */
194 194
195 /* Free run */ 195 /* HDMI free run, CP-reg 0xBA */
196 unsigned hdmi_free_run_mode; 196 unsigned hdmi_free_run_enable:1;
197 /* 0 = Mode 0: run when there is no TMDS clock
198 1 = Mode 1: run when there is no TMDS clock or the
199 video resolution does not match programmed one. */
200 unsigned hdmi_free_run_mode:1;
201
202 /* SDP free run, CP-reg 0xDD */
203 unsigned sdp_free_run_auto:1;
204 unsigned sdp_free_run_man_col_en:1;
205 unsigned sdp_free_run_cbar_en:1;
206 unsigned sdp_free_run_force:1;
197 207
198 struct adv7842_sdp_csc_coeff sdp_csc_coeff; 208 struct adv7842_sdp_csc_coeff sdp_csc_coeff;
199 209