aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_hpt37x.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-02-01 01:06:36 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-09 17:39:38 -0500
commit0d5ff566779f894ca9937231a181eb31e4adff0e (patch)
treed1c7495c932581c1d41aa7f0fdb303348da49106 /drivers/ata/pata_hpt37x.c
parent1a68ff13c8a9b517de3fd4187dc525412a6eba1b (diff)
libata: convert to iomap
Convert libata core layer and LLDs to use iomap. * managed iomap is used. Pointer to pcim_iomap_table() is cached at host->iomap and used through out LLDs. This basically replaces host->mmio_base. * if possible, pcim_iomap_regions() is used Most iomap operation conversions are taken from Jeff Garzik <jgarzik@pobox.com>'s iomap branch. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/pata_hpt37x.c')
-rw-r--r--drivers/ata/pata_hpt37x.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c
index 09e8be56ba36..c6d8774df0de 100644
--- a/drivers/ata/pata_hpt37x.c
+++ b/drivers/ata/pata_hpt37x.c
@@ -634,24 +634,24 @@ static void hpt370_bmdma_stop(struct ata_queued_cmd *qc)
634{ 634{
635 struct ata_port *ap = qc->ap; 635 struct ata_port *ap = qc->ap;
636 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 636 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
637 u8 dma_stat = inb(ap->ioaddr.bmdma_addr + 2); 637 u8 dma_stat = ioread8(ap->ioaddr.bmdma_addr + 2);
638 u8 dma_cmd; 638 u8 dma_cmd;
639 unsigned long bmdma = ap->ioaddr.bmdma_addr; 639 void __iomem *bmdma = ap->ioaddr.bmdma_addr;
640 640
641 if (dma_stat & 0x01) { 641 if (dma_stat & 0x01) {
642 udelay(20); 642 udelay(20);
643 dma_stat = inb(bmdma + 2); 643 dma_stat = ioread8(bmdma + 2);
644 } 644 }
645 if (dma_stat & 0x01) { 645 if (dma_stat & 0x01) {
646 /* Clear the engine */ 646 /* Clear the engine */
647 pci_write_config_byte(pdev, 0x50 + 4 * ap->port_no, 0x37); 647 pci_write_config_byte(pdev, 0x50 + 4 * ap->port_no, 0x37);
648 udelay(10); 648 udelay(10);
649 /* Stop DMA */ 649 /* Stop DMA */
650 dma_cmd = inb(bmdma ); 650 dma_cmd = ioread8(bmdma );
651 outb(dma_cmd & 0xFE, bmdma); 651 iowrite8(dma_cmd & 0xFE, bmdma);
652 /* Clear Error */ 652 /* Clear Error */
653 dma_stat = inb(bmdma + 2); 653 dma_stat = ioread8(bmdma + 2);
654 outb(dma_stat | 0x06 , bmdma + 2); 654 iowrite8(dma_stat | 0x06 , bmdma + 2);
655 /* Clear the engine */ 655 /* Clear the engine */
656 pci_write_config_byte(pdev, 0x50 + 4 * ap->port_no, 0x37); 656 pci_write_config_byte(pdev, 0x50 + 4 * ap->port_no, 0x37);
657 udelay(10); 657 udelay(10);
@@ -796,7 +796,7 @@ static struct ata_port_operations hpt370_port_ops = {
796 .qc_prep = ata_qc_prep, 796 .qc_prep = ata_qc_prep,
797 .qc_issue = ata_qc_issue_prot, 797 .qc_issue = ata_qc_issue_prot,
798 798
799 .data_xfer = ata_pio_data_xfer, 799 .data_xfer = ata_data_xfer,
800 800
801 .irq_handler = ata_interrupt, 801 .irq_handler = ata_interrupt,
802 .irq_clear = ata_bmdma_irq_clear, 802 .irq_clear = ata_bmdma_irq_clear,
@@ -833,7 +833,7 @@ static struct ata_port_operations hpt370a_port_ops = {
833 .qc_prep = ata_qc_prep, 833 .qc_prep = ata_qc_prep,
834 .qc_issue = ata_qc_issue_prot, 834 .qc_issue = ata_qc_issue_prot,
835 835
836 .data_xfer = ata_pio_data_xfer, 836 .data_xfer = ata_data_xfer,
837 837
838 .irq_handler = ata_interrupt, 838 .irq_handler = ata_interrupt,
839 .irq_clear = ata_bmdma_irq_clear, 839 .irq_clear = ata_bmdma_irq_clear,
@@ -871,7 +871,7 @@ static struct ata_port_operations hpt372_port_ops = {
871 .qc_prep = ata_qc_prep, 871 .qc_prep = ata_qc_prep,
872 .qc_issue = ata_qc_issue_prot, 872 .qc_issue = ata_qc_issue_prot,
873 873
874 .data_xfer = ata_pio_data_xfer, 874 .data_xfer = ata_data_xfer,
875 875
876 .irq_handler = ata_interrupt, 876 .irq_handler = ata_interrupt,
877 .irq_clear = ata_bmdma_irq_clear, 877 .irq_clear = ata_bmdma_irq_clear,
@@ -909,7 +909,7 @@ static struct ata_port_operations hpt374_port_ops = {
909 .qc_prep = ata_qc_prep, 909 .qc_prep = ata_qc_prep,
910 .qc_issue = ata_qc_issue_prot, 910 .qc_issue = ata_qc_issue_prot,
911 911
912 .data_xfer = ata_pio_data_xfer, 912 .data_xfer = ata_data_xfer,
913 913
914 .irq_handler = ata_interrupt, 914 .irq_handler = ata_interrupt,
915 .irq_clear = ata_bmdma_irq_clear, 915 .irq_clear = ata_bmdma_irq_clear,