Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242058
b: refs/heads/master
c: 8af81dd
h: refs/heads/master
v: v3
  • Loading branch information
Abylay Ospan authored and Mauro Carvalho Chehab committed Mar 22, 2011
1 parent b9b84a0 commit 731baaa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 78db66e5b2b4ef48eeede17a7159cb0622c7f03d
refs/heads/master: 8af81ddb12cf34e2f6eab7e130f1e55e1911ab8f
14 changes: 10 additions & 4 deletions trunk/drivers/media/video/cx23885/altera-ci.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ int altera_ci_op_cam(struct dvb_ca_en50221 *en50221, int slot,
netup_fpga_op_rw(inter, NETUP_CI_ADDR1, ((addr >> 7) & 0x7f), 0);
store = netup_fpga_op_rw(inter, NETUP_CI_BUSCTRL, 0, NETUP_CI_FLG_RD);

store &= 0x3f;
store &= 0x0f;
store |= ((state->nr << 7) | (flag << 6));

netup_fpga_op_rw(inter, NETUP_CI_BUSCTRL, store, 0);
Expand Down Expand Up @@ -340,19 +340,25 @@ int altera_ci_slot_reset(struct dvb_ca_en50221 *en50221, int slot)

ret = netup_fpga_op_rw(inter, NETUP_CI_BUSCTRL, 0, NETUP_CI_FLG_RD);
netup_fpga_op_rw(inter, NETUP_CI_BUSCTRL,
ret | (1 << (5 - state->nr)), 0);
(ret & 0xcf) | (1 << (5 - state->nr)), 0);

mutex_unlock(&inter->fpga_mutex);

for (;;) {
mdelay(50);

mutex_lock(&inter->fpga_mutex);

ret = netup_fpga_op_rw(inter, NETUP_CI_BUSCTRL,
0, NETUP_CI_FLG_RD);
mutex_unlock(&inter->fpga_mutex);

if ((ret & (1 << (5 - state->nr))) == 0)
break;
if (time_after(jiffies, t_out))
break;
}

mutex_unlock(&inter->fpga_mutex);

ci_dbg_print("%s: %d msecs\n", __func__,
jiffies_to_msecs(jiffies + msecs_to_jiffies(9999) - t_out));
Expand Down Expand Up @@ -381,7 +387,7 @@ int altera_ci_slot_ts_ctl(struct dvb_ca_en50221 *en50221, int slot)

ret = netup_fpga_op_rw(inter, NETUP_CI_BUSCTRL, 0, NETUP_CI_FLG_RD);
netup_fpga_op_rw(inter, NETUP_CI_BUSCTRL,
ret | (1 << (3 - state->nr)), 0);
(ret & 0x0f) | (1 << (3 - state->nr)), 0);

mutex_unlock(&inter->fpga_mutex);

Expand Down

0 comments on commit 731baaa

Please sign in to comment.