Commit f010dca2 authored by Stefan Ringel's avatar Stefan Ringel Committed by Mauro Carvalho Chehab

[media] tm6000: move from tm6000_set_reg to tm6000_set_reg_mask

move from tm6000_set_reg to tm6000_set_reg_mask
Signed-off-by: default avatarStefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent e872bb9a
...@@ -268,19 +268,18 @@ int tm6000_init_analog_mode(struct tm6000_core *dev) ...@@ -268,19 +268,18 @@ int tm6000_init_analog_mode(struct tm6000_core *dev)
struct v4l2_frequency f; struct v4l2_frequency f;
if (dev->dev_type == TM6010) { if (dev->dev_type == TM6010) {
/* Enable video */ /* Enable video and audio */
tm6000_set_reg_mask(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, tm6000_set_reg_mask(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF,
0x60, 0x60); 0x60, 0x60);
/* Disable TS input */
tm6000_set_reg_mask(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE, tm6000_set_reg_mask(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE,
0x00, 0x40); 0x00, 0x40);
tm6000_set_reg(dev, TM6010_REQ08_RF1_AADC_POWER_DOWN, 0xfc);
} else { } else {
/* Enables soft reset */ /* Enables soft reset */
tm6000_set_reg(dev, TM6010_REQ07_R3F_RESET, 0x01); tm6000_set_reg(dev, TM6010_REQ07_R3F_RESET, 0x01);
if (dev->scaler) if (dev->scaler)
/* Disable Hfilter and Enable TS Drop err */
tm6000_set_reg(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE, 0x20); tm6000_set_reg(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE, 0x20);
else /* Enable Hfilter and disable TS Drop err */ else /* Enable Hfilter and disable TS Drop err */
tm6000_set_reg(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE, 0x80); tm6000_set_reg(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE, 0x80);
...@@ -343,21 +342,16 @@ int tm6000_init_analog_mode(struct tm6000_core *dev) ...@@ -343,21 +342,16 @@ int tm6000_init_analog_mode(struct tm6000_core *dev)
int tm6000_init_digital_mode(struct tm6000_core *dev) int tm6000_init_digital_mode(struct tm6000_core *dev)
{ {
if (dev->dev_type == TM6010) { if (dev->dev_type == TM6010) {
int val; /* Disable video and audio */
u8 buf[2]; tm6000_set_reg_mask(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF,
0x00, 0x60);
/* digital init */ /* Enable TS input */
val = tm6000_get_reg(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, 0); tm6000_set_reg_mask(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE,
val &= ~0x60; 0x40, 0x40);
tm6000_set_reg(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, val); /* all power down, but not the digital data port */
val = tm6000_get_reg(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE, 0);
val |= 0x40;
tm6000_set_reg(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE, val);
tm6000_set_reg(dev, TM6010_REQ07_RFE_POWER_DOWN, 0x28); tm6000_set_reg(dev, TM6010_REQ07_RFE_POWER_DOWN, 0x28);
tm6000_set_reg(dev, TM6010_REQ08_RE2_POWER_DOWN_CTRL1, 0xfc); tm6000_set_reg(dev, TM6010_REQ08_RE2_POWER_DOWN_CTRL1, 0xfc);
tm6000_set_reg(dev, TM6010_REQ08_RE6_POWER_DOWN_CTRL2, 0xff); tm6000_set_reg(dev, TM6010_REQ08_RE6_POWER_DOWN_CTRL2, 0xff);
tm6000_read_write_usb(dev, 0xc0, 0x0e, 0x00c2, 0x0008, buf, 2);
printk(KERN_INFO"buf %#x %#x\n", buf[0], buf[1]);
} else { } else {
tm6000_set_reg(dev, TM6010_REQ07_RFF_SOFT_RESET, 0x08); tm6000_set_reg(dev, TM6010_REQ07_RFF_SOFT_RESET, 0x08);
tm6000_set_reg(dev, TM6010_REQ07_RFF_SOFT_RESET, 0x00); tm6000_set_reg(dev, TM6010_REQ07_RFF_SOFT_RESET, 0x00);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment