ide: add ide_pktcmd_tf_load() helper
Add ide_pktcmd_tf_load() helper and convert ATAPI device drivers to use it. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
@@ -1067,13 +1067,8 @@ static ide_startstop_t idefloppy_issue_pc (ide_drive_t *drive, idefloppy_pc_t *p
|
||||
if (test_bit(PC_DMA_RECOMMENDED, &pc->flags) && drive->using_dma)
|
||||
dma = !hwif->dma_setup(drive);
|
||||
|
||||
if (IDE_CONTROL_REG)
|
||||
HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG);
|
||||
/* Use PIO/DMA */
|
||||
hwif->OUTB(dma, IDE_FEATURE_REG);
|
||||
hwif->OUTB(bcount & 0xff, IDE_BCOUNTL_REG);
|
||||
hwif->OUTB((bcount >> 8) & 0xff, IDE_BCOUNTH_REG);
|
||||
HWIF(drive)->OUTB(drive->select.all, IDE_SELECT_REG);
|
||||
ide_pktcmd_tf_load(drive, IDE_TFLAG_NO_SELECT_MASK |
|
||||
IDE_TFLAG_OUT_DEVICE, bcount, dma);
|
||||
|
||||
if (dma) { /* Begin DMA, if necessary */
|
||||
set_bit(PC_DMA_IN_PROGRESS, &pc->flags);
|
||||
|
Reference in New Issue
Block a user