diff options
Diffstat (limited to 'linux/drivers/media/dvb/ttpci/budget-ci.c')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget-ci.c | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/linux/drivers/media/dvb/ttpci/budget-ci.c b/linux/drivers/media/dvb/ttpci/budget-ci.c index 361cab9bf..5626d7afc 100644 --- a/linux/drivers/media/dvb/ttpci/budget-ci.c +++ b/linux/drivers/media/dvb/ttpci/budget-ci.c @@ -145,7 +145,7 @@ static void msp430_ir_interrupt (unsigned long data) struct budget_ci *budget_ci = (struct budget_ci *) data; struct input_dev *dev = &budget_ci->input_dev; unsigned int code = - ttpci_budget_debiread (&budget_ci->budget, DEBINOSWAP, DEBIADDR_IR, 2) >> 8; + ttpci_budget_debiread (&budget_ci->budget, DEBINOSWAP, DEBIADDR_IR, 2, 1) >> 8; if (code & 0x40) { code &= 0x3f; @@ -229,7 +229,7 @@ static int ciintf_read_attribute_mem (struct dvb_ca_en50221 *ca, int slot, return -EINVAL; return ttpci_budget_debiread (&budget_ci->budget, DEBICICAM, - DEBIADDR_ATTR | (address & 0xfff), 1); + DEBIADDR_ATTR | (address & 0xfff), 1, 1); } static int ciintf_write_attribute_mem (struct dvb_ca_en50221 *ca, int slot, @@ -241,7 +241,7 @@ static int ciintf_write_attribute_mem (struct dvb_ca_en50221 *ca, int slot, return -EINVAL; return ttpci_budget_debiwrite (&budget_ci->budget, DEBICICAM, - DEBIADDR_ATTR | (address & 0xfff), 1, value); + DEBIADDR_ATTR | (address & 0xfff), 1, value, 1); } static int ciintf_read_cam_control (struct dvb_ca_en50221 *ca, int slot, @@ -253,7 +253,7 @@ static int ciintf_read_cam_control (struct dvb_ca_en50221 *ca, int slot, return -EINVAL; return ttpci_budget_debiread (&budget_ci->budget, DEBICICAM, - DEBIADDR_IO | (address & 3), 1); + DEBIADDR_IO | (address & 3), 1, 1); } static int ciintf_write_cam_control (struct dvb_ca_en50221 *ca, int slot, @@ -265,7 +265,7 @@ static int ciintf_write_cam_control (struct dvb_ca_en50221 *ca, int slot, return -EINVAL; return ttpci_budget_debiwrite (&budget_ci->budget, DEBICICAM, - DEBIADDR_IO | (address & 3), 1, value); + DEBIADDR_IO | (address & 3), 1, value, 1); } static int ciintf_slot_reset (struct dvb_ca_en50221 *ca, int slot) @@ -279,10 +279,9 @@ static int ciintf_slot_reset (struct dvb_ca_en50221 *ca, int slot) // trigger on RISING edge during reset so we know when READY is re-asserted saa7146_setgpio (saa, 0, SAA7146_GPIO_IRQHI); budget_ci->slot_status = SLOTSTATUS_RESET; - ttpci_budget_debiwrite (&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1, 0); + ttpci_budget_debiwrite (&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1, 0, 1); msleep (1); - ttpci_budget_debiwrite (&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1, - CICONTROL_RESET); + ttpci_budget_debiwrite (&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1, CICONTROL_RESET, 1); saa7146_setgpio (saa, 1, SAA7146_GPIO_OUTHI); ttpci_budget_set_video_port (saa, BUDGET_VIDEO_PORTB); @@ -313,9 +312,8 @@ static int ciintf_slot_ts_enable (struct dvb_ca_en50221 *ca, int slot) saa7146_setgpio (saa, 1, SAA7146_GPIO_OUTLO); - tmp = ttpci_budget_debiread (&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1); - ttpci_budget_debiwrite (&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1, - tmp | CICONTROL_ENABLETS); + tmp = ttpci_budget_debiread (&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1, 1); + ttpci_budget_debiwrite (&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1, tmp | CICONTROL_ENABLETS, 1); ttpci_budget_set_video_port (saa, BUDGET_VIDEO_PORTA); return 0; @@ -332,7 +330,7 @@ static void ciintf_interrupt (unsigned long data) return; // read the CAM status - flags = ttpci_budget_debiread (&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1); + flags = ttpci_budget_debiread (&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1, 1); if (flags & CICONTROL_CAMDETECT) { // GPIO should be set to trigger on falling edge if a CAM is present @@ -383,13 +381,13 @@ static int ciintf_init (struct budget_ci *budget_ci) saa7146_read (saa, MC1) | (0x800 << 16) | 0x800); // test if it is there - if ((ttpci_budget_debiread (&budget_ci->budget, DEBICICTL, DEBIADDR_CIVERSION, 1) & 0xa0) != 0xa0) { + if ((ttpci_budget_debiread (&budget_ci->budget, DEBICICTL, DEBIADDR_CIVERSION, 1, 1) & 0xa0) != 0xa0) { result = -ENODEV; goto error; } // determine whether a CAM is present or not - flags = ttpci_budget_debiread (&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1); + flags = ttpci_budget_debiread (&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1, 1); budget_ci->slot_status = SLOTSTATUS_NONE; if (flags & CICONTROL_CAMDETECT) budget_ci->slot_status = SLOTSTATUS_PRESENT; @@ -422,8 +420,7 @@ static int ciintf_init (struct budget_ci *budget_ci) saa7146_setgpio (saa, 0, SAA7146_GPIO_IRQHI); } saa7146_write (saa, IER, saa7146_read (saa, IER) | MASK_03); - ttpci_budget_debiwrite (&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1, - CICONTROL_RESET); + ttpci_budget_debiwrite (&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1, CICONTROL_RESET, 1); // success! printk ("budget_ci: CI interface initialised\n"); @@ -450,10 +447,9 @@ static void ciintf_deinit (struct budget_ci *budget_ci) saa7146_write (saa, IER, saa7146_read (saa, IER) & ~MASK_03); saa7146_setgpio (saa, 0, SAA7146_GPIO_INPUT); tasklet_kill (&budget_ci->ciintf_irq_tasklet); - ttpci_budget_debiwrite (&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1, 0); + ttpci_budget_debiwrite (&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1, 0, 1); msleep (1); - ttpci_budget_debiwrite (&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1, - CICONTROL_RESET); + ttpci_budget_debiwrite (&budget_ci->budget, DEBICICTL, DEBIADDR_CICONTROL, 1, CICONTROL_RESET, 1); // disable TS data stream to CI interface saa7146_setgpio (saa, 1, SAA7146_GPIO_INPUT); |