From: Frank Mori Hess Date: Mon, 19 Apr 2004 22:09:57 +0000 (+0000) Subject: change dev->iobase to unsigned long for 64 bit cpus X-Git-Tag: r0_7_69~60 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bcbff0e95e81bb6a5591d0363292e7abb891bb6d;p=comedi.git change dev->iobase to unsigned long for 64 bit cpus --- diff --git a/comedi/drivers/cb_das16_cs.c b/comedi/drivers/cb_das16_cs.c index deb61284..504d16ab 100644 --- a/comedi/drivers/cb_das16_cs.c +++ b/comedi/drivers/cb_das16_cs.c @@ -174,7 +174,7 @@ static int das16cs_attach(comedi_device *dev,comedi_devconfig *it) 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){ diff --git a/comedi/drivers/cb_pcidas64.c b/comedi/drivers/cb_pcidas64.c index b1fc4160..2c12f020 100644 --- a/comedi/drivers/cb_pcidas64.c +++ b/comedi/drivers/cb_pcidas64.c @@ -1485,7 +1485,7 @@ static void init_stc_registers( comedi_device *dev ) 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 ); @@ -1817,14 +1817,6 @@ static int ai_rinsn(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsa 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) { @@ -1843,6 +1835,14 @@ static int ai_rinsn(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsa // 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 ); @@ -2986,8 +2986,8 @@ static void handle_ao_interrupt(comedi_device *dev, unsigned short status, 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 ); } diff --git a/comedi/drivers/contec_pci_dio.c b/comedi/drivers/contec_pci_dio.c index 4e6c8bc0..ab631b87 100644 --- a/comedi/drivers/contec_pci_dio.c +++ b/comedi/drivers/contec_pci_dio.c @@ -112,7 +112,7 @@ static int contec_attach(comedi_device *dev,comedi_devconfig *it) 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; @@ -175,7 +175,7 @@ static int contec_do_insn_bits(comedi_device *dev,comedi_subdevice *s, 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; @@ -185,8 +185,8 @@ static int contec_di_insn_bits(comedi_device *dev,comedi_subdevice *s, 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; diff --git a/comedi/drivers/dt2814.c b/comedi/drivers/dt2814.c index 30eb151b..0b16d549 100644 --- a/comedi/drivers/dt2814.c +++ b/comedi/drivers/dt2814.c @@ -240,7 +240,7 @@ static int dt2814_attach(comedi_device *dev,comedi_devconfig *it) 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; diff --git a/comedi/drivers/icp_multi.c b/comedi/drivers/icp_multi.c index d6d52f09..8dc69eeb 100644 --- a/comedi/drivers/icp_multi.c +++ b/comedi/drivers/icp_multi.c @@ -268,7 +268,7 @@ static int icp_multi_insn_read_ai(comedi_device * dev, comedi_subdevice * s, com 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; nn; n++) { diff --git a/comedi/drivers/ii_pci20kc.c b/comedi/drivers/ii_pci20kc.c index 63adcbe9..2c01075b 100644 --- a/comedi/drivers/ii_pci20kc.c +++ b/comedi/drivers/ii_pci20kc.c @@ -220,11 +220,11 @@ static int pci20xxx_attach(comedi_device * dev, comedi_devconfig * it) /* 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; diff --git a/comedi/drivers/ni_mio_cs.c b/comedi/drivers/ni_mio_cs.c index 06c0ac06..302fcee0 100644 --- a/comedi/drivers/ni_mio_cs.c +++ b/comedi/drivers/ni_mio_cs.c @@ -521,7 +521,7 @@ static int mio_cs_attach(comedi_device *dev,comedi_devconfig *it) 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); diff --git a/comedi/drivers/pcl812.c b/comedi/drivers/pcl812.c index 11df8c7d..88bf4525 100644 --- a/comedi/drivers/pcl812.c +++ b/comedi/drivers/pcl812.c @@ -438,7 +438,7 @@ static int pcl812_ai_insn_read(comedi_device *dev,comedi_subdevice *s, 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; @@ -469,7 +469,7 @@ static int acl8216_ai_insn_read(comedi_device *dev,comedi_subdevice *s, 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; @@ -877,7 +877,7 @@ static irqreturn_t interrupt_pcl812_ai_int(int irq, void *d, struct pt_regs *reg } 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); diff --git a/comedi/drivers/quatech_daqp_cs.c b/comedi/drivers/quatech_daqp_cs.c index 7c3229bb..05e4f554 100644 --- a/comedi/drivers/quatech_daqp_cs.c +++ b/comedi/drivers/quatech_daqp_cs.c @@ -954,7 +954,7 @@ static int daqp_attach(comedi_device *dev, comedi_devconfig *it) 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; diff --git a/include/linux/comedidev.h b/include/linux/comedidev.h index d4c2a0de..93d3909f 100644 --- a/include/linux/comedidev.h +++ b/include/linux/comedidev.h @@ -213,7 +213,7 @@ struct comedi_device_struct{ int options[COMEDI_NDEVCONFOPTS]; /* dumb */ - int iobase; + unsigned long iobase; int irq; comedi_subdevice *read_subdev;