if(!link)return -EIO;
dev->iobase = link->io.BasePort1;
- printk("I/O base=0x%04x ",dev->iobase);
+ printk("I/O base=0x%04lx ",dev->iobase);
printk("fingerprint:\n");
for(i=0;i<48;i+=2){
comedi_spin_lock_irqsave( &dev->spinlock, flags );
// bit should be set for 6025, although docs say boards with <= 16 chans should be cleared XXX
- if( 1 )
+ if(1)
priv(dev)->adc_control1_bits |= ADC_QUEUE_CONFIG_BIT;
writew( priv(dev)->adc_control1_bits, priv(dev)->main_iobase + ADC_CONTROL1_REG );
priv(dev)->hw_config_bits &= ~EXT_QUEUE_BIT;
writew(priv(dev)->hw_config_bits, priv(dev)->main_iobase + HW_CONFIG_REG);
- // load internal queue
- bits = 0;
- // set gain
- bits |= ai_range_bits_6xxx( dev, CR_RANGE(insn->chanspec) );
- // set single-ended / differential
- bits |= se_diff_bit_6xxx(dev, aref == AREF_DIFF);
- if( aref == AREF_COMMON)
- bits |= ADC_COMMON_BIT;
// ALT_SOURCE is internal calibration reference
if(insn->chanspec & CR_ALT_SOURCE)
{
// make sure internal calibration source is turned off
writew(0, priv(dev)->main_iobase + CALIBRATION_REG);
}
+ // load internal queue
+ bits = 0;
+ // set gain
+ bits |= ai_range_bits_6xxx( dev, CR_RANGE(insn->chanspec) );
+ // set single-ended / differential
+ bits |= se_diff_bit_6xxx(dev, aref == AREF_DIFF);
+ if(aref == AREF_COMMON)
+ bits |= ADC_COMMON_BIT;
bits |= adc_chan_bits( channel );
// set stop channel
writew( adc_chan_bits( channel ), priv(dev)->main_iobase + ADC_QUEUE_HIGH_REG );
async->events |= COMEDI_CB_EOA;
if(ao_stopped_by_error(dev, cmd))
async->events |= COMEDI_CB_ERROR;
-printk("plx dma0 desc reg 0x%x\n", readl(priv(dev)->plx9080_iobase + PLX_DMA0_DESCRIPTOR_REG));
-printk("plx dma0 address reg 0x%x\n", readl(priv(dev)->plx9080_iobase + PLX_DMA0_PCI_ADDRESS_REG));
+ DEBUG_PRINT("plx dma0 desc reg 0x%x\n", readl(priv(dev)->plx9080_iobase + PLX_DMA0_DESCRIPTOR_REG));
+ DEBUG_PRINT("plx dma0 address reg 0x%x\n", readl(priv(dev)->plx9080_iobase + PLX_DMA0_PCI_ADDRESS_REG));
}
cfc_handle_events( dev, s );
}
if ( pcidev->vendor == PCI_VENDOR_ID_CONTEC &&
pcidev->device == PCI_DEVICE_ID_PIO1616L ) {
dev->iobase = pci_resource_start ( pcidev, 0 );
- printk ( " base addr %x ", dev->iobase );
+ printk ( " base addr %lx ", dev->iobase );
dev->board_ptr = contec_boards + 0;
if(data[0]){
s->state &= ~data[0];
s->state |= data[0]&data[1];
- printk ( " out: %d on %x\n", s->state, dev->iobase + thisboard->out_offs );
+ rt_printk ( " out: %d on %lx\n", s->state, dev->iobase + thisboard->out_offs );
outw(s->state, dev->iobase + thisboard->out_offs );
}
return 2;
comedi_insn *insn,lsampl_t *data)
{
- printk ( "contec_di_insn_bits called\n" );
- printk ( " data: %d %d\n", data[0], data[1] );
+ rt_printk ( "contec_di_insn_bits called\n" );
+ rt_printk ( " data: %d %d\n", data[0], data[1] );
if(insn->n!=2)return -EINVAL;
int iobase;
iobase=it->options[0];
- printk("comedi%d: dt2814: 0x%04x ",dev->minor,dev->iobase);
+ printk("comedi%d: dt2814: 0x%04lx ",dev->minor,dev->iobase);
if(check_region(iobase,DT2814_SIZE)<0){
printk("I/O port conflict\n");
return -EIO;
setup_channel_list(dev, s, &insn->chanspec, 1);
#ifdef ICP_MULTI_EXTDEBUG
- printk("icp_multi A ST=%4x IO=%x\n",readw(dev->iobase+ICP_MULTI_ADC_CSR), dev->iobase+ICP_MULTI_ADC_CSR);
+ printk("icp_multi A ST=%4x IO=%lx\n",readw(dev->iobase+ICP_MULTI_ADC_CSR), dev->iobase+ICP_MULTI_ADC_CSR);
#endif
for (n=0; n<insn->n; n++) {
/* Check PCI-20001 C-2A Carrier Board ID */
if ((readb(dev->iobase) & PCI20000_ID) != PCI20000_ID) {
printk("comedi%d: ii_pci20kc", dev->minor);
- printk(" PCI-20001 C-2A Carrier Board at base=0x%05x not found !\n", dev->iobase);
+ printk(" PCI-20001 C-2A Carrier Board at base=0x%05lx not found !\n", dev->iobase);
return -EINVAL;
}
printk("comedi%d:\n", dev->minor);
- printk("ii_pci20kc: PCI-20001 C-2A at base=0x%05x\n", dev->iobase);
+ printk("ii_pci20kc: PCI-20001 C-2A at base=0x%05lx\n", dev->iobase);
for (i = 0; i < PCI20000_MODULES; i++) {
s = dev->subdevices + i;
dev->irq=link->irq.AssignedIRQ;
- printk("comedi%d: %s: DAQCard: io 0x%04x, irq %d, ",
+ printk("comedi%d: %s: DAQCard: io 0x%04lx, irq %d, ",
dev->minor,dev->driver->driver_name,dev->iobase,
dev->irq);
goto conv_finish;
comedi_udelay(1);
}
- rt_printk("comedi%d: pcl812: (%s at 0x%x) A/D insn read timeout\n", dev->minor, dev->board_name, dev->iobase);
+ rt_printk("comedi%d: pcl812: (%s at 0x%lx) A/D insn read timeout\n", dev->minor, dev->board_name, dev->iobase);
outb(devpriv->mode_reg_int|0, dev->iobase + PCL812_MODE);
return -ETIME;
goto conv_finish;
comedi_udelay(1);
}
- rt_printk("comedi%d: pcl812: (%s at 0x%x) A/D insn read timeout\n", dev->minor, dev->board_name, dev->iobase);
+ rt_printk("comedi%d: pcl812: (%s at 0x%lx) A/D insn read timeout\n", dev->minor, dev->board_name, dev->iobase);
outb(0, dev->iobase + PCL812_MODE);
return -ETIME;
}
if (err) {
- rt_printk("comedi%d: pcl812: (%s at 0x%x) A/D cmd IRQ without DRDY!\n", dev->minor, dev->board_name, dev->iobase);
+ rt_printk("comedi%d: pcl812: (%s at 0x%lx) A/D cmd IRQ without DRDY!\n", dev->minor, dev->board_name, dev->iobase);
pcl812_ai_cancel(dev,s);
s->async->events |= COMEDI_CB_EOA|COMEDI_CB_ERROR;
comedi_event(dev,s,s->async->events);
if((ret=alloc_subdevices(dev,4))<0)
return ret;
- printk("comedi%d: attaching daqp%d (io 0x%04x)\n",
+ printk("comedi%d: attaching daqp%d (io 0x%04lx)\n",
dev->minor, it->options[0], dev->iobase);
s=dev->subdevices+0;
int options[COMEDI_NDEVCONFOPTS];
/* dumb */
- int iobase;
+ unsigned long iobase;
int irq;
comedi_subdevice *read_subdev;