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>
diff --git a/drivers/ata/pata_opti.c b/drivers/ata/pata_opti.c
index 58951cc..e763026 100644
--- a/drivers/ata/pata_opti.c
+++ b/drivers/ata/pata_opti.c
@@ -95,18 +95,18 @@
 
 static void opti_write_reg(struct ata_port *ap, u8 val, int reg)
 {
-	unsigned long regio = ap->ioaddr.cmd_addr;
+	void __iomem *regio = ap->ioaddr.cmd_addr;
 
 	/* These 3 unlock the control register access */
-	inw(regio + 1);
-	inw(regio + 1);
-	outb(3, regio + 2);
+	ioread16(regio + 1);
+	ioread16(regio + 1);
+	iowrite8(3, regio + 2);
 
 	/* Do the I/O */
-	outb(val, regio + reg);
+	iowrite8(val, regio + reg);
 
 	/* Relock */
-	outb(0x83, regio + 2);
+	iowrite8(0x83, regio + 2);
 }
 
 /**
@@ -124,7 +124,7 @@
 	struct ata_device *pair = ata_dev_pair(adev);
 	int clock;
 	int pio = adev->pio_mode - XFER_PIO_0;
-	unsigned long regio = ap->ioaddr.cmd_addr;
+	void __iomem *regio = ap->ioaddr.cmd_addr;
 	u8 addr;
 
 	/* Address table precomputed with prefetch off and a DCLK of 2 */
@@ -137,8 +137,8 @@
 		{ 0x58, 0x44, 0x32, 0x22, 0x21 }
 	};
 
-	outb(0xff, regio + 5);
-	clock = inw(regio + 5) & 1;
+	iowrite8(0xff, regio + 5);
+	clock = ioread16(regio + 5) & 1;
 
 	/*
  	 *	As with many controllers the address setup time is shared
@@ -205,7 +205,7 @@
 	.qc_prep 	= ata_qc_prep,
 	.qc_issue	= ata_qc_issue_prot,
 
-	.data_xfer	= ata_pio_data_xfer,
+	.data_xfer	= ata_data_xfer,
 
 	.irq_handler	= ata_interrupt,
 	.irq_clear	= ata_bmdma_irq_clear,