for( i = 0; i < NUM_DMA_DESCRIPTORS &&
buffer_index < NUM_DMA_BUFFERS; i++ )
{
- priv(dev)->dma_desc[ i ].pci_start_addr = __cpu_to_le32(priv(dev)->dio_buffer_phys_addr[ buffer_index ] +
+ priv(dev)->dma_desc[ i ].pci_start_addr = cpu_to_le32(priv(dev)->dio_buffer_phys_addr[ buffer_index ] +
buffer_offset);
- priv(dev)->dma_desc[ i ].local_start_addr = __cpu_to_le32(FIFO_REG);
- priv(dev)->dma_desc[ i ].transfer_size = __cpu_to_le32(transfer_size);
- priv(dev)->dma_desc[ i ].next = __cpu_to_le32(( priv(dev)->dma_desc_phys_addr +
+ priv(dev)->dma_desc[ i ].local_start_addr = cpu_to_le32(FIFO_REG);
+ priv(dev)->dma_desc[ i ].transfer_size = cpu_to_le32(transfer_size);
+ priv(dev)->dma_desc[ i ].next = cpu_to_le32(( priv(dev)->dma_desc_phys_addr +
( i + 1 ) * sizeof( priv(dev)->dma_desc[ 0 ] ) ) | next_bits);
priv(dev)->desc_dio_buffer[ i ] = priv(dev)->dio_buffer[ buffer_index ] +
priv(dev)->num_dma_descriptors = i;
// fix last descriptor to point back to first
priv(dev)->dma_desc[ i - 1 ].next =
- __cpu_to_le32(priv(dev)->dma_desc_phys_addr | next_bits);
+ cpu_to_le32(priv(dev)->dma_desc_phys_addr | next_bits);
DEBUG_PRINT(" desc %i next fixup 0x%lx\n", i - 1,
(unsigned long) priv(dev)->dma_desc[ i - 1 ].next );
// loop until we have read all the full buffers
j = 0;
for(next_transfer_addr = readl(pci_addr_reg);
- (next_transfer_addr < __le32_to_cpu(priv(dev)->dma_desc[ priv(dev)->dma_desc_index ].pci_start_addr) ||
- next_transfer_addr >= __le32_to_cpu(priv(dev)->dma_desc[ priv(dev)->dma_desc_index ].pci_start_addr) +
+ (next_transfer_addr < le32_to_cpu(priv(dev)->dma_desc[ priv(dev)->dma_desc_index ].pci_start_addr) ||
+ next_transfer_addr >= le32_to_cpu(priv(dev)->dma_desc[ priv(dev)->dma_desc_index ].pci_start_addr) +
priv(dev)->block_size ) &&
j < priv(dev)->num_dma_descriptors;
j++ )
for(i = 0; i < length; i++)
{
#ifdef PCIDMA
- array[i] = __le16_to_cpu(array[i]);
+ array[i] = le16_to_cpu(array[i]);
#endif
array[i] += devpriv->ai_offset[ chan_index ];
chan_index++;
if(boardtype.ao_unipolar == 0 || (range & 1) == 0 )
array[i] -= offset;
#ifdef PCIDMA
- array[i] = __cpu_to_le16( array[i] );
+ array[i] = cpu_to_le16( array[i] );
#endif
chan_index++;
chan_index %= async->cmd.chanlist_len;