aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-iops.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-23 13:55:50 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-23 13:55:50 -0400
commitb2f951aabc9cc7d5fb987aeec9aef96ccce618a5 (patch)
treed388e9a44a153cee8395bd7ca9eff63492ff9cfd /drivers/ide/ide-iops.c
parentc97c6aca75fd5f718056fde7cff798b8cbdb07c0 (diff)
ide: add ->read_sff_dma_status method
Add ->read_sff_dma_status method for reading DMA Status register and use it instead of ->INB. While at it: * Use inb() directly in ns87415.c::ns87415_dma_end(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-iops.c')
-rw-r--r--drivers/ide/ide-iops.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index 44aaec256a30..a09bf4369ed8 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -103,6 +103,14 @@ void SELECT_MASK(ide_drive_t *drive, int mask)
103 port_ops->maskproc(drive, mask); 103 port_ops->maskproc(drive, mask);
104} 104}
105 105
106static u8 ide_read_sff_dma_status(ide_hwif_t *hwif)
107{
108 if (hwif->host_flags & IDE_HFLAG_MMIO)
109 return readb((void __iomem *)hwif->dma_status);
110 else
111 return inb(hwif->dma_status);
112}
113
106static void ide_tf_load(ide_drive_t *drive, ide_task_t *task) 114static void ide_tf_load(ide_drive_t *drive, ide_task_t *task)
107{ 115{
108 ide_hwif_t *hwif = drive->hwif; 116 ide_hwif_t *hwif = drive->hwif;
@@ -323,6 +331,8 @@ static void ata_output_data(ide_drive_t *drive, struct request *rq,
323 331
324void default_hwif_transport(ide_hwif_t *hwif) 332void default_hwif_transport(ide_hwif_t *hwif)
325{ 333{
334 hwif->read_sff_dma_status = ide_read_sff_dma_status;
335
326 hwif->tf_load = ide_tf_load; 336 hwif->tf_load = ide_tf_load;
327 hwif->tf_read = ide_tf_read; 337 hwif->tf_read = ide_tf_read;
328 338