aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ns87415.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2009-01-06 11:21:02 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-01-06 11:21:02 -0500
commit592b5315219881c6c0af4785f96456ad2043193a (patch)
tree2b330d7b4880c10013a9e3e86b5cf18160aed785 /drivers/ide/ns87415.c
parent3f023b0138b7db21bac0074b3d5ca2854372c6ff (diff)
ide: move read_sff_dma_status() method to 'struct ide_dma_ops'
Move apparently misplaced read_sff_dma_status() method from 'struct ide_tp_ops' to 'struct ide_dma_ops', renaming it to dma_sff_read_status() and making only required for SFF-8038i compatible IDE controller drivers (greatly cutting down the number of initializers) as its only user (outside ide-dma-sff.c and such drivers) appears to be ide_pci_check_simplex() which is only called for such controllers... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ns87415.c')
-rw-r--r--drivers/ide/ns87415.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/ide/ns87415.c b/drivers/ide/ns87415.c
index aceb2fcbe1d1..83643ed9a426 100644
--- a/drivers/ide/ns87415.c
+++ b/drivers/ide/ns87415.c
@@ -56,7 +56,7 @@ static u8 superio_read_status(ide_hwif_t *hwif)
56 return superio_ide_inb(hwif->io_ports.status_addr); 56 return superio_ide_inb(hwif->io_ports.status_addr);
57} 57}
58 58
59static u8 superio_read_sff_dma_status(ide_hwif_t *hwif) 59static u8 superio_dma_sff_read_status(ide_hwif_t *hwif)
60{ 60{
61 return superio_ide_inb(hwif->dma_base + ATA_DMA_STATUS); 61 return superio_ide_inb(hwif->dma_base + ATA_DMA_STATUS);
62} 62}
@@ -109,7 +109,6 @@ static const struct ide_tp_ops superio_tp_ops = {
109 .exec_command = ide_exec_command, 109 .exec_command = ide_exec_command,
110 .read_status = superio_read_status, 110 .read_status = superio_read_status,
111 .read_altstatus = ide_read_altstatus, 111 .read_altstatus = ide_read_altstatus,
112 .read_sff_dma_status = superio_read_sff_dma_status,
113 112
114 .set_irq = ide_set_irq, 113 .set_irq = ide_set_irq,
115 114
@@ -132,6 +131,8 @@ static void __devinit superio_init_iops(struct hwif_s *hwif)
132 tmp = superio_ide_inb(dma_stat); 131 tmp = superio_ide_inb(dma_stat);
133 outb(tmp | 0x66, dma_stat); 132 outb(tmp | 0x66, dma_stat);
134} 133}
134#else
135#define superio_dma_sff_read_status ide_dma_sff_read_status
135#endif 136#endif
136 137
137static unsigned int ns87415_count = 0, ns87415_control[MAX_HWIFS] = { 0 }; 138static unsigned int ns87415_count = 0, ns87415_control[MAX_HWIFS] = { 0 };
@@ -201,7 +202,7 @@ static int ns87415_dma_end(ide_drive_t *drive)
201 u8 dma_stat = 0, dma_cmd = 0; 202 u8 dma_stat = 0, dma_cmd = 0;
202 203
203 drive->waiting_for_dma = 0; 204 drive->waiting_for_dma = 0;
204 dma_stat = hwif->tp_ops->read_sff_dma_status(hwif); 205 dma_stat = hwif->dma_ops->dma_sff_read_status(hwif);
205 /* get DMA command mode */ 206 /* get DMA command mode */
206 dma_cmd = inb(hwif->dma_base + ATA_DMA_CMD); 207 dma_cmd = inb(hwif->dma_base + ATA_DMA_CMD);
207 /* stop DMA */ 208 /* stop DMA */
@@ -308,6 +309,7 @@ static const struct ide_dma_ops ns87415_dma_ops = {
308 .dma_test_irq = ide_dma_test_irq, 309 .dma_test_irq = ide_dma_test_irq,
309 .dma_lost_irq = ide_dma_lost_irq, 310 .dma_lost_irq = ide_dma_lost_irq,
310 .dma_timeout = ide_dma_timeout, 311 .dma_timeout = ide_dma_timeout,
312 .dma_sff_read_status = superio_dma_sff_read_status,
311}; 313};
312 314
313static const struct ide_port_info ns87415_chipset __devinitdata = { 315static const struct ide_port_info ns87415_chipset __devinitdata = {