Lines Matching refs:iobase
304 static unsigned short io_read_num_rec_bytes(unsigned int iobase, in io_read_num_rec_bytes() argument
312 tmp = inb(REG_NUM_BYTES(iobase)) | in io_read_num_rec_bytes()
313 (inb(REG_FLAGS0(iobase)) & 4 ? 0x100 : 0); in io_read_num_rec_bytes()
423 unsigned int iobase = dev->p_dev->resource[0]->start; in set_cardparameter() local
429 xoutb(dev->flags1, REG_FLAGS1(iobase)); in set_cardparameter()
433 xoutb((unsigned char)((dev->baudv - 1) & 0xFF), REG_BAUDRATE(iobase)); in set_cardparameter()
444 xoutb(stopbits, REG_STOPBITS(iobase)); in set_cardparameter()
456 unsigned int iobase = dev->p_dev->resource[0]->start; in set_protocol() local
492 xoutb(0x80, REG_FLAGS0(iobase)); in set_protocol()
499 xoutb(dev->flags1, REG_FLAGS1(iobase)); in set_protocol()
507 xoutb(i, REG_BUF_ADDR(iobase)); in set_protocol()
508 xoutb(dev->pts[i], REG_BUF_DATA(iobase)); /* buf data */ in set_protocol()
519 xoutb(0x04, REG_NUM_SEND(iobase));
522 xoutb(0x50, REG_FLAGS0(iobase));
529 if (inb(REG_FLAGS0(iobase)) & 0x08) {
544 io_read_num_rec_bytes(iobase, &num_bytes_read);
567 xoutb(0x80, REG_FLAGS0(iobase));
572 xoutb(i, REG_BUF_ADDR(iobase));
573 pts_reply[i] = inb(REG_BUF_DATA(iobase));
585 xoutb(0x20, REG_FLAGS1(iobase));
608 static int io_detect_cm4000(unsigned int iobase, struct cm4000_dev *dev) in io_detect_cm4000() argument
612 if (inb(REG_FLAGS0(iobase)) & 8) { in io_detect_cm4000()
618 xoutb(dev->flags1 | 0x40, REG_FLAGS1(iobase)); in io_detect_cm4000()
619 if ((inb(REG_FLAGS0(iobase)) & 8) == 0) { in io_detect_cm4000()
625 xoutb(dev->flags1, REG_FLAGS1(iobase)); in io_detect_cm4000()
669 unsigned int iobase = dev->p_dev->resource[0]->start; in monitor_card() local
698 dev->flags0 = xinb(REG_FLAGS0(iobase)); in monitor_card()
741 flags0 = inb(REG_FLAGS0(iobase)); in monitor_card()
748 xoutb(0x80, REG_FLAGS0(iobase)); in monitor_card()
764 xoutb(0x80, REG_FLAGS0(iobase)); in monitor_card()
767 xoutb(0x02, REG_STOPBITS(iobase)); /* stopbits=2 */ in monitor_card()
768 xoutb(0x73, REG_BAUDRATE(iobase)); /* baud value */ in monitor_card()
769 xoutb(0x21, REG_FLAGS1(iobase)); /* T_Active=1, baud in monitor_card()
772 xoutb(dev->flags0 & 2 ? 0x46 : 0x44, REG_FLAGS0(iobase)); in monitor_card()
779 io_read_num_rec_bytes(iobase, &dev->atr_len); in monitor_card()
789 if (dev->atr_len == io_read_num_rec_bytes(iobase, &s)) { in monitor_card()
803 xoutb(0x80, REG_FLAGS0(iobase)); /* reset SM */ in monitor_card()
805 xoutb(i, REG_BUF_ADDR(iobase)); in monitor_card()
806 dev->atr[i] = inb(REG_BUF_DATA(iobase)); in monitor_card()
811 xoutb(dev->flags1, REG_FLAGS1(iobase)); in monitor_card()
929 unsigned int iobase = dev->p_dev->resource[0]->start; in cmm_read() local
978 dev->flags0 = inb(REG_FLAGS0(iobase)); in cmm_read()
998 xoutb(k++, REG_BUF_ADDR(iobase)); in cmm_read()
999 dev->rbuf[i] = xinb(REG_BUF_DATA(iobase)); in cmm_read()
1005 xoutb(dev->flags1, REG_FLAGS1(iobase)); in cmm_read()
1007 xoutb(k++, REG_BUF_ADDR(iobase)); in cmm_read()
1008 dev->rbuf[i] = xinb(REG_BUF_DATA(iobase)); in cmm_read()
1025 xoutb(dev->flags1, REG_FLAGS1(iobase)); in cmm_read()
1027 xoutb(0, REG_FLAGS1(iobase)); /* clear detectCMM */ in cmm_read()
1029 if (!io_detect_cm4000(iobase, dev)) { in cmm_read()
1053 unsigned int iobase = dev->p_dev->resource[0]->start; in cmm_write() local
1126 dev->flags0 = inb(REG_FLAGS0(iobase)); in cmm_write()
1140 xoutb(0x80, REG_FLAGS0(iobase)); /* reset SM */ in cmm_write()
1142 if (!io_detect_cm4000(iobase, dev)) { in cmm_write()
1153 tmp = inb(REG_FLAGS1(iobase)); in cmm_write()
1160 xoutb(dev->flags1, REG_FLAGS1(iobase)); in cmm_write()
1174 xoutb(dev->flags1, REG_FLAGS1(iobase)); in cmm_write()
1180 xoutb(i, REG_BUF_ADDR(iobase)); in cmm_write()
1182 REG_BUF_DATA(iobase)); in cmm_write()
1184 xoutb(i, REG_BUF_ADDR(iobase)); in cmm_write()
1185 xoutb(dev->sbuf[i], REG_BUF_DATA(iobase)); in cmm_write()
1194 xoutb(i, REG_BUF_ADDR(iobase)); in cmm_write()
1196 xoutb(0xff, REG_BUF_DATA(iobase)); in cmm_write()
1198 xoutb(0x00, REG_BUF_DATA(iobase)); in cmm_write()
1220 xoutb(invert_revert(dev->sbuf[1]), REG_NUM_BYTES(iobase)); in cmm_write()
1223 xoutb(dev->sbuf[1], REG_NUM_BYTES(iobase)); in cmm_write()
1228 xoutb((unsigned char)(nsend & 0xff), REG_NUM_SEND(iobase)); in cmm_write()
1239 REG_FLAGS0(iobase)); in cmm_write()
1245 if (inb(REG_FLAGS0(iobase)) & 0x08) in cmm_write()
1262 io_read_num_rec_bytes(iobase, &s); in cmm_write()
1264 infolen = inb(REG_FLAGS1(iobase)); in cmm_write()
1279 io_read_num_rec_bytes(iobase, &dev->rlen); in cmm_write()
1287 io_read_num_rec_bytes(iobase, &s); in cmm_write()
1301 if ((inb(REG_BUF_ADDR(iobase)) & 0x80)) { in cmm_write()
1309 dev->procbyte = inb(REG_FLAGS1(iobase)); in cmm_write()
1314 if (inb(REG_FLAGS0(iobase)) & 0x08) { in cmm_write()
1320 infolen = inb(REG_FLAGS1(iobase)); in cmm_write()
1330 if (inb(REG_FLAGS0(iobase)) & 0x08) in cmm_write()
1340 dev->procbyte = inb(REG_FLAGS1(iobase)); in cmm_write()
1344 io_read_num_rec_bytes(iobase, &dev->rlen); in cmm_write()
1356 xoutb(0x80, REG_FLAGS0(iobase)); /* reset SM */ in cmm_write()
1361 xoutb(dev->flags1, REG_FLAGS1(iobase)); in cmm_write()
1406 unsigned int iobase = dev->p_dev->resource[0]->start; in cmm_ioctl() local
1551 xoutb(0x42, REG_FLAGS0(iobase)); in cmm_ioctl()