Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175162
b: refs/heads/master
c: dad1740
h: refs/heads/master
v: v3
  • Loading branch information
Vijay Kumar authored and Greg Kroah-Hartman committed Dec 11, 2009
1 parent 6c82e70 commit ff5c31d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 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: 7e72a85e07cab448a5779cf1ee851b850930ec9f
refs/heads/master: dad1740133ffe49ae44044f97e4cbfcb42f037b1
16 changes: 13 additions & 3 deletions trunk/drivers/staging/poch/poch.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,11 @@ module_param(synth_rx, bool, 0600);
MODULE_PARM_DESC(synth_rx,
"Synthesize received values using a counter. Default: No");

static int loopback;
module_param(loopback, bool, 0600);
MODULE_PARM_DESC(loopback,
"Enable hardware loopback of trasnmitted data. Default: No");

static dev_t poch_first_dev;
static struct class *poch_cls;
static DEFINE_IDR(poch_ids);
Expand Down Expand Up @@ -830,9 +835,14 @@ static int poch_open(struct inode *inode, struct file *filp)

if (channel->dir == CHANNEL_DIR_TX) {
/* Flush TX FIFO and output data from cardbus. */
iowrite32(FPGA_TX_CTL_FIFO_FLUSH
| FPGA_TX_CTL_OUTPUT_CARDBUS,
fpga + FPGA_TX_CTL_REG);
u32 ctl_val = 0;

ctl_val |= FPGA_TX_CTL_FIFO_FLUSH;
ctl_val |= FPGA_TX_CTL_OUTPUT_CARDBUS;
if (loopback)
ctl_val |= FPGA_TX_CTL_LOOPBACK;

iowrite32(ctl_val, fpga + FPGA_TX_CTL_REG);
} else {
/* Flush RX FIFO and output data to cardbus. */
u32 ctl_val = FPGA_RX_CTL_CONT_CAP | FPGA_RX_CTL_FIFO_FLUSH;
Expand Down

0 comments on commit ff5c31d

Please sign in to comment.