change dev->iobase to unsigned long for 64 bit cpus
authorFrank Mori Hess <fmhess@speakeasy.net>
Mon, 19 Apr 2004 22:09:57 +0000 (22:09 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Mon, 19 Apr 2004 22:09:57 +0000 (22:09 +0000)
comedi/drivers/cb_das16_cs.c
comedi/drivers/cb_pcidas64.c
comedi/drivers/contec_pci_dio.c
comedi/drivers/dt2814.c
comedi/drivers/icp_multi.c
comedi/drivers/ii_pci20kc.c
comedi/drivers/ni_mio_cs.c
comedi/drivers/pcl812.c
comedi/drivers/quatech_daqp_cs.c
include/linux/comedidev.h

index deb61284fff7e81da1d8f55b66ddfb6fdca28af4..504d16ab468fab57eb4f44316f5f0882cfff04e4 100644 (file)
@@ -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){
index b1fc4160959efabfe74f3c0dd082cb699baca9b5..2c12f020cd3b42c017eeb7eb9333196c77ce62c2 100644 (file)
@@ -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 );
 }
index 4e6c8bc0a76ca09c55b6e236b8e7e785e67b7e8e..ab631b8790ab9e04d865123dbf5dd06e2ffe1e3f 100644 (file)
@@ -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;
 
index 30eb151bf0199aa8068c6aec56f67bc6653246ce..0b16d54956143331c944f6b4cf36b23e462535d7 100644 (file)
@@ -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;
index d6d52f09b3c9b8759b7a12ff7df340f1ae25779c..8dc69eebaf2567ace1e56c51d87846feaf75d43e 100644 (file)
@@ -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; n<insn->n; n++) {
index 63adcbe9aca3efc573e011501f7242afc406f65c..2c01075b1483bcc21b98607eac9afb5d2996041e 100644 (file)
@@ -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;
index 06c0ac062329b02abafe161ce22448e92be436ab..302fcee095eff819376b37bfa1e4e53773728a4f 100644 (file)
@@ -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);
 
index 11df8c7daf3de690beab716a4ae29b101ffdbdb2..88bf4525cbdd9faf64eccc21343018f2f1f9647b 100644 (file)
@@ -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);
index 7c3229bbe35cdfb26f94eaf1f366bebb0c2a195e..05e4f5541129ead1927d3342782925dec28785f3 100644 (file)
@@ -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;
index d4c2a0deb2d5b8f3e8a9fe4e6c88345829220960..93d3909f4418e7067e6db61fead693602abc5d2f 100644 (file)
@@ -213,7 +213,7 @@ struct comedi_device_struct{
        int options[COMEDI_NDEVCONFOPTS];
 
        /* dumb */
-       int iobase;
+       unsigned long iobase;
        int irq;
 
        comedi_subdevice *read_subdev;