aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-h8300.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-h8300.c')
-rw-r--r--drivers/ide/ide-h8300.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/drivers/ide/ide-h8300.c b/drivers/ide/ide-h8300.c
index 11e937485bff..c7883f23c66a 100644
--- a/drivers/ide/ide-h8300.c
+++ b/drivers/ide/ide-h8300.c
@@ -44,53 +44,53 @@ static u16 mm_inw(unsigned long a)
44 return r; 44 return r;
45} 45}
46 46
47static void h8300_tf_load(ide_drive_t *drive, ide_task_t *task) 47static void h8300_tf_load(ide_drive_t *drive, struct ide_cmd *cmd)
48{ 48{
49 ide_hwif_t *hwif = drive->hwif; 49 ide_hwif_t *hwif = drive->hwif;
50 struct ide_io_ports *io_ports = &hwif->io_ports; 50 struct ide_io_ports *io_ports = &hwif->io_ports;
51 struct ide_taskfile *tf = &task->tf; 51 struct ide_taskfile *tf = &cmd->tf;
52 u8 HIHI = (task->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF; 52 u8 HIHI = (cmd->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF;
53 53
54 if (task->ftf_flags & IDE_FTFLAG_FLAGGED) 54 if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED)
55 HIHI = 0xFF; 55 HIHI = 0xFF;
56 56
57 if (task->ftf_flags & IDE_FTFLAG_OUT_DATA) 57 if (cmd->ftf_flags & IDE_FTFLAG_OUT_DATA)
58 mm_outw((tf->hob_data << 8) | tf->data, io_ports->data_addr); 58 mm_outw((tf->hob_data << 8) | tf->data, io_ports->data_addr);
59 59
60 if (task->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE) 60 if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE)
61 outb(tf->hob_feature, io_ports->feature_addr); 61 outb(tf->hob_feature, io_ports->feature_addr);
62 if (task->tf_flags & IDE_TFLAG_OUT_HOB_NSECT) 62 if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT)
63 outb(tf->hob_nsect, io_ports->nsect_addr); 63 outb(tf->hob_nsect, io_ports->nsect_addr);
64 if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAL) 64 if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAL)
65 outb(tf->hob_lbal, io_ports->lbal_addr); 65 outb(tf->hob_lbal, io_ports->lbal_addr);
66 if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAM) 66 if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAM)
67 outb(tf->hob_lbam, io_ports->lbam_addr); 67 outb(tf->hob_lbam, io_ports->lbam_addr);
68 if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAH) 68 if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAH)
69 outb(tf->hob_lbah, io_ports->lbah_addr); 69 outb(tf->hob_lbah, io_ports->lbah_addr);
70 70
71 if (task->tf_flags & IDE_TFLAG_OUT_FEATURE) 71 if (cmd->tf_flags & IDE_TFLAG_OUT_FEATURE)
72 outb(tf->feature, io_ports->feature_addr); 72 outb(tf->feature, io_ports->feature_addr);
73 if (task->tf_flags & IDE_TFLAG_OUT_NSECT) 73 if (cmd->tf_flags & IDE_TFLAG_OUT_NSECT)
74 outb(tf->nsect, io_ports->nsect_addr); 74 outb(tf->nsect, io_ports->nsect_addr);
75 if (task->tf_flags & IDE_TFLAG_OUT_LBAL) 75 if (cmd->tf_flags & IDE_TFLAG_OUT_LBAL)
76 outb(tf->lbal, io_ports->lbal_addr); 76 outb(tf->lbal, io_ports->lbal_addr);
77 if (task->tf_flags & IDE_TFLAG_OUT_LBAM) 77 if (cmd->tf_flags & IDE_TFLAG_OUT_LBAM)
78 outb(tf->lbam, io_ports->lbam_addr); 78 outb(tf->lbam, io_ports->lbam_addr);
79 if (task->tf_flags & IDE_TFLAG_OUT_LBAH) 79 if (cmd->tf_flags & IDE_TFLAG_OUT_LBAH)
80 outb(tf->lbah, io_ports->lbah_addr); 80 outb(tf->lbah, io_ports->lbah_addr);
81 81
82 if (task->tf_flags & IDE_TFLAG_OUT_DEVICE) 82 if (cmd->tf_flags & IDE_TFLAG_OUT_DEVICE)
83 outb((tf->device & HIHI) | drive->select, 83 outb((tf->device & HIHI) | drive->select,
84 io_ports->device_addr); 84 io_ports->device_addr);
85} 85}
86 86
87static void h8300_tf_read(ide_drive_t *drive, ide_task_t *task) 87static void h8300_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
88{ 88{
89 ide_hwif_t *hwif = drive->hwif; 89 ide_hwif_t *hwif = drive->hwif;
90 struct ide_io_ports *io_ports = &hwif->io_ports; 90 struct ide_io_ports *io_ports = &hwif->io_ports;
91 struct ide_taskfile *tf = &task->tf; 91 struct ide_taskfile *tf = &cmd->tf;
92 92
93 if (task->ftf_flags & IDE_FTFLAG_IN_DATA) { 93 if (cmd->ftf_flags & IDE_FTFLAG_IN_DATA) {
94 u16 data = mm_inw(io_ports->data_addr); 94 u16 data = mm_inw(io_ports->data_addr);
95 95
96 tf->data = data & 0xff; 96 tf->data = data & 0xff;
@@ -100,31 +100,31 @@ static void h8300_tf_read(ide_drive_t *drive, ide_task_t *task)
100 /* be sure we're looking at the low order bits */ 100 /* be sure we're looking at the low order bits */
101 outb(ATA_DEVCTL_OBS & ~0x80, io_ports->ctl_addr); 101 outb(ATA_DEVCTL_OBS & ~0x80, io_ports->ctl_addr);
102 102
103 if (task->tf_flags & IDE_TFLAG_IN_FEATURE) 103 if (cmd->tf_flags & IDE_TFLAG_IN_FEATURE)
104 tf->feature = inb(io_ports->feature_addr); 104 tf->feature = inb(io_ports->feature_addr);
105 if (task->tf_flags & IDE_TFLAG_IN_NSECT) 105 if (cmd->tf_flags & IDE_TFLAG_IN_NSECT)
106 tf->nsect = inb(io_ports->nsect_addr); 106 tf->nsect = inb(io_ports->nsect_addr);
107 if (task->tf_flags & IDE_TFLAG_IN_LBAL) 107 if (cmd->tf_flags & IDE_TFLAG_IN_LBAL)
108 tf->lbal = inb(io_ports->lbal_addr); 108 tf->lbal = inb(io_ports->lbal_addr);
109 if (task->tf_flags & IDE_TFLAG_IN_LBAM) 109 if (cmd->tf_flags & IDE_TFLAG_IN_LBAM)
110 tf->lbam = inb(io_ports->lbam_addr); 110 tf->lbam = inb(io_ports->lbam_addr);
111 if (task->tf_flags & IDE_TFLAG_IN_LBAH) 111 if (cmd->tf_flags & IDE_TFLAG_IN_LBAH)
112 tf->lbah = inb(io_ports->lbah_addr); 112 tf->lbah = inb(io_ports->lbah_addr);
113 if (task->tf_flags & IDE_TFLAG_IN_DEVICE) 113 if (cmd->tf_flags & IDE_TFLAG_IN_DEVICE)
114 tf->device = inb(io_ports->device_addr); 114 tf->device = inb(io_ports->device_addr);
115 115
116 if (task->tf_flags & IDE_TFLAG_LBA48) { 116 if (cmd->tf_flags & IDE_TFLAG_LBA48) {
117 outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr); 117 outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr);
118 118
119 if (task->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) 119 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_FEATURE)
120 tf->hob_feature = inb(io_ports->feature_addr); 120 tf->hob_feature = inb(io_ports->feature_addr);
121 if (task->tf_flags & IDE_TFLAG_IN_HOB_NSECT) 121 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT)
122 tf->hob_nsect = inb(io_ports->nsect_addr); 122 tf->hob_nsect = inb(io_ports->nsect_addr);
123 if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAL) 123 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL)
124 tf->hob_lbal = inb(io_ports->lbal_addr); 124 tf->hob_lbal = inb(io_ports->lbal_addr);
125 if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAM) 125 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM)
126 tf->hob_lbam = inb(io_ports->lbam_addr); 126 tf->hob_lbam = inb(io_ports->lbam_addr);
127 if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAH) 127 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH)
128 tf->hob_lbah = inb(io_ports->lbah_addr); 128 tf->hob_lbah = inb(io_ports->lbah_addr);
129 } 129 }
130} 130}