************************************************************************
+Testing and debugging help provided by Daniel Koch.
+
Options:
[0] - base io address
[1] - irq (optional)
/* clear flip-flop to make sure 2-byte registers for
* count and address get set correctly */
clear_dma_ff(devpriv->dma_chan);
- set_dma_addr(devpriv->dma_chan, (unsigned int) devpriv->dma_buffer);
+ set_dma_addr(devpriv->dma_chan, virt_to_bus(devpriv->dma_buffer));
// set appropriate size of transfer
devpriv->dma_transfer_size = das16_suggest_transfer_size(*cmd);
if(devpriv->adc_count * sample_size > devpriv->dma_transfer_size)
if(devpriv->adc_count > 0) devpriv->adc_count--;
}
// re-enable dma
- set_dma_addr(devpriv->dma_chan, (unsigned int) devpriv->dma_buffer);
+ set_dma_addr(devpriv->dma_chan, virt_to_bus(devpriv->dma_buffer));
set_dma_count(devpriv->dma_chan, leftover * sample_size);
enable_dma(devpriv->dma_chan);
release_dma_lock(flags);
// re-enable dma (single dma)
if((dual_dma == 0) && leftover)
{
- set_dma_addr(devpriv->dma_current, (unsigned int) devpriv->dma_current_buf);
+ set_dma_addr(devpriv->dma_current, virt_to_bus(devpriv->dma_current_buf));
set_dma_count(devpriv->dma_current, leftover * sizeof(short));
enable_dma(devpriv->dma_current);
release_dma_lock(flags);
{
if(leftover)
{
- set_dma_addr(devpriv->dma_current, (unsigned int) buffer);
+ set_dma_addr(devpriv->dma_current, virt_to_bus(buffer));
set_dma_count(devpriv->dma_current, leftover * sizeof(short));
enable_dma(devpriv->dma_current);
release_dma_lock(flags);
/* clear flip-flop to make sure 2-byte registers for
* count and address get set correctly */
clear_dma_ff(devpriv->dma0);
- set_dma_addr(devpriv->dma0, (unsigned int) devpriv->dma_buf0);
+ set_dma_addr(devpriv->dma0, virt_to_bus(devpriv->dma_buf0));
// set appropriate size of transfer
if(devpriv->count * sizeof(short) >= devpriv->dma_buf_size || devpriv->forever)
set_dma_count(devpriv->dma0, devpriv->dma_buf_size);
/* clear flip-flop to make sure 2-byte registers for
* count and address get set correctly */
clear_dma_ff(devpriv->dma1);
- set_dma_addr(devpriv->dma1, (unsigned int) devpriv->dma_buf1);
+ set_dma_addr(devpriv->dma1, virt_to_bus(devpriv->dma_buf1));
// set appropriate size of transfer
if(devpriv->count * sizeof(short) >= 2 * devpriv->dma_buf_size || devpriv->forever)
set_dma_count(devpriv->dma1, devpriv->dma_buf_size);
}
}
// re-enable dma
- set_dma_addr(devpriv->dma, (unsigned int) devpriv->dma_buffer);
+ set_dma_addr(devpriv->dma, virt_to_bus(devpriv->dma_buffer));
set_dma_count(devpriv->dma, leftover * sample_size);
enable_dma(devpriv->dma);
release_dma_lock(flags);
/* clear flip-flop to make sure 2-byte registers for
* count and address get set correctly */
clear_dma_ff(devpriv->dma);
- set_dma_addr(devpriv->dma, (unsigned int) devpriv->dma_buffer);
+ set_dma_addr(devpriv->dma, virt_to_bus(devpriv->dma_buffer));
// set size of transfer to fill in 1/3 second
devpriv->dma_transfer_size = sizeof(devpriv->dma_buffer[0]) * cmd->chanlist_len *
(1000000000.0 / 3.0 ) / cmd->scan_begin_arg;