diff options
Diffstat (limited to 'drivers/ide/h8300/ide-h8300.c')
-rw-r--r-- | drivers/ide/h8300/ide-h8300.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/drivers/ide/h8300/ide-h8300.c b/drivers/ide/h8300/ide-h8300.c index 0795d6554913..84644e150531 100644 --- a/drivers/ide/h8300/ide-h8300.c +++ b/drivers/ide/h8300/ide-h8300.c | |||
@@ -155,6 +155,21 @@ static void h8300_output_data(ide_drive_t *drive, struct request *rq, | |||
155 | mm_outsw(drive->hwif->io_ports.data_addr, buf, (len + 1) / 2); | 155 | mm_outsw(drive->hwif->io_ports.data_addr, buf, (len + 1) / 2); |
156 | } | 156 | } |
157 | 157 | ||
158 | static const struct ide_tp_ops h8300_tp_ops = { | ||
159 | .exec_command = ide_exec_command, | ||
160 | .read_status = ide_read_status, | ||
161 | .read_altstatus = ide_read_altstatus, | ||
162 | .read_sff_dma_status = ide_read_sff_dma_status, | ||
163 | |||
164 | .set_irq = ide_set_irq, | ||
165 | |||
166 | .tf_load = h8300_tf_load, | ||
167 | .tf_read = h8300_tf_read, | ||
168 | |||
169 | .input_data = h8300_input_data, | ||
170 | .output_data = h8300_output_data, | ||
171 | }; | ||
172 | |||
158 | #define H8300_IDE_GAP (2) | 173 | #define H8300_IDE_GAP (2) |
159 | 174 | ||
160 | static inline void hw_setup(hw_regs_t *hw) | 175 | static inline void hw_setup(hw_regs_t *hw) |
@@ -169,16 +184,8 @@ static inline void hw_setup(hw_regs_t *hw) | |||
169 | hw->chipset = ide_generic; | 184 | hw->chipset = ide_generic; |
170 | } | 185 | } |
171 | 186 | ||
172 | static inline void hwif_setup(ide_hwif_t *hwif) | ||
173 | { | ||
174 | hwif->tf_load = h8300_tf_load; | ||
175 | hwif->tf_read = h8300_tf_read; | ||
176 | |||
177 | hwif->input_data = h8300_input_data; | ||
178 | hwif->output_data = h8300_output_data; | ||
179 | } | ||
180 | |||
181 | static const struct ide_port_info h8300_port_info = { | 187 | static const struct ide_port_info h8300_port_info = { |
188 | .tp_ops = &h8300_tp_ops, | ||
182 | .host_flags = IDE_HFLAG_NO_IO_32BIT | IDE_HFLAG_NO_DMA, | 189 | .host_flags = IDE_HFLAG_NO_IO_32BIT | IDE_HFLAG_NO_DMA, |
183 | }; | 190 | }; |
184 | 191 | ||
@@ -205,7 +212,6 @@ static int __init h8300_ide_init(void) | |||
205 | return -ENOENT; | 212 | return -ENOENT; |
206 | 213 | ||
207 | index = hwif->index; | 214 | index = hwif->index; |
208 | hwif_setup(hwif); | ||
209 | 215 | ||
210 | idx[0] = index; | 216 | idx[0] = index; |
211 | 217 | ||