aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHartmut Birr <e9hack@gmail.com>2006-12-03 19:08:08 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-12-10 06:05:38 -0500
commit2a893dea0f186efc2eb4bcdaee145b20c87d239d (patch)
tree257336baec5af1ef59dae202ba0a111f89704e19 /drivers
parent97a2cf05c409f0f73346d3d258b643c782879c77 (diff)
V4L/DVB (4921): Budget-av, budget-ci: Fix MC1 register programming
Remove bogus read during MC1 programming. A '1' bit could never be cleared using the old code. Use MASK_xx macros. Signed-off-by: Hartmut Birr <e9hack@gmail.com> Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb/ttpci/budget-av.c6
-rw-r--r--drivers/media/dvb/ttpci/budget-ci.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c
index 4d1954072bb4..89ab4b59155c 100644
--- a/drivers/media/dvb/ttpci/budget-av.c
+++ b/drivers/media/dvb/ttpci/budget-av.c
@@ -360,7 +360,7 @@ static int ciintf_init(struct budget_av *budget_av)
360 saa7146_setgpio(saa, 3, SAA7146_GPIO_OUTLO); 360 saa7146_setgpio(saa, 3, SAA7146_GPIO_OUTLO);
361 361
362 /* Enable DEBI pins */ 362 /* Enable DEBI pins */
363 saa7146_write(saa, MC1, saa7146_read(saa, MC1) | (0x800 << 16) | 0x800); 363 saa7146_write(saa, MC1, MASK_27 | MASK_11);
364 364
365 /* register CI interface */ 365 /* register CI interface */
366 budget_av->ca.owner = THIS_MODULE; 366 budget_av->ca.owner = THIS_MODULE;
@@ -386,7 +386,7 @@ static int ciintf_init(struct budget_av *budget_av)
386 return 0; 386 return 0;
387 387
388error: 388error:
389 saa7146_write(saa, MC1, saa7146_read(saa, MC1) | (0x800 << 16)); 389 saa7146_write(saa, MC1, MASK_27);
390 return result; 390 return result;
391} 391}
392 392
@@ -403,7 +403,7 @@ static void ciintf_deinit(struct budget_av *budget_av)
403 dvb_ca_en50221_release(&budget_av->ca); 403 dvb_ca_en50221_release(&budget_av->ca);
404 404
405 /* disable DEBI pins */ 405 /* disable DEBI pins */
406 saa7146_write(saa, MC1, saa7146_read(saa, MC1) | (0x800 << 16)); 406 saa7146_write(saa, MC1, MASK_27);
407} 407}
408 408
409 409
diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c
index 0dc52918ce68..f2066b47baee 100644
--- a/drivers/media/dvb/ttpci/budget-ci.c
+++ b/drivers/media/dvb/ttpci/budget-ci.c
@@ -485,7 +485,7 @@ static int ciintf_init(struct budget_ci *budget_ci)
485 memset(&budget_ci->ca, 0, sizeof(struct dvb_ca_en50221)); 485 memset(&budget_ci->ca, 0, sizeof(struct dvb_ca_en50221));
486 486
487 // enable DEBI pins 487 // enable DEBI pins
488 saa7146_write(saa, MC1, saa7146_read(saa, MC1) | (0x800 << 16) | 0x800); 488 saa7146_write(saa, MC1, MASK_27 | MASK_11);
489 489
490 // test if it is there 490 // test if it is there
491 ci_version = ttpci_budget_debiread(&budget_ci->budget, DEBICICTL, DEBIADDR_CIVERSION, 1, 1, 0); 491 ci_version = ttpci_budget_debiread(&budget_ci->budget, DEBICICTL, DEBIADDR_CIVERSION, 1, 1, 0);
@@ -559,7 +559,7 @@ static int ciintf_init(struct budget_ci *budget_ci)
559 return 0; 559 return 0;
560 560
561error: 561error:
562 saa7146_write(saa, MC1, saa7146_read(saa, MC1) | (0x800 << 16)); 562 saa7146_write(saa, MC1, MASK_27);
563 return result; 563 return result;
564} 564}
565 565
@@ -587,7 +587,7 @@ static void ciintf_deinit(struct budget_ci *budget_ci)
587 dvb_ca_en50221_release(&budget_ci->ca); 587 dvb_ca_en50221_release(&budget_ci->ca);
588 588
589 // disable DEBI pins 589 // disable DEBI pins
590 saa7146_write(saa, MC1, saa7146_read(saa, MC1) | (0x800 << 16)); 590 saa7146_write(saa, MC1, MASK_27);
591} 591}
592 592
593static void budget_ci_irq(struct saa7146_dev *dev, u32 * isr) 593static void budget_ci_irq(struct saa7146_dev *dev, u32 * isr)