diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-24 18:22:39 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-24 18:22:39 -0400 |
commit | 7a254df007b3db88bd430474030fec92e7bab22a (patch) | |
tree | 22ce4d0f861fdb019089315d836099bc93a5d0ba | |
parent | 7610c4f5efc495d8e15ef608c4a66932f895379a (diff) |
ide: move ide_pktcmd_tf_load() to ide-atapi.c
Then make it static and remove 'dma' argument.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r-- | drivers/ide/ide-atapi.c | 21 | ||||
-rw-r--r-- | drivers/ide/ide-io.c | 20 | ||||
-rw-r--r-- | include/linux/ide.h | 2 |
3 files changed, 20 insertions, 23 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index e9d042dba0e0..09ae30f46070 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c | |||
@@ -456,6 +456,25 @@ next_irq: | |||
456 | return ide_started; | 456 | return ide_started; |
457 | } | 457 | } |
458 | 458 | ||
459 | static void ide_pktcmd_tf_load(ide_drive_t *drive, u32 tf_flags, u16 bcount) | ||
460 | { | ||
461 | ide_hwif_t *hwif = drive->hwif; | ||
462 | ide_task_t task; | ||
463 | u8 dma = drive->dma; | ||
464 | |||
465 | memset(&task, 0, sizeof(task)); | ||
466 | task.tf_flags = IDE_TFLAG_OUT_LBAH | IDE_TFLAG_OUT_LBAM | | ||
467 | IDE_TFLAG_OUT_FEATURE | tf_flags; | ||
468 | task.tf.feature = dma; /* Use PIO/DMA */ | ||
469 | task.tf.lbam = bcount & 0xff; | ||
470 | task.tf.lbah = (bcount >> 8) & 0xff; | ||
471 | |||
472 | ide_tf_dump(drive->name, &task.tf); | ||
473 | hwif->tp_ops->set_irq(hwif, 1); | ||
474 | SELECT_MASK(drive, 0); | ||
475 | hwif->tp_ops->tf_load(drive, &task); | ||
476 | } | ||
477 | |||
459 | static u8 ide_read_ireason(ide_drive_t *drive) | 478 | static u8 ide_read_ireason(ide_drive_t *drive) |
460 | { | 479 | { |
461 | ide_task_t task; | 480 | ide_task_t task; |
@@ -629,7 +648,7 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive) | |||
629 | : WAIT_TAPE_CMD; | 648 | : WAIT_TAPE_CMD; |
630 | } | 649 | } |
631 | 650 | ||
632 | ide_pktcmd_tf_load(drive, tf_flags, bcount, drive->dma); | 651 | ide_pktcmd_tf_load(drive, tf_flags, bcount); |
633 | 652 | ||
634 | /* Issue the packet command */ | 653 | /* Issue the packet command */ |
635 | if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) { | 654 | if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) { |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index a9a6c208288a..4344b6119d77 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -1192,26 +1192,6 @@ void ide_do_drive_cmd(ide_drive_t *drive, struct request *rq) | |||
1192 | } | 1192 | } |
1193 | EXPORT_SYMBOL(ide_do_drive_cmd); | 1193 | EXPORT_SYMBOL(ide_do_drive_cmd); |
1194 | 1194 | ||
1195 | void ide_pktcmd_tf_load(ide_drive_t *drive, u32 tf_flags, u16 bcount, u8 dma) | ||
1196 | { | ||
1197 | ide_hwif_t *hwif = drive->hwif; | ||
1198 | ide_task_t task; | ||
1199 | |||
1200 | memset(&task, 0, sizeof(task)); | ||
1201 | task.tf_flags = IDE_TFLAG_OUT_LBAH | IDE_TFLAG_OUT_LBAM | | ||
1202 | IDE_TFLAG_OUT_FEATURE | tf_flags; | ||
1203 | task.tf.feature = dma; /* Use PIO/DMA */ | ||
1204 | task.tf.lbam = bcount & 0xff; | ||
1205 | task.tf.lbah = (bcount >> 8) & 0xff; | ||
1206 | |||
1207 | ide_tf_dump(drive->name, &task.tf); | ||
1208 | hwif->tp_ops->set_irq(hwif, 1); | ||
1209 | SELECT_MASK(drive, 0); | ||
1210 | hwif->tp_ops->tf_load(drive, &task); | ||
1211 | } | ||
1212 | |||
1213 | EXPORT_SYMBOL_GPL(ide_pktcmd_tf_load); | ||
1214 | |||
1215 | void ide_pad_transfer(ide_drive_t *drive, int write, int len) | 1195 | void ide_pad_transfer(ide_drive_t *drive, int write, int len) |
1216 | { | 1196 | { |
1217 | ide_hwif_t *hwif = drive->hwif; | 1197 | ide_hwif_t *hwif = drive->hwif; |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 25087aead657..e7b787de5286 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1202,8 +1202,6 @@ void ide_read_bcount_and_ireason(ide_drive_t *, u16 *, u8 *); | |||
1202 | 1202 | ||
1203 | extern int drive_is_ready(ide_drive_t *); | 1203 | extern int drive_is_ready(ide_drive_t *); |
1204 | 1204 | ||
1205 | void ide_pktcmd_tf_load(ide_drive_t *, u32, u16, u8); | ||
1206 | |||
1207 | int ide_check_atapi_device(ide_drive_t *, const char *); | 1205 | int ide_check_atapi_device(ide_drive_t *, const char *); |
1208 | 1206 | ||
1209 | void ide_init_pc(struct ide_atapi_pc *); | 1207 | void ide_init_pc(struct ide_atapi_pc *); |