diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-27 13:13:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-27 13:13:06 -0400 |
commit | fba5c1af5c4fd6645fe62ea84ccde0981282cf66 (patch) | |
tree | 834022eb683e0badd5a1e5eb5957f74c0e69ebb4 /drivers/ide/ide-taskfile.c | |
parent | f222eba0f9d98376d363b51fcc2361fb56929844 (diff) | |
parent | 077e3bdb9ec34d7cb5751b5be81a4a0f6f0eb5dc (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (49 commits)
ide-tape: remove tape->merge_stage
ide-tape: mv tape->merge_stage_size tape->merge_bh_size
ide-tape: mv idetape_empty_write_pipeline ide_tape_flush_merge_buffer
ide-tape: mv idetape_discard_read_pipeline ide_tape_discard_merge_buffer
ide-tape: make __idetape_discard_read_pipeline() of type void
ide: remove now unused ide_pci_create_host_proc()
ide: remove /proc/ide/ali
ide-tape: improve buffer pages freeing strategy
ide-tape: mv tape->pages_per_stage tape->pages_per_buffer
ide-tape: mv tape->stage_size tape->buffer_size
ide-tape: improve buffer allocation strategy
ide: add struct ide_io_ports (take 3)
ide: make ide_unregister() take 'ide_hwif_t *' as an argument (take 2)
ide: sanitize ide_unregister() usage
mpc8xx-ide: use ide_find_port()
ide: add "noacpi" / "acpigtf" / "acpionboot" parameters
gayle: add "doubler" parameter
ide: add "cdrom=" and "chs=" parameters
ide: add "nodma|noflush|noprobe|nowerr=" parameters
ide: remove obsoleted "hdx=autotune" kernel parameter
...
Diffstat (limited to 'drivers/ide/ide-taskfile.c')
-rw-r--r-- | drivers/ide/ide-taskfile.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index a317ca9c46e5..9f9ad9fb6b89 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -36,6 +36,7 @@ | |||
36 | void ide_tf_load(ide_drive_t *drive, ide_task_t *task) | 36 | void ide_tf_load(ide_drive_t *drive, ide_task_t *task) |
37 | { | 37 | { |
38 | ide_hwif_t *hwif = drive->hwif; | 38 | ide_hwif_t *hwif = drive->hwif; |
39 | struct ide_io_ports *io_ports = &hwif->io_ports; | ||
39 | struct ide_taskfile *tf = &task->tf; | 40 | struct ide_taskfile *tf = &task->tf; |
40 | u8 HIHI = (task->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF; | 41 | u8 HIHI = (task->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF; |
41 | 42 | ||
@@ -59,34 +60,33 @@ void ide_tf_load(ide_drive_t *drive, ide_task_t *task) | |||
59 | SELECT_MASK(drive, 0); | 60 | SELECT_MASK(drive, 0); |
60 | 61 | ||
61 | if (task->tf_flags & IDE_TFLAG_OUT_DATA) | 62 | if (task->tf_flags & IDE_TFLAG_OUT_DATA) |
62 | hwif->OUTW((tf->hob_data << 8) | tf->data, | 63 | hwif->OUTW((tf->hob_data << 8) | tf->data, io_ports->data_addr); |
63 | hwif->io_ports[IDE_DATA_OFFSET]); | ||
64 | 64 | ||
65 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE) | 65 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE) |
66 | hwif->OUTB(tf->hob_feature, hwif->io_ports[IDE_FEATURE_OFFSET]); | 66 | hwif->OUTB(tf->hob_feature, io_ports->feature_addr); |
67 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_NSECT) | 67 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_NSECT) |
68 | hwif->OUTB(tf->hob_nsect, hwif->io_ports[IDE_NSECTOR_OFFSET]); | 68 | hwif->OUTB(tf->hob_nsect, io_ports->nsect_addr); |
69 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAL) | 69 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAL) |
70 | hwif->OUTB(tf->hob_lbal, hwif->io_ports[IDE_SECTOR_OFFSET]); | 70 | hwif->OUTB(tf->hob_lbal, io_ports->lbal_addr); |
71 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAM) | 71 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAM) |
72 | hwif->OUTB(tf->hob_lbam, hwif->io_ports[IDE_LCYL_OFFSET]); | 72 | hwif->OUTB(tf->hob_lbam, io_ports->lbam_addr); |
73 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAH) | 73 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAH) |
74 | hwif->OUTB(tf->hob_lbah, hwif->io_ports[IDE_HCYL_OFFSET]); | 74 | hwif->OUTB(tf->hob_lbah, io_ports->lbah_addr); |
75 | 75 | ||
76 | if (task->tf_flags & IDE_TFLAG_OUT_FEATURE) | 76 | if (task->tf_flags & IDE_TFLAG_OUT_FEATURE) |
77 | hwif->OUTB(tf->feature, hwif->io_ports[IDE_FEATURE_OFFSET]); | 77 | hwif->OUTB(tf->feature, io_ports->feature_addr); |
78 | if (task->tf_flags & IDE_TFLAG_OUT_NSECT) | 78 | if (task->tf_flags & IDE_TFLAG_OUT_NSECT) |
79 | hwif->OUTB(tf->nsect, hwif->io_ports[IDE_NSECTOR_OFFSET]); | 79 | hwif->OUTB(tf->nsect, io_ports->nsect_addr); |
80 | if (task->tf_flags & IDE_TFLAG_OUT_LBAL) | 80 | if (task->tf_flags & IDE_TFLAG_OUT_LBAL) |
81 | hwif->OUTB(tf->lbal, hwif->io_ports[IDE_SECTOR_OFFSET]); | 81 | hwif->OUTB(tf->lbal, io_ports->lbal_addr); |
82 | if (task->tf_flags & IDE_TFLAG_OUT_LBAM) | 82 | if (task->tf_flags & IDE_TFLAG_OUT_LBAM) |
83 | hwif->OUTB(tf->lbam, hwif->io_ports[IDE_LCYL_OFFSET]); | 83 | hwif->OUTB(tf->lbam, io_ports->lbam_addr); |
84 | if (task->tf_flags & IDE_TFLAG_OUT_LBAH) | 84 | if (task->tf_flags & IDE_TFLAG_OUT_LBAH) |
85 | hwif->OUTB(tf->lbah, hwif->io_ports[IDE_HCYL_OFFSET]); | 85 | hwif->OUTB(tf->lbah, io_ports->lbah_addr); |
86 | 86 | ||
87 | if (task->tf_flags & IDE_TFLAG_OUT_DEVICE) | 87 | if (task->tf_flags & IDE_TFLAG_OUT_DEVICE) |
88 | hwif->OUTB((tf->device & HIHI) | drive->select.all, | 88 | hwif->OUTB((tf->device & HIHI) | drive->select.all, |
89 | hwif->io_ports[IDE_SELECT_OFFSET]); | 89 | io_ports->device_addr); |
90 | } | 90 | } |
91 | 91 | ||
92 | int taskfile_lib_get_identify (ide_drive_t *drive, u8 *buf) | 92 | int taskfile_lib_get_identify (ide_drive_t *drive, u8 *buf) |
@@ -155,8 +155,7 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task) | |||
155 | switch (task->data_phase) { | 155 | switch (task->data_phase) { |
156 | case TASKFILE_MULTI_OUT: | 156 | case TASKFILE_MULTI_OUT: |
157 | case TASKFILE_OUT: | 157 | case TASKFILE_OUT: |
158 | hwif->OUTBSYNC(drive, tf->command, | 158 | hwif->OUTBSYNC(drive, tf->command, hwif->io_ports.command_addr); |
159 | hwif->io_ports[IDE_COMMAND_OFFSET]); | ||
160 | ndelay(400); /* FIXME */ | 159 | ndelay(400); /* FIXME */ |
161 | return pre_task_out_intr(drive, task->rq); | 160 | return pre_task_out_intr(drive, task->rq); |
162 | case TASKFILE_MULTI_IN: | 161 | case TASKFILE_MULTI_IN: |