diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-25 16:17:13 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-25 16:17:13 -0500 |
commit | 2fc573881957337c4ea1c84b92d2f27d076cad57 (patch) | |
tree | 790726063934a7ea8c384f2314d44bc03b22f779 /drivers/ide/ide-cd.c | |
parent | 932aead6d21b631b2058255981824008a6eae32e (diff) |
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>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r-- | drivers/ide/ide-cd.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 855a23c1c81..44b033ec0ab 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -922,14 +922,8 @@ static ide_startstop_t cdrom_start_packet_command(ide_drive_t *drive, | |||
922 | info->dma = !hwif->dma_setup(drive); | 922 | info->dma = !hwif->dma_setup(drive); |
923 | 923 | ||
924 | /* Set up the controller registers. */ | 924 | /* Set up the controller registers. */ |
925 | if (IDE_CONTROL_REG) | 925 | ide_pktcmd_tf_load(drive, IDE_TFLAG_OUT_NSECT | IDE_TFLAG_OUT_LBAL | |
926 | HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG); | 926 | IDE_TFLAG_NO_SELECT_MASK, xferlen, info->dma); |
927 | HWIF(drive)->OUTB(info->dma, IDE_FEATURE_REG); | ||
928 | HWIF(drive)->OUTB(0, IDE_IREASON_REG); | ||
929 | HWIF(drive)->OUTB(0, IDE_SECTOR_REG); | ||
930 | |||
931 | HWIF(drive)->OUTB(xferlen & 0xff, IDE_BCOUNTL_REG); | ||
932 | HWIF(drive)->OUTB(xferlen >> 8 , IDE_BCOUNTH_REG); | ||
933 | 927 | ||
934 | if (CDROM_CONFIG_FLAGS (drive)->drq_interrupt) { | 928 | if (CDROM_CONFIG_FLAGS (drive)->drq_interrupt) { |
935 | /* waiting for CDB interrupt, not DMA yet. */ | 929 | /* waiting for CDB interrupt, not DMA yet. */ |