diff options
Diffstat (limited to 'drivers/ide/pci/ns87415.c')
| -rw-r--r-- | drivers/ide/pci/ns87415.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/drivers/ide/pci/ns87415.c b/drivers/ide/pci/ns87415.c index 3015d6916d4c..e1b0c9a9ab9c 100644 --- a/drivers/ide/pci/ns87415.c +++ b/drivers/ide/pci/ns87415.c | |||
| @@ -150,7 +150,7 @@ static void ns87415_selectproc (ide_drive_t *drive) | |||
| 150 | ns87415_prepare_drive (drive, drive->using_dma); | 150 | ns87415_prepare_drive (drive, drive->using_dma); |
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | static int ns87415_ide_dma_end (ide_drive_t *drive) | 153 | static int ns87415_dma_end(ide_drive_t *drive) |
| 154 | { | 154 | { |
| 155 | ide_hwif_t *hwif = HWIF(drive); | 155 | ide_hwif_t *hwif = HWIF(drive); |
| 156 | u8 dma_stat = 0, dma_cmd = 0; | 156 | u8 dma_stat = 0, dma_cmd = 0; |
| @@ -170,7 +170,7 @@ static int ns87415_ide_dma_end (ide_drive_t *drive) | |||
| 170 | return (dma_stat & 7) != 4; | 170 | return (dma_stat & 7) != 4; |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | static int ns87415_ide_dma_setup(ide_drive_t *drive) | 173 | static int ns87415_dma_setup(ide_drive_t *drive) |
| 174 | { | 174 | { |
| 175 | /* select DMA xfer */ | 175 | /* select DMA xfer */ |
| 176 | ns87415_prepare_drive(drive, 1); | 176 | ns87415_prepare_drive(drive, 1); |
| @@ -195,8 +195,6 @@ static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif) | |||
| 195 | u8 stat; | 195 | u8 stat; |
| 196 | #endif | 196 | #endif |
| 197 | 197 | ||
| 198 | hwif->selectproc = &ns87415_selectproc; | ||
| 199 | |||
| 200 | /* | 198 | /* |
| 201 | * We cannot probe for IRQ: both ports share common IRQ on INTA. | 199 | * We cannot probe for IRQ: both ports share common IRQ on INTA. |
| 202 | * Also, leave IRQ masked during drive probing, to prevent infinite | 200 | * Also, leave IRQ masked during drive probing, to prevent infinite |
| @@ -254,16 +252,31 @@ static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif) | |||
| 254 | return; | 252 | return; |
| 255 | 253 | ||
| 256 | outb(0x60, hwif->dma_status); | 254 | outb(0x60, hwif->dma_status); |
| 257 | hwif->dma_setup = &ns87415_ide_dma_setup; | ||
| 258 | hwif->ide_dma_end = &ns87415_ide_dma_end; | ||
| 259 | } | 255 | } |
| 260 | 256 | ||
| 257 | static const struct ide_port_ops ns87415_port_ops = { | ||
| 258 | .selectproc = ns87415_selectproc, | ||
| 259 | }; | ||
| 260 | |||
| 261 | static const struct ide_dma_ops ns87415_dma_ops = { | ||
| 262 | .dma_host_set = ide_dma_host_set, | ||
| 263 | .dma_setup = ns87415_dma_setup, | ||
| 264 | .dma_exec_cmd = ide_dma_exec_cmd, | ||
| 265 | .dma_start = ide_dma_start, | ||
| 266 | .dma_end = ns87415_dma_end, | ||
| 267 | .dma_test_irq = ide_dma_test_irq, | ||
| 268 | .dma_lost_irq = ide_dma_lost_irq, | ||
| 269 | .dma_timeout = ide_dma_timeout, | ||
| 270 | }; | ||
| 271 | |||
| 261 | static const struct ide_port_info ns87415_chipset __devinitdata = { | 272 | static const struct ide_port_info ns87415_chipset __devinitdata = { |
| 262 | .name = "NS87415", | 273 | .name = "NS87415", |
| 263 | #ifdef CONFIG_SUPERIO | 274 | #ifdef CONFIG_SUPERIO |
| 264 | .init_iops = init_iops_ns87415, | 275 | .init_iops = init_iops_ns87415, |
| 265 | #endif | 276 | #endif |
| 266 | .init_hwif = init_hwif_ns87415, | 277 | .init_hwif = init_hwif_ns87415, |
| 278 | .port_ops = &ns87415_port_ops, | ||
| 279 | .dma_ops = &ns87415_dma_ops, | ||
| 267 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | | 280 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | |
| 268 | IDE_HFLAG_NO_ATAPI_DMA, | 281 | IDE_HFLAG_NO_ATAPI_DMA, |
| 269 | }; | 282 | }; |
