diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-23 13:55:52 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-23 13:55:52 -0400 |
commit | b73c7ee25da6133f97f47ffd3557288417da7c76 (patch) | |
tree | 0d348c81294d246b8417aff6e24502c93b312505 /drivers/ide/pci/ns87415.c | |
parent | c6dfa867bb45f4bff2e48f3bc89ab1d6a7ab4c21 (diff) |
ide: add ->read_status method
* Remove ide_read_status() inline helper.
* Add ->read_status method for reading ATA Status register
and use it instead of ->INB.
While at it:
* Don't use HWGROUP() macro.
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/ns87415.c')
-rw-r--r-- | drivers/ide/pci/ns87415.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/ide/pci/ns87415.c b/drivers/ide/pci/ns87415.c index 76ce112fd857..b20e5f01ac89 100644 --- a/drivers/ide/pci/ns87415.c +++ b/drivers/ide/pci/ns87415.c | |||
@@ -63,6 +63,11 @@ static u8 superio_ide_inb (unsigned long port) | |||
63 | return inb(port); | 63 | return inb(port); |
64 | } | 64 | } |
65 | 65 | ||
66 | static u8 superio_read_status(ide_hwif_t *hwif) | ||
67 | { | ||
68 | return superio_ide_inb(hwif->io_ports.status_addr); | ||
69 | } | ||
70 | |||
66 | static u8 superio_read_sff_dma_status(ide_hwif_t *hwif) | 71 | static u8 superio_read_sff_dma_status(ide_hwif_t *hwif) |
67 | { | 72 | { |
68 | return superio_ide_inb(hwif->dma_base + ATA_DMA_STATUS); | 73 | return superio_ide_inb(hwif->dma_base + ATA_DMA_STATUS); |
@@ -127,6 +132,7 @@ static void __devinit superio_ide_init_iops (struct hwif_s *hwif) | |||
127 | tmp = superio_ide_inb(superio_ide_dma_status[port]); | 132 | tmp = superio_ide_inb(superio_ide_dma_status[port]); |
128 | outb(tmp | 0x66, superio_ide_dma_status[port]); | 133 | outb(tmp | 0x66, superio_ide_dma_status[port]); |
129 | 134 | ||
135 | hwif->read_status = superio_read_status; | ||
130 | hwif->read_sff_dma_status = superio_read_sff_dma_status; | 136 | hwif->read_sff_dma_status = superio_read_sff_dma_status; |
131 | 137 | ||
132 | hwif->tf_read = superio_tf_read; | 138 | hwif->tf_read = superio_tf_read; |
@@ -283,7 +289,7 @@ static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif) | |||
283 | outb(8, hwif->io_ports.ctl_addr); | 289 | outb(8, hwif->io_ports.ctl_addr); |
284 | do { | 290 | do { |
285 | udelay(50); | 291 | udelay(50); |
286 | stat = hwif->INB(hwif->io_ports.status_addr); | 292 | stat = hwif->read_status(hwif); |
287 | if (stat == 0xff) | 293 | if (stat == 0xff) |
288 | break; | 294 | break; |
289 | } while ((stat & BUSY_STAT) && --timeout); | 295 | } while ((stat & BUSY_STAT) && --timeout); |