diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2009-04-08 08:12:51 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-04-08 08:12:51 -0400 |
commit | 7636e455ea00755b863340570eb47a3652624da3 (patch) | |
tree | 95cfaa3ac290d98bf0be4ff3eb8797ab2c7fba9e /drivers | |
parent | add4d9a9838fc9a3b3d1886b6ce96cfc08386e9b (diff) |
at91_ide: remove custom tf_{read|load}() methods
Since tf_{read|load}() methods of this driver have now become identical to their
standard counterparts using MMIO accesses, there's no need to override those
anymore...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/at91_ide.c | 78 |
1 files changed, 2 insertions, 76 deletions
diff --git a/drivers/ide/at91_ide.c b/drivers/ide/at91_ide.c index 8eda552326e9..c035bb0fc0a2 100644 --- a/drivers/ide/at91_ide.c +++ b/drivers/ide/at91_ide.c | |||
@@ -185,80 +185,6 @@ static void ide_mm_outb(u8 value, unsigned long port) | |||
185 | writeb(value, (void __iomem *) port); | 185 | writeb(value, (void __iomem *) port); |
186 | } | 186 | } |
187 | 187 | ||
188 | static void at91_ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd) | ||
189 | { | ||
190 | ide_hwif_t *hwif = drive->hwif; | ||
191 | struct ide_io_ports *io_ports = &hwif->io_ports; | ||
192 | struct ide_taskfile *tf = &cmd->tf; | ||
193 | u8 HIHI = (cmd->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF; | ||
194 | |||
195 | if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED) | ||
196 | HIHI = 0xFF; | ||
197 | |||
198 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE) | ||
199 | ide_mm_outb(tf->hob_feature, io_ports->feature_addr); | ||
200 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT) | ||
201 | ide_mm_outb(tf->hob_nsect, io_ports->nsect_addr); | ||
202 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAL) | ||
203 | ide_mm_outb(tf->hob_lbal, io_ports->lbal_addr); | ||
204 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAM) | ||
205 | ide_mm_outb(tf->hob_lbam, io_ports->lbam_addr); | ||
206 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAH) | ||
207 | ide_mm_outb(tf->hob_lbah, io_ports->lbah_addr); | ||
208 | |||
209 | if (cmd->tf_flags & IDE_TFLAG_OUT_FEATURE) | ||
210 | ide_mm_outb(tf->feature, io_ports->feature_addr); | ||
211 | if (cmd->tf_flags & IDE_TFLAG_OUT_NSECT) | ||
212 | ide_mm_outb(tf->nsect, io_ports->nsect_addr); | ||
213 | if (cmd->tf_flags & IDE_TFLAG_OUT_LBAL) | ||
214 | ide_mm_outb(tf->lbal, io_ports->lbal_addr); | ||
215 | if (cmd->tf_flags & IDE_TFLAG_OUT_LBAM) | ||
216 | ide_mm_outb(tf->lbam, io_ports->lbam_addr); | ||
217 | if (cmd->tf_flags & IDE_TFLAG_OUT_LBAH) | ||
218 | ide_mm_outb(tf->lbah, io_ports->lbah_addr); | ||
219 | |||
220 | if (cmd->tf_flags & IDE_TFLAG_OUT_DEVICE) | ||
221 | ide_mm_outb((tf->device & HIHI) | drive->select, io_ports->device_addr); | ||
222 | } | ||
223 | |||
224 | static void at91_ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd) | ||
225 | { | ||
226 | ide_hwif_t *hwif = drive->hwif; | ||
227 | struct ide_io_ports *io_ports = &hwif->io_ports; | ||
228 | struct ide_taskfile *tf = &cmd->tf; | ||
229 | |||
230 | /* be sure we're looking at the low order bits */ | ||
231 | ide_mm_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr); | ||
232 | |||
233 | if (cmd->tf_flags & IDE_TFLAG_IN_ERROR) | ||
234 | tf->error = ide_mm_inb(io_ports->feature_addr); | ||
235 | if (cmd->tf_flags & IDE_TFLAG_IN_NSECT) | ||
236 | tf->nsect = ide_mm_inb(io_ports->nsect_addr); | ||
237 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAL) | ||
238 | tf->lbal = ide_mm_inb(io_ports->lbal_addr); | ||
239 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAM) | ||
240 | tf->lbam = ide_mm_inb(io_ports->lbam_addr); | ||
241 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAH) | ||
242 | tf->lbah = ide_mm_inb(io_ports->lbah_addr); | ||
243 | if (cmd->tf_flags & IDE_TFLAG_IN_DEVICE) | ||
244 | tf->device = ide_mm_inb(io_ports->device_addr); | ||
245 | |||
246 | if (cmd->tf_flags & IDE_TFLAG_LBA48) { | ||
247 | ide_mm_outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr); | ||
248 | |||
249 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_ERROR) | ||
250 | tf->hob_error = ide_mm_inb(io_ports->feature_addr); | ||
251 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT) | ||
252 | tf->hob_nsect = ide_mm_inb(io_ports->nsect_addr); | ||
253 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL) | ||
254 | tf->hob_lbal = ide_mm_inb(io_ports->lbal_addr); | ||
255 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM) | ||
256 | tf->hob_lbam = ide_mm_inb(io_ports->lbam_addr); | ||
257 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH) | ||
258 | tf->hob_lbah = ide_mm_inb(io_ports->lbah_addr); | ||
259 | } | ||
260 | } | ||
261 | |||
262 | static void at91_ide_set_pio_mode(ide_drive_t *drive, const u8 pio) | 188 | static void at91_ide_set_pio_mode(ide_drive_t *drive, const u8 pio) |
263 | { | 189 | { |
264 | struct ide_timing *timing; | 190 | struct ide_timing *timing; |
@@ -284,8 +210,8 @@ static const struct ide_tp_ops at91_ide_tp_ops = { | |||
284 | .write_devctl = ide_write_devctl, | 210 | .write_devctl = ide_write_devctl, |
285 | 211 | ||
286 | .dev_select = ide_dev_select, | 212 | .dev_select = ide_dev_select, |
287 | .tf_load = at91_ide_tf_load, | 213 | .tf_load = ide_tf_load, |
288 | .tf_read = at91_ide_tf_read, | 214 | .tf_read = ide_tf_read, |
289 | 215 | ||
290 | .input_data = at91_ide_input_data, | 216 | .input_data = at91_ide_input_data, |
291 | .output_data = at91_ide_output_data, | 217 | .output_data = at91_ide_output_data, |