Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242055
b: refs/heads/master
c: d164460
h: refs/heads/master
i:
  242053: 1f4a9d6
  242051: 4a5f2d0
  242047: e999827
v: v3
  • Loading branch information
Abylay Ospan authored and Mauro Carvalho Chehab committed Mar 22, 2011
1 parent 11ee942 commit f30cad9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 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: 1039752353f1308bcd594a79196f60a22d45975d
refs/heads/master: d164460f897e2ae8c48ca28c763bb1233d180e7e
18 changes: 9 additions & 9 deletions trunk/drivers/media/video/cx23885/cx23885-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,29 +620,29 @@ int netup_altera_fpga_rw(void *device, int flag, int data, int read)
{
struct cx23885_dev *dev = (struct cx23885_dev *)device;
unsigned long timeout = jiffies + msecs_to_jiffies(1);
int mem = 0;
uint32_t mem = 0;

cx_set(MC417_RWD, ALT_RD | ALT_WR | ALT_CS);
mem = cx_read(MC417_RWD);
if (read)
cx_set(MC417_OEN, ALT_DATA);
else {
cx_clear(MC417_OEN, ALT_DATA);/* D0-D7 out */
mem = cx_read(MC417_RWD);
mem &= ~ALT_DATA;
mem |= (data & ALT_DATA);
cx_write(MC417_RWD, mem);
}

if (flag)
cx_set(MC417_RWD, ALT_AD_RG);/* ADDR */
mem |= ALT_AD_RG;
else
cx_clear(MC417_RWD, ALT_AD_RG);/* VAL */
mem &= ~ALT_AD_RG;

cx_clear(MC417_RWD, ALT_CS);/* ~CS */
mem &= ~ALT_CS;
if (read)
cx_clear(MC417_RWD, ALT_RD);
mem = (mem & ~ALT_RD) | ALT_WR;
else
cx_clear(MC417_RWD, ALT_WR);
mem = (mem & ~ALT_WR) | ALT_RD;

cx_write(MC417_RWD, mem); /* start RW cycle */

for (;;) {
mem = cx_read(MC417_RWD);
Expand Down

0 comments on commit f30cad9

Please sign in to comment.