diff options
Diffstat (limited to 'drivers/ata/pata_pdc202xx_old.c')
-rw-r--r-- | drivers/ata/pata_pdc202xx_old.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c index c52e1e8aa2d2..7e194d81c1b6 100644 --- a/drivers/ata/pata_pdc202xx_old.c +++ b/drivers/ata/pata_pdc202xx_old.c | |||
@@ -170,17 +170,17 @@ static void pdc2026x_bmdma_start(struct ata_queued_cmd *qc) | |||
170 | struct ata_taskfile *tf = &qc->tf; | 170 | struct ata_taskfile *tf = &qc->tf; |
171 | int sel66 = ap->port_no ? 0x08: 0x02; | 171 | int sel66 = ap->port_no ? 0x08: 0x02; |
172 | 172 | ||
173 | unsigned long master = ap->host->ports[0]->ioaddr.bmdma_addr; | 173 | void __iomem *master = ap->host->ports[0]->ioaddr.bmdma_addr; |
174 | unsigned long clock = master + 0x11; | 174 | void __iomem *clock = master + 0x11; |
175 | unsigned long atapi_reg = master + 0x20 + (4 * ap->port_no); | 175 | void __iomem *atapi_reg = master + 0x20 + (4 * ap->port_no); |
176 | 176 | ||
177 | u32 len; | 177 | u32 len; |
178 | 178 | ||
179 | /* Check we keep host level locking here */ | 179 | /* Check we keep host level locking here */ |
180 | if (adev->dma_mode >= XFER_UDMA_2) | 180 | if (adev->dma_mode >= XFER_UDMA_2) |
181 | outb(inb(clock) | sel66, clock); | 181 | iowrite8(ioread8(clock) | sel66, clock); |
182 | else | 182 | else |
183 | outb(inb(clock) & ~sel66, clock); | 183 | iowrite8(ioread8(clock) & ~sel66, clock); |
184 | 184 | ||
185 | /* The DMA clocks may have been trashed by a reset. FIXME: make conditional | 185 | /* The DMA clocks may have been trashed by a reset. FIXME: make conditional |
186 | and move to qc_issue ? */ | 186 | and move to qc_issue ? */ |
@@ -196,7 +196,7 @@ static void pdc2026x_bmdma_start(struct ata_queued_cmd *qc) | |||
196 | else | 196 | else |
197 | len |= 0x05000000; | 197 | len |= 0x05000000; |
198 | 198 | ||
199 | outl(len, atapi_reg); | 199 | iowrite32(len, atapi_reg); |
200 | } | 200 | } |
201 | 201 | ||
202 | /* Activate DMA */ | 202 | /* Activate DMA */ |
@@ -219,19 +219,19 @@ static void pdc2026x_bmdma_stop(struct ata_queued_cmd *qc) | |||
219 | 219 | ||
220 | int sel66 = ap->port_no ? 0x08: 0x02; | 220 | int sel66 = ap->port_no ? 0x08: 0x02; |
221 | /* The clock bits are in the same register for both channels */ | 221 | /* The clock bits are in the same register for both channels */ |
222 | unsigned long master = ap->host->ports[0]->ioaddr.bmdma_addr; | 222 | void __iomem *master = ap->host->ports[0]->ioaddr.bmdma_addr; |
223 | unsigned long clock = master + 0x11; | 223 | void __iomem *clock = master + 0x11; |
224 | unsigned long atapi_reg = master + 0x20 + (4 * ap->port_no); | 224 | void __iomem *atapi_reg = master + 0x20 + (4 * ap->port_no); |
225 | 225 | ||
226 | /* Cases the state machine will not complete correctly */ | 226 | /* Cases the state machine will not complete correctly */ |
227 | if (tf->protocol == ATA_PROT_ATAPI_DMA || ( tf->flags & ATA_TFLAG_LBA48)) { | 227 | if (tf->protocol == ATA_PROT_ATAPI_DMA || ( tf->flags & ATA_TFLAG_LBA48)) { |
228 | outl(0, atapi_reg); | 228 | iowrite32(0, atapi_reg); |
229 | outb(inb(clock) & ~sel66, clock); | 229 | iowrite8(ioread8(clock) & ~sel66, clock); |
230 | } | 230 | } |
231 | /* Check we keep host level locking here */ | 231 | /* Check we keep host level locking here */ |
232 | /* Flip back to 33Mhz for PIO */ | 232 | /* Flip back to 33Mhz for PIO */ |
233 | if (adev->dma_mode >= XFER_UDMA_2) | 233 | if (adev->dma_mode >= XFER_UDMA_2) |
234 | outb(inb(clock) & ~sel66, clock); | 234 | iowrite8(ioread8(clock) & ~sel66, clock); |
235 | 235 | ||
236 | ata_bmdma_stop(qc); | 236 | ata_bmdma_stop(qc); |
237 | } | 237 | } |
@@ -294,7 +294,7 @@ static struct ata_port_operations pdc2024x_port_ops = { | |||
294 | 294 | ||
295 | .qc_prep = ata_qc_prep, | 295 | .qc_prep = ata_qc_prep, |
296 | .qc_issue = ata_qc_issue_prot, | 296 | .qc_issue = ata_qc_issue_prot, |
297 | .data_xfer = ata_pio_data_xfer, | 297 | .data_xfer = ata_data_xfer, |
298 | 298 | ||
299 | .irq_handler = ata_interrupt, | 299 | .irq_handler = ata_interrupt, |
300 | .irq_clear = ata_bmdma_irq_clear, | 300 | .irq_clear = ata_bmdma_irq_clear, |
@@ -326,7 +326,7 @@ static struct ata_port_operations pdc2026x_port_ops = { | |||
326 | 326 | ||
327 | .qc_prep = ata_qc_prep, | 327 | .qc_prep = ata_qc_prep, |
328 | .qc_issue = ata_qc_issue_prot, | 328 | .qc_issue = ata_qc_issue_prot, |
329 | .data_xfer = ata_pio_data_xfer, | 329 | .data_xfer = ata_data_xfer, |
330 | 330 | ||
331 | .irq_handler = ata_interrupt, | 331 | .irq_handler = ata_interrupt, |
332 | .irq_clear = ata_bmdma_irq_clear, | 332 | .irq_clear = ata_bmdma_irq_clear, |