Lines Matching refs:ide_bar

150 static QPCIDevice *get_pci_device(QPCIBar *bmdma_bar, QPCIBar *ide_bar)  in get_pci_device()  argument
171 *ide_bar = qpci_legacy_iomap(dev, IDE_BASE); in get_pci_device()
200 void(*post_exec)(QPCIDevice *dev, QPCIBar ide_bar, in send_dma_request() argument
204 QPCIBar bmdma_bar, ide_bar; in send_dma_request() local
211 dev = get_pci_device(&bmdma_bar, &ide_bar); in send_dma_request()
237 qpci_io_writeb(dev, ide_bar, reg_device, 0 | LBA); in send_dma_request()
252 qpci_io_writeb(dev, ide_bar, reg_feature, 0x01); in send_dma_request()
256 qpci_io_writeb(dev, ide_bar, reg_feature, 0x01); in send_dma_request()
258 qpci_io_writeb(dev, ide_bar, reg_nsectors, nb_sectors); in send_dma_request()
259 qpci_io_writeb(dev, ide_bar, reg_lba_low, sector & 0xff); in send_dma_request()
260 qpci_io_writeb(dev, ide_bar, reg_lba_middle, (sector >> 8) & 0xff); in send_dma_request()
261 qpci_io_writeb(dev, ide_bar, reg_lba_high, (sector >> 16) & 0xff); in send_dma_request()
264 qpci_io_writeb(dev, ide_bar, reg_command, cmd); in send_dma_request()
267 post_exec(dev, ide_bar, sector, nb_sectors); in send_dma_request()
286 assert_bit_set(qpci_io_readb(dev, ide_bar, reg_status), DRDY); in send_dma_request()
287 assert_bit_clear(qpci_io_readb(dev, ide_bar, reg_status), BSY | DRQ); in send_dma_request()
305 QPCIBar bmdma_bar, ide_bar; in test_bmdma_simple_rw() local
319 dev = get_pci_device(&bmdma_bar, &ide_bar); in test_bmdma_simple_rw()
331 assert_bit_clear(qpci_io_readb(dev, ide_bar, reg_status), DF | ERR); in test_bmdma_simple_rw()
340 assert_bit_clear(qpci_io_readb(dev, ide_bar, reg_status), DF | ERR); in test_bmdma_simple_rw()
347 assert_bit_clear(qpci_io_readb(dev, ide_bar, reg_status), DF | ERR); in test_bmdma_simple_rw()
357 assert_bit_clear(qpci_io_readb(dev, ide_bar, reg_status), DF | ERR); in test_bmdma_simple_rw()
371 QPCIBar bmdma_bar, ide_bar; in test_bmdma_trim() local
389 dev = get_pci_device(&bmdma_bar, &ide_bar); in test_bmdma_trim()
402 assert_bit_clear(qpci_io_readb(dev, ide_bar, reg_status), DF | ERR); in test_bmdma_trim()
413 assert_bit_set(qpci_io_readb(dev, ide_bar, reg_status), ERR); in test_bmdma_trim()
414 assert_bit_set(qpci_io_readb(dev, ide_bar, reg_error), ABRT); in test_bmdma_trim()
423 QPCIBar bmdma_bar, ide_bar; in test_bmdma_short_prdt() local
433 dev = get_pci_device(&bmdma_bar, &ide_bar); in test_bmdma_short_prdt()
439 assert_bit_clear(qpci_io_readb(dev, ide_bar, reg_status), DF | ERR); in test_bmdma_short_prdt()
445 assert_bit_clear(qpci_io_readb(dev, ide_bar, reg_status), DF | ERR); in test_bmdma_short_prdt()
452 QPCIBar bmdma_bar, ide_bar; in test_bmdma_one_sector_short_prdt() local
463 dev = get_pci_device(&bmdma_bar, &ide_bar); in test_bmdma_one_sector_short_prdt()
469 assert_bit_clear(qpci_io_readb(dev, ide_bar, reg_status), DF | ERR); in test_bmdma_one_sector_short_prdt()
475 assert_bit_clear(qpci_io_readb(dev, ide_bar, reg_status), DF | ERR); in test_bmdma_one_sector_short_prdt()
482 QPCIBar bmdma_bar, ide_bar; in test_bmdma_long_prdt() local
492 dev = get_pci_device(&bmdma_bar, &ide_bar); in test_bmdma_long_prdt()
498 assert_bit_clear(qpci_io_readb(dev, ide_bar, reg_status), DF | ERR); in test_bmdma_long_prdt()
504 assert_bit_clear(qpci_io_readb(dev, ide_bar, reg_status), DF | ERR); in test_bmdma_long_prdt()
511 QPCIBar bmdma_bar, ide_bar; in test_bmdma_no_busmaster() local
514 dev = get_pci_device(&bmdma_bar, &ide_bar); in test_bmdma_no_busmaster()
528 assert_bit_clear(qpci_io_readb(dev, ide_bar, reg_status), DF | ERR); in test_bmdma_no_busmaster()
560 QPCIBar bmdma_bar, ide_bar; in test_identify() local
571 dev = get_pci_device(&bmdma_bar, &ide_bar); in test_identify()
574 qpci_io_writeb(dev, ide_bar, reg_device, 0); in test_identify()
575 qpci_io_writeb(dev, ide_bar, reg_command, CMD_IDENTIFY); in test_identify()
578 data = qpci_io_readb(dev, ide_bar, reg_device); in test_identify()
582 data = qpci_io_readb(dev, ide_bar, reg_status); in test_identify()
586 buf[i] = qpci_io_readw(dev, ide_bar, reg_data); in test_identify()
589 data = qpci_io_readb(dev, ide_bar, reg_status); in test_identify()
616 QPCIBar bmdma_bar, ide_bar; in make_dirty() local
622 dev = get_pci_device(&bmdma_bar, &ide_bar); in make_dirty()
642 assert_bit_clear(qpci_io_readb(dev, ide_bar, reg_status), DF | ERR); in make_dirty()
651 QPCIBar bmdma_bar, ide_bar; in test_flush() local
658 dev = get_pci_device(&bmdma_bar, &ide_bar); in test_flush()
669 qpci_io_writeb(dev, ide_bar, reg_device, 0); in test_flush()
670 qpci_io_writeb(dev, ide_bar, reg_command, CMD_FLUSH_CACHE); in test_flush()
673 data = qpci_io_readb(dev, ide_bar, reg_status); in test_flush()
681 data = qpci_io_readb(dev, ide_bar, reg_device); in test_flush()
685 data = qpci_io_readb(dev, ide_bar, reg_status); in test_flush()
698 QPCIBar bmdma_bar, ide_bar; in test_retry_flush() local
708 dev = get_pci_device(&bmdma_bar, &ide_bar); in test_retry_flush()
716 qpci_io_writeb(dev, ide_bar, reg_device, 0); in test_retry_flush()
717 qpci_io_writeb(dev, ide_bar, reg_command, CMD_FLUSH_CACHE); in test_retry_flush()
720 data = qpci_io_readb(dev, ide_bar, reg_status); in test_retry_flush()
730 data = qpci_io_readb(dev, ide_bar, reg_device); in test_retry_flush()
734 data = qpci_io_readb(dev, ide_bar, reg_status); in test_retry_flush()
747 QPCIBar bmdma_bar, ide_bar; in test_flush_nodev() local
751 dev = get_pci_device(&bmdma_bar, &ide_bar); in test_flush_nodev()
754 qpci_io_writeb(dev, ide_bar, reg_device, 0); in test_flush_nodev()
755 qpci_io_writeb(dev, ide_bar, reg_command, CMD_FLUSH_CACHE); in test_flush_nodev()
766 QPCIBar bmdma_bar, ide_bar; in test_flush_empty_drive() local
769 dev = get_pci_device(&bmdma_bar, &ide_bar); in test_flush_empty_drive()
772 qpci_io_writeb(dev, ide_bar, reg_device, 0); in test_flush_empty_drive()
773 qpci_io_writeb(dev, ide_bar, reg_command, CMD_FLUSH_CACHE); in test_flush_empty_drive()
801 static void send_scsi_cdb_read10(QPCIDevice *dev, QPCIBar ide_bar, in send_scsi_cdb_read10() argument
818 qpci_io_writew(dev, ide_bar, reg_data, in send_scsi_cdb_read10()
833 QPCIBar bmdma_bar, ide_bar; in ide_wait_clear() local
837 dev = get_pci_device(&bmdma_bar, &ide_bar); in ide_wait_clear()
842 data = qpci_io_readb(dev, ide_bar, reg_status); in ide_wait_clear()
878 QPCIBar bmdma_bar, ide_bar; in cdrom_pio_impl() local
899 dev = get_pci_device(&bmdma_bar, &ide_bar); in cdrom_pio_impl()
903 qpci_io_writeb(dev, ide_bar, reg_device, 0); in cdrom_pio_impl()
904 qpci_io_writeb(dev, ide_bar, reg_lba_middle, BYTE_COUNT_LIMIT & 0xFF); in cdrom_pio_impl()
905 qpci_io_writeb(dev, ide_bar, reg_lba_high, (BYTE_COUNT_LIMIT >> 8 & 0xFF)); in cdrom_pio_impl()
906 qpci_io_writeb(dev, ide_bar, reg_command, CMD_PACKET); in cdrom_pio_impl()
915 send_scsi_cdb_read10(dev, ide_bar, 0, nblocks); in cdrom_pio_impl()
939 rx[offset + j] = cpu_to_le16(qpci_io_readw(dev, ide_bar, in cdrom_pio_impl()