Skip to content

Commit

Permalink
V4L/DVB (4921): Budget-av, budget-ci: Fix MC1 register programming
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hartmut Birr authored and Mauro Carvalho Chehab committed Dec 10, 2006
1 parent 97a2cf0 commit 2a893de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions drivers/media/dvb/ttpci/budget-av.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ static int ciintf_init(struct budget_av *budget_av)
saa7146_setgpio(saa, 3, SAA7146_GPIO_OUTLO);

/* Enable DEBI pins */
saa7146_write(saa, MC1, saa7146_read(saa, MC1) | (0x800 << 16) | 0x800);
saa7146_write(saa, MC1, MASK_27 | MASK_11);

/* register CI interface */
budget_av->ca.owner = THIS_MODULE;
Expand All @@ -386,7 +386,7 @@ static int ciintf_init(struct budget_av *budget_av)
return 0;

error:
saa7146_write(saa, MC1, saa7146_read(saa, MC1) | (0x800 << 16));
saa7146_write(saa, MC1, MASK_27);
return result;
}

Expand All @@ -403,7 +403,7 @@ static void ciintf_deinit(struct budget_av *budget_av)
dvb_ca_en50221_release(&budget_av->ca);

/* disable DEBI pins */
saa7146_write(saa, MC1, saa7146_read(saa, MC1) | (0x800 << 16));
saa7146_write(saa, MC1, MASK_27);
}


Expand Down
6 changes: 3 additions & 3 deletions drivers/media/dvb/ttpci/budget-ci.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ static int ciintf_init(struct budget_ci *budget_ci)
memset(&budget_ci->ca, 0, sizeof(struct dvb_ca_en50221));

// enable DEBI pins
saa7146_write(saa, MC1, saa7146_read(saa, MC1) | (0x800 << 16) | 0x800);
saa7146_write(saa, MC1, MASK_27 | MASK_11);

// test if it is there
ci_version = ttpci_budget_debiread(&budget_ci->budget, DEBICICTL, DEBIADDR_CIVERSION, 1, 1, 0);
Expand Down Expand Up @@ -559,7 +559,7 @@ static int ciintf_init(struct budget_ci *budget_ci)
return 0;

error:
saa7146_write(saa, MC1, saa7146_read(saa, MC1) | (0x800 << 16));
saa7146_write(saa, MC1, MASK_27);
return result;
}

Expand Down Expand Up @@ -587,7 +587,7 @@ static void ciintf_deinit(struct budget_ci *budget_ci)
dvb_ca_en50221_release(&budget_ci->ca);

// disable DEBI pins
saa7146_write(saa, MC1, saa7146_read(saa, MC1) | (0x800 << 16));
saa7146_write(saa, MC1, MASK_27);
}

static void budget_ci_irq(struct saa7146_dev *dev, u32 * isr)
Expand Down

0 comments on commit 2a893de

Please sign in to comment.