Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205551
b: refs/heads/master
c: 4c67da0
h: refs/heads/master
i:
  205549: fa84ec3
  205547: fbd7ff6
  205543: d0bd45c
  205535: d0b091e
v: v3
  • Loading branch information
Mark Rankilor authored and Greg Kroah-Hartman committed Jun 17, 2010
1 parent a210925 commit fb801ca
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 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: 2f6df34cd3455245c44b420d7c3fb11d1137df79
refs/heads/master: 4c67da06f0248fc0ee0fcbf65afd887b023b4591
30 changes: 20 additions & 10 deletions trunk/drivers/staging/comedi/drivers/gsc_hpdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,17 +311,25 @@ struct hpdi_private {
void *plx9080_iobase;
void *hpdi_iobase;
uint32_t *dio_buffer[NUM_DMA_BUFFERS]; /* dma buffers */
dma_addr_t dio_buffer_phys_addr[NUM_DMA_BUFFERS]; /* physical addresses of dma buffers */
struct plx_dma_desc *dma_desc; /* array of dma descriptors read by plx9080, allocated to get proper alignment */
dma_addr_t dma_desc_phys_addr; /* physical address of dma descriptor array */
/* physical addresses of dma buffers */
dma_addr_t dio_buffer_phys_addr[NUM_DMA_BUFFERS];
/* array of dma descriptors read by plx9080, allocated to get proper
* alignment */
struct plx_dma_desc *dma_desc;
/* physical address of dma descriptor array */
dma_addr_t dma_desc_phys_addr;
unsigned int num_dma_descriptors;
uint32_t *desc_dio_buffer[NUM_DMA_DESCRIPTORS]; /* pointer to start of buffers indexed by descriptor */
volatile unsigned int dma_desc_index; /* index of the dma descriptor that is currently being used */
/* pointer to start of buffers indexed by descriptor */
uint32_t *desc_dio_buffer[NUM_DMA_DESCRIPTORS];
/* index of the dma descriptor that is currently being used */
volatile unsigned int dma_desc_index;
unsigned int tx_fifo_size;
unsigned int rx_fifo_size;
volatile unsigned long dio_count;
volatile uint32_t bits[24]; /* software copies of values written to hpdi registers */
volatile unsigned int block_size; /* number of bytes at which to generate COMEDI_CB_BLOCK events */
/* software copies of values written to hpdi registers */
volatile uint32_t bits[24];
/* number of bytes at which to generate COMEDI_CB_BLOCK events */
volatile unsigned int block_size;
unsigned dio_config_output:1;
};

Expand Down Expand Up @@ -570,7 +578,8 @@ static int hpdi_attach(struct comedi_device *dev, struct comedi_devconfig *it)
return -ENOMEM;

pcidev = NULL;
for (i = 0; i < ARRAY_SIZE(hpdi_boards) && dev->board_ptr == NULL; i++) {
for (i = 0; i < ARRAY_SIZE(hpdi_boards) &&
dev->board_ptr == NULL; i++) {
do {
pcidev = pci_get_subsys(PCI_VENDOR_ID_PLX,
hpdi_boards[i].device_id,
Expand Down Expand Up @@ -618,7 +627,7 @@ static int hpdi_attach(struct comedi_device *dev, struct comedi_devconfig *it)
/* remap, won't work with 2.0 kernels but who cares */
priv(dev)->plx9080_iobase = ioremap(priv(dev)->plx9080_phys_iobase,
pci_resource_len(pcidev,
PLX9080_BADDRINDEX));
PLX9080_BADDRINDEX));
priv(dev)->hpdi_iobase =
ioremap(priv(dev)->hpdi_phys_iobase,
pci_resource_len(pcidev, HPDI_BADDRINDEX));
Expand Down Expand Up @@ -769,7 +778,8 @@ static int di_cmd_test(struct comedi_device *dev, struct comedi_subdevice *s,
if (err)
return 1;

/* step 2: make sure trigger sources are unique and mutually compatible */
/* step 2: make sure trigger sources are unique and mutually
* compatible */

/* uniqueness check */
if (cmd->stop_src != TRIG_COUNT && cmd->stop_src != TRIG_NONE)
Expand Down

0 comments on commit fb801ca

Please sign in to comment.