Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ide-h8300: remove custom tf_{read|load}() methods

Since tf_{read|load}() methods of this driver have now become identical to their
standard counterparts using I/O port 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>

authored by

Sergei Shtylyov and committed by
Bartlomiej Zolnierkiewicz
cfd30daa 7636e455

+2 -77
+2 -77
drivers/ide/ide-h8300.c
··· 22 22 (r); \ 23 23 }) 24 24 25 - static void h8300_tf_load(ide_drive_t *drive, struct ide_cmd *cmd) 26 - { 27 - ide_hwif_t *hwif = drive->hwif; 28 - struct ide_io_ports *io_ports = &hwif->io_ports; 29 - struct ide_taskfile *tf = &cmd->tf; 30 - u8 HIHI = (cmd->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF; 31 - 32 - if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED) 33 - HIHI = 0xFF; 34 - 35 - if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE) 36 - outb(tf->hob_feature, io_ports->feature_addr); 37 - if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT) 38 - outb(tf->hob_nsect, io_ports->nsect_addr); 39 - if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAL) 40 - outb(tf->hob_lbal, io_ports->lbal_addr); 41 - if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAM) 42 - outb(tf->hob_lbam, io_ports->lbam_addr); 43 - if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAH) 44 - outb(tf->hob_lbah, io_ports->lbah_addr); 45 - 46 - if (cmd->tf_flags & IDE_TFLAG_OUT_FEATURE) 47 - outb(tf->feature, io_ports->feature_addr); 48 - if (cmd->tf_flags & IDE_TFLAG_OUT_NSECT) 49 - outb(tf->nsect, io_ports->nsect_addr); 50 - if (cmd->tf_flags & IDE_TFLAG_OUT_LBAL) 51 - outb(tf->lbal, io_ports->lbal_addr); 52 - if (cmd->tf_flags & IDE_TFLAG_OUT_LBAM) 53 - outb(tf->lbam, io_ports->lbam_addr); 54 - if (cmd->tf_flags & IDE_TFLAG_OUT_LBAH) 55 - outb(tf->lbah, io_ports->lbah_addr); 56 - 57 - if (cmd->tf_flags & IDE_TFLAG_OUT_DEVICE) 58 - outb((tf->device & HIHI) | drive->select, 59 - io_ports->device_addr); 60 - } 61 - 62 - static void h8300_tf_read(ide_drive_t *drive, struct ide_cmd *cmd) 63 - { 64 - ide_hwif_t *hwif = drive->hwif; 65 - struct ide_io_ports *io_ports = &hwif->io_ports; 66 - struct ide_taskfile *tf = &cmd->tf; 67 - 68 - /* be sure we're looking at the low order bits */ 69 - outb(ATA_DEVCTL_OBS, io_ports->ctl_addr); 70 - 71 - if (cmd->tf_flags & IDE_TFLAG_IN_ERROR) 72 - tf->error = inb(io_ports->feature_addr); 73 - if (cmd->tf_flags & IDE_TFLAG_IN_NSECT) 74 - tf->nsect = inb(io_ports->nsect_addr); 75 - if (cmd->tf_flags & IDE_TFLAG_IN_LBAL) 76 - tf->lbal = inb(io_ports->lbal_addr); 77 - if (cmd->tf_flags & IDE_TFLAG_IN_LBAM) 78 - tf->lbam = inb(io_ports->lbam_addr); 79 - if (cmd->tf_flags & IDE_TFLAG_IN_LBAH) 80 - tf->lbah = inb(io_ports->lbah_addr); 81 - if (cmd->tf_flags & IDE_TFLAG_IN_DEVICE) 82 - tf->device = inb(io_ports->device_addr); 83 - 84 - if (cmd->tf_flags & IDE_TFLAG_LBA48) { 85 - outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr); 86 - 87 - if (cmd->tf_flags & IDE_TFLAG_IN_HOB_ERROR) 88 - tf->hob_error = inb(io_ports->feature_addr); 89 - if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT) 90 - tf->hob_nsect = inb(io_ports->nsect_addr); 91 - if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL) 92 - tf->hob_lbal = inb(io_ports->lbal_addr); 93 - if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM) 94 - tf->hob_lbam = inb(io_ports->lbam_addr); 95 - if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH) 96 - tf->hob_lbah = inb(io_ports->lbah_addr); 97 - } 98 - } 99 - 100 25 static void mm_outsw(unsigned long addr, void *buf, u32 len) 101 26 { 102 27 unsigned short *bp = (unsigned short *)buf; ··· 55 130 .write_devctl = ide_write_devctl, 56 131 57 132 .dev_select = ide_dev_select, 58 - .tf_load = h8300_tf_load, 59 - .tf_read = h8300_tf_read, 133 + .tf_load = ide_tf_load, 134 + .tf_read = ide_tf_read, 60 135 61 136 .input_data = h8300_input_data, 62 137 .output_data = h8300_output_data,