Lines Matching refs:base

106 	seq_printf(m, "Base IO : %#.4x\n", (u32) shost->base);  in eata_pio_show_info()
164 unsigned long base; in eata_pio_int_handler() local
175 if (inb(sh->base + HA_RSTATUS) & HA_SBUSY) in eata_pio_int_handler()
185 base = cmd->device->host->base; in eata_pio_int_handler()
188 stat = inb(base + HA_RSTATUS); in eata_pio_int_handler()
200 insw(base + HA_RDATA, cmd->SCp.ptr, x); in eata_pio_int_handler()
204 zwickel = inw(base + HA_RDATA); in eata_pio_int_handler()
212 zwickel = inw(base + HA_RDATA); in eata_pio_int_handler()
223 outw(zwickel, base + HA_RDATA); in eata_pio_int_handler()
228 outsw(base + HA_RDATA, cmd->SCp.ptr, x); in eata_pio_int_handler()
239 outw(zwickel, base + HA_RDATA); in eata_pio_int_handler()
257 if (!(inb(base + HA_RSTATUS) & HA_SERROR)) { in eata_pio_int_handler()
267 eata_stat = inb(base + HA_RSTATUS); in eata_pio_int_handler()
284 static inline unsigned int eata_pio_send_command(unsigned long base, unsigned char command) in eata_pio_send_command() argument
288 while (inb(base + HA_RSTATUS) & HA_SBUSY) in eata_pio_send_command()
296 outb(HA_CTRL_8HEADS, base + HA_CTRLREG); in eata_pio_send_command()
298 outb(command, base + HA_WCOMMAND); in eata_pio_send_command()
306 unsigned long base; in eata_pio_queue_lck() local
316 base = sh->base; in eata_pio_queue_lck()
380 if (eata_pio_send_command(base, EATA_CMD_PIO_SEND_CP)) { in eata_pio_queue_lck()
390 while (!(inb(base + HA_RSTATUS) & HA_SDRQ)) in eata_pio_queue_lck()
392 outsw(base + HA_RDATA, cp, hd->cplen); in eata_pio_queue_lck()
393 outb(EATA_CMD_PIO_TRUNC, base + HA_WCOMMAND); in eata_pio_queue_lck()
395 outw(0, base + HA_RDATA); in eata_pio_queue_lck()
399 "slot %d irq %d\n", sh->base, cmd, y, sh->irq)); in eata_pio_queue_lck()
413 while (inb(cmd->device->host->base + HA_RAUXSTAT) & HA_ABUSY) in DEF_SCSI_QCMD()
472 outb(EATA_CMD_RESET, cmd->device->host->base + HA_WCOMMAND); in eata_pio_host_reset()
512 static char *get_pio_board_data(unsigned long base, unsigned int irq, unsigned int id, unsigned lon… in get_pio_board_data() argument
537 if (eata_pio_send_command(base, EATA_CMD_PIO_SEND_CP)) in get_pio_board_data()
540 while (!(inb(base + HA_RSTATUS) & HA_SDRQ)) in get_pio_board_data()
543 outsw(base + HA_RDATA, &cp, cplen); in get_pio_board_data()
544 outb(EATA_CMD_PIO_TRUNC, base + HA_WCOMMAND); in get_pio_board_data()
546 outw(0, base + HA_RDATA); in get_pio_board_data()
548 while (inb(base + HA_RSTATUS) & HA_SBUSY) in get_pio_board_data()
551 if (inb(base + HA_RSTATUS) & HA_SERROR) in get_pio_board_data()
553 else if (!(inb(base + HA_RSTATUS) & HA_SDRQ)) in get_pio_board_data()
556 insw(base + HA_RDATA, &buff, 127); in get_pio_board_data()
557 while (inb(base + HA_RSTATUS) & HA_SDRQ) in get_pio_board_data()
558 inw(base + HA_RDATA); in get_pio_board_data()
563 static int get_pio_conf_PIO(unsigned long base, struct get_conf *buf) in get_pio_conf_PIO() argument
569 if (!request_region(base, 9, "eata_pio")) in get_pio_conf_PIO()
574 while (inb(base + HA_RSTATUS) & HA_SBUSY) in get_pio_conf_PIO()
578 DBG(DBG_PIO && DBG_PROBE, printk(KERN_DEBUG "Issuing PIO READ CONFIG to HBA at %#lx\n", base)); in get_pio_conf_PIO()
579 eata_pio_send_command(base, EATA_CMD_PIO_READ_CONFIG); in get_pio_conf_PIO()
583 while (!(inb(base + HA_RSTATUS) & HA_SDRQ)) in get_pio_conf_PIO()
588 *p = inw(base + HA_RDATA); in get_pio_conf_PIO()
590 if (inb(base + HA_RSTATUS) & HA_SERROR) { in get_pio_conf_PIO()
592 "transfer for HBA at %lx\n", base)); in get_pio_conf_PIO()
601 base, (unsigned int) (buf->version))); in get_pio_conf_PIO()
603 while (inb(base + HA_RSTATUS) & HA_SDRQ) in get_pio_conf_PIO()
604 inw(base + HA_RDATA); in get_pio_conf_PIO()
608 if (base == ISAbases[z]) { in get_pio_conf_PIO()
617 release_region(base, 9); in get_pio_conf_PIO()
629 static unsigned int print_selftest(unsigned int base) in print_selftest() argument
637 while (inb(base + HA_RSTATUS) & HA_SBUSY); in print_selftest()
638 outb(EATA_CMD_PIO_SETUPTEST, base + HA_WCOMMAND); in print_selftest()
640 while (inb(base + HA_RSTATUS) & HA_SBUSY) in print_selftest()
642 if (inb(base + HA_RSTATUS) & HA_SDRQ) { in print_selftest()
643 insw(base + HA_RDATA, &buffer, 256); in print_selftest()
651 } while (inb(base + HA_RSTATUS) & (HA_SBUSY | HA_SDRQ)); in print_selftest()
653 return (!(inb(base + HA_RSTATUS) & HA_SERROR)); in print_selftest()
656 static int register_pio_HBA(long base, struct get_conf *gc, struct pci_dev *pdev) in register_pio_HBA() argument
668 printk("HBA at %#.4lx supports DMA. Please use EATA-DMA driver.\n", base); in register_pio_HBA()
673 …if ((buff = get_pio_board_data(base, gc->IRQ, gc->scsi_id[3], cplen = (cpu_to_be32(gc->cplen) + 1)… in register_pio_HBA()
674 printk("HBA at %#lx didn't react on INQUIRY. Sorry.\n", base); in register_pio_HBA()
678 if (!print_selftest(base) && !ALLOW_DMA_BOARDS) { in register_pio_HBA()
679 printk("HBA at %#lx failed while performing self test & setup.\n", base); in register_pio_HBA()
757 sh->unique_id = base; in register_pio_HBA()
758 sh->base = base; in register_pio_HBA()
759 sh->io_port = base; in register_pio_HBA()
810 u32 base; in find_pio_EISA() local
820 base = 0x1c88 + (i * 0x1000); in find_pio_EISA()
822 pal1 = inb((u16) base - 8); in find_pio_EISA()
823 pal2 = inb((u16) base - 7); in find_pio_EISA()
824 pal3 = inb((u16) base - 6); in find_pio_EISA()
829 if (get_pio_conf_PIO(base, buf)) { in find_pio_EISA()
832 if (!register_pio_HBA(base, buf, NULL)) in find_pio_EISA()
833 release_region(base, 9); in find_pio_EISA()
836 release_region(base, 9); in find_pio_EISA()
855 unsigned long base, x; in find_pio_PCI()
862 base = pci_resource_flags(dev, 0); in find_pio_PCI()
863 if (base & IORESOURCE_MEM) { in find_pio_PCI()
867 base = pci_resource_start(dev, 0); in find_pio_PCI()
869 if ((inb(base) == 0x12) && (inb(base + 1) == 0x14)) in find_pio_PCI()
871 base += 0x10; /* Now, THIS is the real address */ in find_pio_PCI()
872 if (base != 0x1f8) { in find_pio_PCI()
874 if (get_pio_conf_PIO(base, buf)) { in find_pio_PCI()
876 release_region(base, 9); in find_pio_PCI()
885 if (!register_pio_HBA(base, buf, dev)) { in find_pio_PCI()
886 release_region(base, 9); in find_pio_PCI()
890 if (base < 0x1000) { in find_pio_PCI()
892 if (ISAbases[x] == base) { in find_pio_PCI()
897 } else if ((base & 0x0fff) == 0x0c88) { in find_pio_PCI()
898 x = (base >> 12) & 0x0f; in find_pio_PCI()
903 else if (check_blink_state(base)) { in find_pio_PCI()
940 HBA_ptr->base, HBA_ptr->irq, SD(HBA_ptr)->channel, HBA_ptr->this_id, in eata_pio_detect()