aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-taskfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-taskfile.c')
-rw-r--r--drivers/ide/ide-taskfile.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 4c86a8d84b4c..155cc904f4eb 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -59,32 +59,34 @@ void ide_tf_load(ide_drive_t *drive, ide_task_t *task)
59 SELECT_MASK(drive, 0); 59 SELECT_MASK(drive, 0);
60 60
61 if (task->tf_flags & IDE_TFLAG_OUT_DATA) 61 if (task->tf_flags & IDE_TFLAG_OUT_DATA)
62 hwif->OUTW((tf->hob_data << 8) | tf->data, IDE_DATA_REG); 62 hwif->OUTW((tf->hob_data << 8) | tf->data,
63 hwif->io_ports[IDE_DATA_OFFSET]);
63 64
64 if (task->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE) 65 if (task->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE)
65 hwif->OUTB(tf->hob_feature, IDE_FEATURE_REG); 66 hwif->OUTB(tf->hob_feature, hwif->io_ports[IDE_FEATURE_OFFSET]);
66 if (task->tf_flags & IDE_TFLAG_OUT_HOB_NSECT) 67 if (task->tf_flags & IDE_TFLAG_OUT_HOB_NSECT)
67 hwif->OUTB(tf->hob_nsect, IDE_NSECTOR_REG); 68 hwif->OUTB(tf->hob_nsect, hwif->io_ports[IDE_NSECTOR_OFFSET]);
68 if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAL) 69 if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAL)
69 hwif->OUTB(tf->hob_lbal, IDE_SECTOR_REG); 70 hwif->OUTB(tf->hob_lbal, hwif->io_ports[IDE_SECTOR_OFFSET]);
70 if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAM) 71 if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAM)
71 hwif->OUTB(tf->hob_lbam, IDE_LCYL_REG); 72 hwif->OUTB(tf->hob_lbam, hwif->io_ports[IDE_LCYL_OFFSET]);
72 if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAH) 73 if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAH)
73 hwif->OUTB(tf->hob_lbah, IDE_HCYL_REG); 74 hwif->OUTB(tf->hob_lbah, hwif->io_ports[IDE_HCYL_OFFSET]);
74 75
75 if (task->tf_flags & IDE_TFLAG_OUT_FEATURE) 76 if (task->tf_flags & IDE_TFLAG_OUT_FEATURE)
76 hwif->OUTB(tf->feature, IDE_FEATURE_REG); 77 hwif->OUTB(tf->feature, hwif->io_ports[IDE_FEATURE_OFFSET]);
77 if (task->tf_flags & IDE_TFLAG_OUT_NSECT) 78 if (task->tf_flags & IDE_TFLAG_OUT_NSECT)
78 hwif->OUTB(tf->nsect, IDE_NSECTOR_REG); 79 hwif->OUTB(tf->nsect, hwif->io_ports[IDE_NSECTOR_OFFSET]);
79 if (task->tf_flags & IDE_TFLAG_OUT_LBAL) 80 if (task->tf_flags & IDE_TFLAG_OUT_LBAL)
80 hwif->OUTB(tf->lbal, IDE_SECTOR_REG); 81 hwif->OUTB(tf->lbal, hwif->io_ports[IDE_SECTOR_OFFSET]);
81 if (task->tf_flags & IDE_TFLAG_OUT_LBAM) 82 if (task->tf_flags & IDE_TFLAG_OUT_LBAM)
82 hwif->OUTB(tf->lbam, IDE_LCYL_REG); 83 hwif->OUTB(tf->lbam, hwif->io_ports[IDE_LCYL_OFFSET]);
83 if (task->tf_flags & IDE_TFLAG_OUT_LBAH) 84 if (task->tf_flags & IDE_TFLAG_OUT_LBAH)
84 hwif->OUTB(tf->lbah, IDE_HCYL_REG); 85 hwif->OUTB(tf->lbah, hwif->io_ports[IDE_HCYL_OFFSET]);
85 86
86 if (task->tf_flags & IDE_TFLAG_OUT_DEVICE) 87 if (task->tf_flags & IDE_TFLAG_OUT_DEVICE)
87 hwif->OUTB((tf->device & HIHI) | drive->select.all, IDE_SELECT_REG); 88 hwif->OUTB((tf->device & HIHI) | drive->select.all,
89 hwif->io_ports[IDE_SELECT_OFFSET]);
88} 90}
89 91
90int taskfile_lib_get_identify (ide_drive_t *drive, u8 *buf) 92int taskfile_lib_get_identify (ide_drive_t *drive, u8 *buf)
@@ -152,7 +154,8 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task)
152 switch (task->data_phase) { 154 switch (task->data_phase) {
153 case TASKFILE_MULTI_OUT: 155 case TASKFILE_MULTI_OUT:
154 case TASKFILE_OUT: 156 case TASKFILE_OUT:
155 hwif->OUTBSYNC(drive, tf->command, IDE_COMMAND_REG); 157 hwif->OUTBSYNC(drive, tf->command,
158 hwif->io_ports[IDE_COMMAND_OFFSET]);
156 ndelay(400); /* FIXME */ 159 ndelay(400); /* FIXME */
157 return pre_task_out_intr(drive, task->rq); 160 return pre_task_out_intr(drive, task->rq);
158 case TASKFILE_MULTI_IN: 161 case TASKFILE_MULTI_IN: