diff options
author | Stefan Ringel <stefan.ringel@arcor.de> | 2011-05-09 15:53:58 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-05-20 19:07:19 -0400 |
commit | f010dca2e52d8dcc0445d695192df19241afacdb (patch) | |
tree | 83a8b4c2fbfcd5ed0c86fcd613fbca41f2eff254 /drivers/staging | |
parent | e872bb9a7ddfc025ed727cc922b0aa32a7582004 (diff) |
[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: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/tm6000/tm6000-core.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c index 259cf802ea84..1ac84098ca57 100644 --- a/drivers/staging/tm6000/tm6000-core.c +++ b/drivers/staging/tm6000/tm6000-core.c | |||
@@ -268,19 +268,18 @@ int tm6000_init_analog_mode(struct tm6000_core *dev) | |||
268 | struct v4l2_frequency f; | 268 | struct v4l2_frequency f; |
269 | 269 | ||
270 | if (dev->dev_type == TM6010) { | 270 | if (dev->dev_type == TM6010) { |
271 | /* Enable video */ | 271 | /* Enable video and audio */ |
272 | |||
273 | tm6000_set_reg_mask(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, | 272 | tm6000_set_reg_mask(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, |
274 | 0x60, 0x60); | 273 | 0x60, 0x60); |
274 | /* Disable TS input */ | ||
275 | tm6000_set_reg_mask(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE, | 275 | tm6000_set_reg_mask(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE, |
276 | 0x00, 0x40); | 276 | 0x00, 0x40); |
277 | tm6000_set_reg(dev, TM6010_REQ08_RF1_AADC_POWER_DOWN, 0xfc); | ||
278 | |||
279 | } else { | 277 | } else { |
280 | /* Enables soft reset */ | 278 | /* Enables soft reset */ |
281 | tm6000_set_reg(dev, TM6010_REQ07_R3F_RESET, 0x01); | 279 | tm6000_set_reg(dev, TM6010_REQ07_R3F_RESET, 0x01); |
282 | 280 | ||
283 | if (dev->scaler) | 281 | if (dev->scaler) |
282 | /* Disable Hfilter and Enable TS Drop err */ | ||
284 | tm6000_set_reg(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE, 0x20); | 283 | tm6000_set_reg(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE, 0x20); |
285 | else /* Enable Hfilter and disable TS Drop err */ | 284 | else /* Enable Hfilter and disable TS Drop err */ |
286 | tm6000_set_reg(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE, 0x80); | 285 | 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 | int tm6000_init_digital_mode(struct tm6000_core *dev) | 342 | int tm6000_init_digital_mode(struct tm6000_core *dev) |
344 | { | 343 | { |
345 | if (dev->dev_type == TM6010) { | 344 | if (dev->dev_type == TM6010) { |
346 | int val; | 345 | /* Disable video and audio */ |
347 | u8 buf[2]; | 346 | tm6000_set_reg_mask(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, |
348 | 347 | 0x00, 0x60); | |
349 | /* digital init */ | 348 | /* Enable TS input */ |
350 | val = tm6000_get_reg(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, 0); | 349 | tm6000_set_reg_mask(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE, |
351 | val &= ~0x60; | 350 | 0x40, 0x40); |
352 | tm6000_set_reg(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, val); | 351 | /* all power down, but not the digital data port */ |
353 | val = tm6000_get_reg(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE, 0); | ||
354 | val |= 0x40; | ||
355 | tm6000_set_reg(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE, val); | ||
356 | tm6000_set_reg(dev, TM6010_REQ07_RFE_POWER_DOWN, 0x28); | 352 | tm6000_set_reg(dev, TM6010_REQ07_RFE_POWER_DOWN, 0x28); |
357 | tm6000_set_reg(dev, TM6010_REQ08_RE2_POWER_DOWN_CTRL1, 0xfc); | 353 | tm6000_set_reg(dev, TM6010_REQ08_RE2_POWER_DOWN_CTRL1, 0xfc); |
358 | tm6000_set_reg(dev, TM6010_REQ08_RE6_POWER_DOWN_CTRL2, 0xff); | 354 | tm6000_set_reg(dev, TM6010_REQ08_RE6_POWER_DOWN_CTRL2, 0xff); |
359 | tm6000_read_write_usb(dev, 0xc0, 0x0e, 0x00c2, 0x0008, buf, 2); | ||
360 | printk(KERN_INFO"buf %#x %#x\n", buf[0], buf[1]); | ||
361 | } else { | 355 | } else { |
362 | tm6000_set_reg(dev, TM6010_REQ07_RFF_SOFT_RESET, 0x08); | 356 | tm6000_set_reg(dev, TM6010_REQ07_RFF_SOFT_RESET, 0x08); |
363 | tm6000_set_reg(dev, TM6010_REQ07_RFF_SOFT_RESET, 0x00); | 357 | tm6000_set_reg(dev, TM6010_REQ07_RFF_SOFT_RESET, 0x00); |