aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_cmd64x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_cmd64x.c')
-rw-r--r--drivers/ata/pata_cmd64x.c96
1 files changed, 10 insertions, 86 deletions
diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c
index 6aea05cc0940..1ac8ecfb97e2 100644
--- a/drivers/ata/pata_cmd64x.c
+++ b/drivers/ata/pata_cmd64x.c
@@ -269,103 +269,27 @@ static struct scsi_host_template cmd64x_sht = {
269 ATA_BMDMA_SHT(DRV_NAME), 269 ATA_BMDMA_SHT(DRV_NAME),
270}; 270};
271 271
272static struct ata_port_operations cmd64x_port_ops = { 272static const struct ata_port_operations cmd64x_base_ops = {
273 .inherits = &ata_bmdma_port_ops,
273 .set_piomode = cmd64x_set_piomode, 274 .set_piomode = cmd64x_set_piomode,
274 .set_dmamode = cmd64x_set_dmamode, 275 .set_dmamode = cmd64x_set_dmamode,
275 .mode_filter = ata_pci_default_filter,
276 .tf_load = ata_tf_load,
277 .tf_read = ata_tf_read,
278 .check_status = ata_check_status,
279 .exec_command = ata_exec_command,
280 .dev_select = ata_std_dev_select,
281
282 .freeze = ata_bmdma_freeze,
283 .thaw = ata_bmdma_thaw,
284 .error_handler = ata_bmdma_error_handler,
285 .post_internal_cmd = ata_bmdma_post_internal_cmd,
286 .cable_detect = ata_cable_40wire,
287
288 .bmdma_setup = ata_bmdma_setup,
289 .bmdma_start = ata_bmdma_start,
290 .bmdma_stop = ata_bmdma_stop,
291 .bmdma_status = ata_bmdma_status,
292
293 .qc_prep = ata_qc_prep,
294 .qc_issue = ata_qc_issue_prot,
295
296 .data_xfer = ata_data_xfer,
297
298 .irq_handler = ata_interrupt,
299 .irq_clear = ata_bmdma_irq_clear,
300 .irq_on = ata_irq_on,
301
302 .port_start = ata_sff_port_start,
303}; 276};
304 277
305static struct ata_port_operations cmd646r1_port_ops = { 278static struct ata_port_operations cmd64x_port_ops = {
306 .set_piomode = cmd64x_set_piomode, 279 .inherits = &cmd64x_base_ops,
307 .set_dmamode = cmd64x_set_dmamode,
308 .mode_filter = ata_pci_default_filter,
309 .tf_load = ata_tf_load,
310 .tf_read = ata_tf_read,
311 .check_status = ata_check_status,
312 .exec_command = ata_exec_command,
313 .dev_select = ata_std_dev_select,
314
315 .freeze = ata_bmdma_freeze,
316 .thaw = ata_bmdma_thaw,
317 .error_handler = ata_bmdma_error_handler,
318 .post_internal_cmd = ata_bmdma_post_internal_cmd,
319 .cable_detect = ata_cable_40wire, 280 .cable_detect = ata_cable_40wire,
281};
320 282
321 .bmdma_setup = ata_bmdma_setup, 283static struct ata_port_operations cmd646r1_port_ops = {
322 .bmdma_start = ata_bmdma_start, 284 .inherits = &cmd64x_base_ops,
323 .bmdma_stop = cmd646r1_bmdma_stop, 285 .bmdma_stop = cmd646r1_bmdma_stop,
324 .bmdma_status = ata_bmdma_status, 286 .cable_detect = ata_cable_40wire,
325
326 .qc_prep = ata_qc_prep,
327 .qc_issue = ata_qc_issue_prot,
328
329 .data_xfer = ata_data_xfer,
330
331 .irq_handler = ata_interrupt,
332 .irq_clear = ata_bmdma_irq_clear,
333 .irq_on = ata_irq_on,
334
335 .port_start = ata_sff_port_start,
336}; 287};
337 288
338static struct ata_port_operations cmd648_port_ops = { 289static struct ata_port_operations cmd648_port_ops = {
339 .set_piomode = cmd64x_set_piomode, 290 .inherits = &cmd64x_base_ops,
340 .set_dmamode = cmd64x_set_dmamode,
341 .mode_filter = ata_pci_default_filter,
342 .tf_load = ata_tf_load,
343 .tf_read = ata_tf_read,
344 .check_status = ata_check_status,
345 .exec_command = ata_exec_command,
346 .dev_select = ata_std_dev_select,
347
348 .freeze = ata_bmdma_freeze,
349 .thaw = ata_bmdma_thaw,
350 .error_handler = ata_bmdma_error_handler,
351 .post_internal_cmd = ata_bmdma_post_internal_cmd,
352 .cable_detect = cmd648_cable_detect,
353
354 .bmdma_setup = ata_bmdma_setup,
355 .bmdma_start = ata_bmdma_start,
356 .bmdma_stop = cmd648_bmdma_stop, 291 .bmdma_stop = cmd648_bmdma_stop,
357 .bmdma_status = ata_bmdma_status, 292 .cable_detect = cmd648_cable_detect,
358
359 .qc_prep = ata_qc_prep,
360 .qc_issue = ata_qc_issue_prot,
361
362 .data_xfer = ata_data_xfer,
363
364 .irq_handler = ata_interrupt,
365 .irq_clear = ata_bmdma_irq_clear,
366 .irq_on = ata_irq_on,
367
368 .port_start = ata_sff_port_start,
369}; 293};
370 294
371static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id) 295static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)