diff options
author | Vijay Kumar B <vijaykumar@bravegnu.org> | 2009-09-21 11:23:54 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-11 12:23:09 -0800 |
commit | 16fbf4cba0880c31445d6414abbd7a1c51466b1f (patch) | |
tree | fc4cb8d4186d1a6afe3fa524a4d11f4689b6f1d0 | |
parent | e1bc58459aa23ec4e8f1e1aa2cacae215d04a949 (diff) |
Staging: poch: Parameter to enable synthetic counter
Adds a parameter that causes the hardware to synthesize Rx values
using a counter.
Signed-off-by: Vijay Kumar B. <vijaykumar@bravegnu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/poch/poch.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/staging/poch/poch.c b/drivers/staging/poch/poch.c index 2eb8e3d43c4..1308c7bada8 100644 --- a/drivers/staging/poch/poch.c +++ b/drivers/staging/poch/poch.c @@ -245,6 +245,11 @@ struct poch_dev { struct device *dev; }; +static int synth_rx; +module_param(synth_rx, bool, 0600); +MODULE_PARM_DESC(synth_rx, + "Synthesize received values using a counter. Default: No"); + static dev_t poch_first_dev; static struct class *poch_cls; static DEFINE_IDR(poch_ids); @@ -827,9 +832,11 @@ static int poch_open(struct inode *inode, struct file *filp) fpga + FPGA_TX_CTL_REG); } else { /* Flush RX FIFO and output data to cardbus. */ - iowrite32(FPGA_RX_CTL_CONT_CAP - | FPGA_RX_CTL_FIFO_FLUSH, - fpga + FPGA_RX_CTL_REG); + u32 ctl_val = FPGA_RX_CTL_CONT_CAP | FPGA_RX_CTL_FIFO_FLUSH; + if (synth_rx) + ctl_val |= FPGA_RX_CTL_SYNTH_DATA; + + iowrite32(ctl_val, fpga + FPGA_RX_CTL_REG); } atomic_inc(&channel->inited); |