Commit dc05a7d7 authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman

staging: comedi: gsc_hpdi: tidy up comments

Use the usual style for block comments.  Squash double spaces after
comment opening sequence.  Move some comments after opening braces to
following line.
Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Reviewed-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4a72a7af
...@@ -142,8 +142,10 @@ struct hpdi_private { ...@@ -142,8 +142,10 @@ struct hpdi_private {
uint32_t *dio_buffer[NUM_DMA_BUFFERS]; /* dma buffers */ uint32_t *dio_buffer[NUM_DMA_BUFFERS]; /* dma buffers */
/* physical addresses of dma buffers */ /* physical addresses of dma buffers */
dma_addr_t dio_buffer_phys_addr[NUM_DMA_BUFFERS]; dma_addr_t dio_buffer_phys_addr[NUM_DMA_BUFFERS];
/* array of dma descriptors read by plx9080, allocated to get proper /*
* alignment */ * array of dma descriptors read by plx9080, allocated to get proper
* alignment
*/
struct plx_dma_desc *dma_desc; struct plx_dma_desc *dma_desc;
/* physical address of dma descriptor array */ /* physical address of dma descriptor array */
dma_addr_t dma_desc_phys_addr; dma_addr_t dma_desc_phys_addr;
...@@ -226,7 +228,8 @@ static irqreturn_t gsc_hpdi_interrupt(int irq, void *d) ...@@ -226,7 +228,8 @@ static irqreturn_t gsc_hpdi_interrupt(int irq, void *d)
/* spin lock makes sure no one else changes plx dma control reg */ /* spin lock makes sure no one else changes plx dma control reg */
spin_lock_irqsave(&dev->spinlock, flags); spin_lock_irqsave(&dev->spinlock, flags);
dma0_status = readb(devpriv->plx9080_mmio + PLX_DMA0_CS_REG); dma0_status = readb(devpriv->plx9080_mmio + PLX_DMA0_CS_REG);
if (plx_status & ICS_DMA0_A) { /* dma chan 0 interrupt */ if (plx_status & ICS_DMA0_A) {
/* dma chan 0 interrupt */
writeb((dma0_status & PLX_DMA_EN_BIT) | PLX_CLEAR_DMA_INTR_BIT, writeb((dma0_status & PLX_DMA_EN_BIT) | PLX_CLEAR_DMA_INTR_BIT,
devpriv->plx9080_mmio + PLX_DMA0_CS_REG); devpriv->plx9080_mmio + PLX_DMA0_CS_REG);
...@@ -238,14 +241,16 @@ static irqreturn_t gsc_hpdi_interrupt(int irq, void *d) ...@@ -238,14 +241,16 @@ static irqreturn_t gsc_hpdi_interrupt(int irq, void *d)
/* spin lock makes sure no one else changes plx dma control reg */ /* spin lock makes sure no one else changes plx dma control reg */
spin_lock_irqsave(&dev->spinlock, flags); spin_lock_irqsave(&dev->spinlock, flags);
dma1_status = readb(devpriv->plx9080_mmio + PLX_DMA1_CS_REG); dma1_status = readb(devpriv->plx9080_mmio + PLX_DMA1_CS_REG);
if (plx_status & ICS_DMA1_A) { /* XXX *//* dma chan 1 interrupt */ if (plx_status & ICS_DMA1_A) {
/* XXX */ /* dma chan 1 interrupt */
writeb((dma1_status & PLX_DMA_EN_BIT) | PLX_CLEAR_DMA_INTR_BIT, writeb((dma1_status & PLX_DMA_EN_BIT) | PLX_CLEAR_DMA_INTR_BIT,
devpriv->plx9080_mmio + PLX_DMA1_CS_REG); devpriv->plx9080_mmio + PLX_DMA1_CS_REG);
} }
spin_unlock_irqrestore(&dev->spinlock, flags); spin_unlock_irqrestore(&dev->spinlock, flags);
/* clear possible plx9080 interrupt sources */ /* clear possible plx9080 interrupt sources */
if (plx_status & ICS_LDIA) { /* clear local doorbell interrupt */ if (plx_status & ICS_LDIA) {
/* clear local doorbell interrupt */
plx_bits = readl(devpriv->plx9080_mmio + PLX_DBR_OUT_REG); plx_bits = readl(devpriv->plx9080_mmio + PLX_DBR_OUT_REG);
writel(plx_bits, devpriv->plx9080_mmio + PLX_DBR_OUT_REG); writel(plx_bits, devpriv->plx9080_mmio + PLX_DBR_OUT_REG);
} }
...@@ -576,11 +581,15 @@ static void gsc_hpdi_init_plx9080(struct comedi_device *dev) ...@@ -576,11 +581,15 @@ static void gsc_hpdi_init_plx9080(struct comedi_device *dev)
bits |= PLX_DMA_EN_READYIN_BIT; bits |= PLX_DMA_EN_READYIN_BIT;
/* enable dma chaining */ /* enable dma chaining */
bits |= PLX_EN_CHAIN_BIT; bits |= PLX_EN_CHAIN_BIT;
/* enable interrupt on dma done /*
* (probably don't need this, since chain never finishes) */ * enable interrupt on dma done
* (probably don't need this, since chain never finishes)
*/
bits |= PLX_EN_DMA_DONE_INTR_BIT; bits |= PLX_EN_DMA_DONE_INTR_BIT;
/* don't increment local address during transfers /*
* (we are transferring from a fixed fifo register) */ * don't increment local address during transfers
* (we are transferring from a fixed fifo register)
*/
bits |= PLX_LOCAL_ADDR_CONST_BIT; bits |= PLX_LOCAL_ADDR_CONST_BIT;
/* route dma interrupt to pci bus */ /* route dma interrupt to pci bus */
bits |= PLX_DMA_INTR_PCI_BIT; bits |= PLX_DMA_INTR_PCI_BIT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment