diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-02-16 20:40:25 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-02-16 20:40:25 -0500 |
commit | 0ecdca26e556eae9668ce6de9554757dddb942ef (patch) | |
tree | 21d62c01d0c0d5aeea2524252ed8dec6ca20b6d4 /drivers/ide/pci/cmd64x.c | |
parent | 7569e8dc2213ecc47024ea5edbadc8736487d926 (diff) |
ide: use PIO/MMIO operations directly where possible (v2)
This results in smaller/faster/simpler code and allows future optimizations.
Also remove no longer needed ide[_mm]_{inl,outl}() and ide_hwif_t.{INL,OUTL}.
v2:
* updated for scc_pata
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/cmd64x.c')
-rw-r--r-- | drivers/ide/pci/cmd64x.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c index b1f9f5f3615e..a76451a074c6 100644 --- a/drivers/ide/pci/cmd64x.c +++ b/drivers/ide/pci/cmd64x.c | |||
@@ -507,13 +507,13 @@ static int cmd64x_ide_dma_end (ide_drive_t *drive) | |||
507 | 507 | ||
508 | drive->waiting_for_dma = 0; | 508 | drive->waiting_for_dma = 0; |
509 | /* read DMA command state */ | 509 | /* read DMA command state */ |
510 | dma_cmd = hwif->INB(hwif->dma_command); | 510 | dma_cmd = inb(hwif->dma_command); |
511 | /* stop DMA */ | 511 | /* stop DMA */ |
512 | hwif->OUTB((dma_cmd & ~1), hwif->dma_command); | 512 | outb(dma_cmd & ~1, hwif->dma_command); |
513 | /* get DMA status */ | 513 | /* get DMA status */ |
514 | dma_stat = hwif->INB(hwif->dma_status); | 514 | dma_stat = inb(hwif->dma_status); |
515 | /* clear the INTR & ERROR bits */ | 515 | /* clear the INTR & ERROR bits */ |
516 | hwif->OUTB(dma_stat|6, hwif->dma_status); | 516 | outb(dma_stat | 6, hwif->dma_status); |
517 | if (cmd64x_alt_dma_status(dev)) { | 517 | if (cmd64x_alt_dma_status(dev)) { |
518 | u8 dma_intr = 0; | 518 | u8 dma_intr = 0; |
519 | u8 dma_mask = (hwif->channel) ? ARTTIM23_INTR_CH1 : | 519 | u8 dma_mask = (hwif->channel) ? ARTTIM23_INTR_CH1 : |
@@ -535,7 +535,7 @@ static int cmd64x_ide_dma_test_irq (ide_drive_t *drive) | |||
535 | struct pci_dev *dev = hwif->pci_dev; | 535 | struct pci_dev *dev = hwif->pci_dev; |
536 | u8 dma_alt_stat = 0, mask = (hwif->channel) ? MRDMODE_INTR_CH1 : | 536 | u8 dma_alt_stat = 0, mask = (hwif->channel) ? MRDMODE_INTR_CH1 : |
537 | MRDMODE_INTR_CH0; | 537 | MRDMODE_INTR_CH0; |
538 | u8 dma_stat = hwif->INB(hwif->dma_status); | 538 | u8 dma_stat = inb(hwif->dma_status); |
539 | 539 | ||
540 | (void) pci_read_config_byte(dev, MRDMODE, &dma_alt_stat); | 540 | (void) pci_read_config_byte(dev, MRDMODE, &dma_alt_stat); |
541 | #ifdef DEBUG | 541 | #ifdef DEBUG |
@@ -565,13 +565,13 @@ static int cmd646_1_ide_dma_end (ide_drive_t *drive) | |||
565 | 565 | ||
566 | drive->waiting_for_dma = 0; | 566 | drive->waiting_for_dma = 0; |
567 | /* get DMA status */ | 567 | /* get DMA status */ |
568 | dma_stat = hwif->INB(hwif->dma_status); | 568 | dma_stat = inb(hwif->dma_status); |
569 | /* read DMA command state */ | 569 | /* read DMA command state */ |
570 | dma_cmd = hwif->INB(hwif->dma_command); | 570 | dma_cmd = inb(hwif->dma_command); |
571 | /* stop DMA */ | 571 | /* stop DMA */ |
572 | hwif->OUTB((dma_cmd & ~1), hwif->dma_command); | 572 | outb(dma_cmd & ~1, hwif->dma_command); |
573 | /* clear the INTR & ERROR bits */ | 573 | /* clear the INTR & ERROR bits */ |
574 | hwif->OUTB(dma_stat|6, hwif->dma_status); | 574 | outb(dma_stat | 6, hwif->dma_status); |
575 | /* and free any DMA resources */ | 575 | /* and free any DMA resources */ |
576 | ide_destroy_dmatable(drive); | 576 | ide_destroy_dmatable(drive); |
577 | /* verify good DMA status */ | 577 | /* verify good DMA status */ |