diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-01 10:02:15 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-01 10:02:15 -0700 |
commit | c09bca786ff941ed17c5f381c4eca5b106808c51 (patch) | |
tree | 9b79a2f2d3ac441551c9c367f22e2240040c4ef6 /drivers/ide/at91_ide.c | |
parent | e76e5b2c663ac74ae6a542ac20795c625e36a5cd (diff) | |
parent | 5b6c942dd1f13835eff8105ec2aa859544a1498d (diff) | |
download | linux-3.10-c09bca786ff941ed17c5f381c4eca5b106808c51.tar.gz linux-3.10-c09bca786ff941ed17c5f381c4eca5b106808c51.tar.bz2 linux-3.10-c09bca786ff941ed17c5f381c4eca5b106808c51.zip |
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: (59 commits)
ide-floppy: do not complete rq's prematurely
ide: be able to build pmac driver without IDE built-in
ide-pmac: IDE cable detection on Apple PowerBook
ide: inline SELECT_DRIVE()
ide: turn selectproc() method into dev_select() method (take 5)
MAINTAINERS: move old ide-{floppy,tape} entries to CREDITS (take 2)
ide: move data register access out of tf_{read|load}() methods (take 2)
ide: call {in|out}put_data() methods from tf_{read|load}() methods (take 2)
ide-io-std: shorten ide_{in|out}put_data()
ide: rename IDE_TFLAG_IN_[HOB_]FEATURE
ide: turn set_irq() method into write_devctl() method
ide: use ATA_HOB
ide-disk: use ATA_ERR
ide: add support for CFA specified transfer modes (take 3)
ide-iops: only clear DMA words on setting DMA mode
ide: identify data word 53 bit 1 doesn't cover words 62 and 63 (take 3)
au1xxx-ide: auide_{in|out}sw() should be static
ide-floppy: use ide_pio_bytes()
ide-{floppy,tape}: fix padding for PIO transfers
ide: remove CONFIG_BLK_DEV_IDEDOUBLER config option
...
Diffstat (limited to 'drivers/ide/at91_ide.c')
-rw-r--r-- | drivers/ide/at91_ide.c | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/drivers/ide/at91_ide.c b/drivers/ide/at91_ide.c index 27547121daf..8eda552326e 100644 --- a/drivers/ide/at91_ide.c +++ b/drivers/ide/at91_ide.c @@ -192,15 +192,9 @@ static void at91_ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd) struct ide_taskfile *tf = &cmd->tf; u8 HIHI = (cmd->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF; - if (cmd->tf_flags & IDE_FTFLAG_FLAGGED) + if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED) HIHI = 0xFF; - if (cmd->tf_flags & IDE_FTFLAG_OUT_DATA) { - u16 data = (tf->hob_data << 8) | tf->data; - - at91_ide_output_data(drive, NULL, &data, 2); - } - if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE) ide_mm_outb(tf->hob_feature, io_ports->feature_addr); if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT) @@ -233,19 +227,11 @@ static void at91_ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd) struct ide_io_ports *io_ports = &hwif->io_ports; struct ide_taskfile *tf = &cmd->tf; - if (cmd->tf_flags & IDE_FTFLAG_IN_DATA) { - u16 data; - - at91_ide_input_data(drive, NULL, &data, 2); - tf->data = data & 0xff; - tf->hob_data = (data >> 8) & 0xff; - } - /* be sure we're looking at the low order bits */ - ide_mm_outb(ATA_DEVCTL_OBS & ~0x80, io_ports->ctl_addr); + ide_mm_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr); - if (cmd->tf_flags & IDE_TFLAG_IN_FEATURE) - tf->feature = ide_mm_inb(io_ports->feature_addr); + if (cmd->tf_flags & IDE_TFLAG_IN_ERROR) + tf->error = ide_mm_inb(io_ports->feature_addr); if (cmd->tf_flags & IDE_TFLAG_IN_NSECT) tf->nsect = ide_mm_inb(io_ports->nsect_addr); if (cmd->tf_flags & IDE_TFLAG_IN_LBAL) @@ -258,18 +244,18 @@ static void at91_ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd) tf->device = ide_mm_inb(io_ports->device_addr); if (cmd->tf_flags & IDE_TFLAG_LBA48) { - ide_mm_outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr); + ide_mm_outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr); - if (cmd->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) - tf->hob_feature = ide_mm_inb(io_ports->feature_addr); + if (cmd->tf_flags & IDE_TFLAG_IN_HOB_ERROR) + tf->hob_error = ide_mm_inb(io_ports->feature_addr); if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT) - tf->hob_nsect = ide_mm_inb(io_ports->nsect_addr); + tf->hob_nsect = ide_mm_inb(io_ports->nsect_addr); if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL) - tf->hob_lbal = ide_mm_inb(io_ports->lbal_addr); + tf->hob_lbal = ide_mm_inb(io_ports->lbal_addr); if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM) - tf->hob_lbam = ide_mm_inb(io_ports->lbam_addr); + tf->hob_lbam = ide_mm_inb(io_ports->lbam_addr); if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH) - tf->hob_lbah = ide_mm_inb(io_ports->lbah_addr); + tf->hob_lbah = ide_mm_inb(io_ports->lbah_addr); } } @@ -295,8 +281,9 @@ static const struct ide_tp_ops at91_ide_tp_ops = { .exec_command = ide_exec_command, .read_status = ide_read_status, .read_altstatus = ide_read_altstatus, - .set_irq = ide_set_irq, + .write_devctl = ide_write_devctl, + .dev_select = ide_dev_select, .tf_load = at91_ide_tf_load, .tf_read = at91_ide_tf_read, |