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 | cfd30daa0d6cbdb0bbc2bc40a10097231b23b204 (patch) | |
tree | ec780686e29499656d3faf95dc457e6b52474dc5 /drivers/ide/ide-h8300.c | |
parent | 7636e455ea00755b863340570eb47a3652624da3 (diff) |
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>
Diffstat (limited to 'drivers/ide/ide-h8300.c')
-rw-r--r-- | drivers/ide/ide-h8300.c | 79 |
1 files changed, 2 insertions, 77 deletions
diff --git a/drivers/ide/ide-h8300.c b/drivers/ide/ide-h8300.c index 8a064d710bcf..c06ebdc4a130 100644 --- a/drivers/ide/ide-h8300.c +++ b/drivers/ide/ide-h8300.c | |||
@@ -22,81 +22,6 @@ | |||
22 | (r); \ | 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 | static void mm_outsw(unsigned long addr, void *buf, u32 len) | 25 | static void mm_outsw(unsigned long addr, void *buf, u32 len) |
101 | { | 26 | { |
102 | unsigned short *bp = (unsigned short *)buf; | 27 | unsigned short *bp = (unsigned short *)buf; |
@@ -130,8 +55,8 @@ static const struct ide_tp_ops h8300_tp_ops = { | |||
130 | .write_devctl = ide_write_devctl, | 55 | .write_devctl = ide_write_devctl, |
131 | 56 | ||
132 | .dev_select = ide_dev_select, | 57 | .dev_select = ide_dev_select, |
133 | .tf_load = h8300_tf_load, | 58 | .tf_load = ide_tf_load, |
134 | .tf_read = h8300_tf_read, | 59 | .tf_read = ide_tf_read, |
135 | 60 | ||
136 | .input_data = h8300_input_data, | 61 | .input_data = h8300_input_data, |
137 | .output_data = h8300_output_data, | 62 | .output_data = h8300_output_data, |