aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/tx4938ide.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/tx4938ide.c')
-rw-r--r--drivers/ide/tx4938ide.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/drivers/ide/tx4938ide.c b/drivers/ide/tx4938ide.c
index 6b51e0c58af7..947596d3620c 100644
--- a/drivers/ide/tx4938ide.c
+++ b/drivers/ide/tx4938ide.c
@@ -82,57 +82,57 @@ static void tx4938ide_outb(u8 value, unsigned long port)
82 __raw_writeb(value, (void __iomem *)port); 82 __raw_writeb(value, (void __iomem *)port);
83} 83}
84 84
85static void tx4938ide_tf_load(ide_drive_t *drive, ide_task_t *task) 85static void tx4938ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd)
86{ 86{
87 ide_hwif_t *hwif = drive->hwif; 87 ide_hwif_t *hwif = drive->hwif;
88 struct ide_io_ports *io_ports = &hwif->io_ports; 88 struct ide_io_ports *io_ports = &hwif->io_ports;
89 struct ide_taskfile *tf = &task->tf; 89 struct ide_taskfile *tf = &cmd->tf;
90 u8 HIHI = task->tf_flags & IDE_TFLAG_LBA48 ? 0xE0 : 0xEF; 90 u8 HIHI = cmd->tf_flags & IDE_TFLAG_LBA48 ? 0xE0 : 0xEF;
91 91
92 if (task->ftf_flags & IDE_FTFLAG_FLAGGED) 92 if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED)
93 HIHI = 0xFF; 93 HIHI = 0xFF;
94 94
95 if (task->ftf_flags & IDE_FTFLAG_OUT_DATA) { 95 if (cmd->ftf_flags & IDE_FTFLAG_OUT_DATA) {
96 u16 data = (tf->hob_data << 8) | tf->data; 96 u16 data = (tf->hob_data << 8) | tf->data;
97 97
98 /* no endian swap */ 98 /* no endian swap */
99 __raw_writew(data, (void __iomem *)io_ports->data_addr); 99 __raw_writew(data, (void __iomem *)io_ports->data_addr);
100 } 100 }
101 101
102 if (task->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE) 102 if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE)
103 tx4938ide_outb(tf->hob_feature, io_ports->feature_addr); 103 tx4938ide_outb(tf->hob_feature, io_ports->feature_addr);
104 if (task->tf_flags & IDE_TFLAG_OUT_HOB_NSECT) 104 if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT)
105 tx4938ide_outb(tf->hob_nsect, io_ports->nsect_addr); 105 tx4938ide_outb(tf->hob_nsect, io_ports->nsect_addr);
106 if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAL) 106 if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAL)
107 tx4938ide_outb(tf->hob_lbal, io_ports->lbal_addr); 107 tx4938ide_outb(tf->hob_lbal, io_ports->lbal_addr);
108 if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAM) 108 if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAM)
109 tx4938ide_outb(tf->hob_lbam, io_ports->lbam_addr); 109 tx4938ide_outb(tf->hob_lbam, io_ports->lbam_addr);
110 if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAH) 110 if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAH)
111 tx4938ide_outb(tf->hob_lbah, io_ports->lbah_addr); 111 tx4938ide_outb(tf->hob_lbah, io_ports->lbah_addr);
112 112
113 if (task->tf_flags & IDE_TFLAG_OUT_FEATURE) 113 if (cmd->tf_flags & IDE_TFLAG_OUT_FEATURE)
114 tx4938ide_outb(tf->feature, io_ports->feature_addr); 114 tx4938ide_outb(tf->feature, io_ports->feature_addr);
115 if (task->tf_flags & IDE_TFLAG_OUT_NSECT) 115 if (cmd->tf_flags & IDE_TFLAG_OUT_NSECT)
116 tx4938ide_outb(tf->nsect, io_ports->nsect_addr); 116 tx4938ide_outb(tf->nsect, io_ports->nsect_addr);
117 if (task->tf_flags & IDE_TFLAG_OUT_LBAL) 117 if (cmd->tf_flags & IDE_TFLAG_OUT_LBAL)
118 tx4938ide_outb(tf->lbal, io_ports->lbal_addr); 118 tx4938ide_outb(tf->lbal, io_ports->lbal_addr);
119 if (task->tf_flags & IDE_TFLAG_OUT_LBAM) 119 if (cmd->tf_flags & IDE_TFLAG_OUT_LBAM)
120 tx4938ide_outb(tf->lbam, io_ports->lbam_addr); 120 tx4938ide_outb(tf->lbam, io_ports->lbam_addr);
121 if (task->tf_flags & IDE_TFLAG_OUT_LBAH) 121 if (cmd->tf_flags & IDE_TFLAG_OUT_LBAH)
122 tx4938ide_outb(tf->lbah, io_ports->lbah_addr); 122 tx4938ide_outb(tf->lbah, io_ports->lbah_addr);
123 123
124 if (task->tf_flags & IDE_TFLAG_OUT_DEVICE) 124 if (cmd->tf_flags & IDE_TFLAG_OUT_DEVICE)
125 tx4938ide_outb((tf->device & HIHI) | drive->select, 125 tx4938ide_outb((tf->device & HIHI) | drive->select,
126 io_ports->device_addr); 126 io_ports->device_addr);
127} 127}
128 128
129static void tx4938ide_tf_read(ide_drive_t *drive, ide_task_t *task) 129static void tx4938ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
130{ 130{
131 ide_hwif_t *hwif = drive->hwif; 131 ide_hwif_t *hwif = drive->hwif;
132 struct ide_io_ports *io_ports = &hwif->io_ports; 132 struct ide_io_ports *io_ports = &hwif->io_ports;
133 struct ide_taskfile *tf = &task->tf; 133 struct ide_taskfile *tf = &cmd->tf;
134 134
135 if (task->ftf_flags & IDE_FTFLAG_IN_DATA) { 135 if (cmd->ftf_flags & IDE_FTFLAG_IN_DATA) {
136 u16 data; 136 u16 data;
137 137
138 /* no endian swap */ 138 /* no endian swap */
@@ -144,32 +144,32 @@ static void tx4938ide_tf_read(ide_drive_t *drive, ide_task_t *task)
144 /* be sure we're looking at the low order bits */ 144 /* be sure we're looking at the low order bits */
145 tx4938ide_outb(ATA_DEVCTL_OBS & ~0x80, io_ports->ctl_addr); 145 tx4938ide_outb(ATA_DEVCTL_OBS & ~0x80, io_ports->ctl_addr);
146 146
147 if (task->tf_flags & IDE_TFLAG_IN_FEATURE) 147 if (cmd->tf_flags & IDE_TFLAG_IN_FEATURE)
148 tf->feature = tx4938ide_inb(io_ports->feature_addr); 148 tf->feature = tx4938ide_inb(io_ports->feature_addr);
149 if (task->tf_flags & IDE_TFLAG_IN_NSECT) 149 if (cmd->tf_flags & IDE_TFLAG_IN_NSECT)
150 tf->nsect = tx4938ide_inb(io_ports->nsect_addr); 150 tf->nsect = tx4938ide_inb(io_ports->nsect_addr);
151 if (task->tf_flags & IDE_TFLAG_IN_LBAL) 151 if (cmd->tf_flags & IDE_TFLAG_IN_LBAL)
152 tf->lbal = tx4938ide_inb(io_ports->lbal_addr); 152 tf->lbal = tx4938ide_inb(io_ports->lbal_addr);
153 if (task->tf_flags & IDE_TFLAG_IN_LBAM) 153 if (cmd->tf_flags & IDE_TFLAG_IN_LBAM)
154 tf->lbam = tx4938ide_inb(io_ports->lbam_addr); 154 tf->lbam = tx4938ide_inb(io_ports->lbam_addr);
155 if (task->tf_flags & IDE_TFLAG_IN_LBAH) 155 if (cmd->tf_flags & IDE_TFLAG_IN_LBAH)
156 tf->lbah = tx4938ide_inb(io_ports->lbah_addr); 156 tf->lbah = tx4938ide_inb(io_ports->lbah_addr);
157 if (task->tf_flags & IDE_TFLAG_IN_DEVICE) 157 if (cmd->tf_flags & IDE_TFLAG_IN_DEVICE)
158 tf->device = tx4938ide_inb(io_ports->device_addr); 158 tf->device = tx4938ide_inb(io_ports->device_addr);
159 159
160 if (task->tf_flags & IDE_TFLAG_LBA48) { 160 if (cmd->tf_flags & IDE_TFLAG_LBA48) {
161 tx4938ide_outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr); 161 tx4938ide_outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr);
162 162
163 if (task->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) 163 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_FEATURE)
164 tf->hob_feature = 164 tf->hob_feature =
165 tx4938ide_inb(io_ports->feature_addr); 165 tx4938ide_inb(io_ports->feature_addr);
166 if (task->tf_flags & IDE_TFLAG_IN_HOB_NSECT) 166 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT)
167 tf->hob_nsect = tx4938ide_inb(io_ports->nsect_addr); 167 tf->hob_nsect = tx4938ide_inb(io_ports->nsect_addr);
168 if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAL) 168 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL)
169 tf->hob_lbal = tx4938ide_inb(io_ports->lbal_addr); 169 tf->hob_lbal = tx4938ide_inb(io_ports->lbal_addr);
170 if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAM) 170 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM)
171 tf->hob_lbam = tx4938ide_inb(io_ports->lbam_addr); 171 tf->hob_lbam = tx4938ide_inb(io_ports->lbam_addr);
172 if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAH) 172 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH)
173 tf->hob_lbah = tx4938ide_inb(io_ports->lbah_addr); 173 tf->hob_lbah = tx4938ide_inb(io_ports->lbah_addr);
174 } 174 }
175} 175}