diff options
Diffstat (limited to 'drivers/ata/pata_ali.c')
-rw-r--r-- | drivers/ata/pata_ali.c | 122 |
1 files changed, 12 insertions, 110 deletions
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c index f3d6d9b345ba..b00a9cf72c31 100644 --- a/drivers/ata/pata_ali.c +++ b/drivers/ata/pata_ali.c | |||
@@ -347,29 +347,15 @@ static struct scsi_host_template ali_sht = { | |||
347 | */ | 347 | */ |
348 | 348 | ||
349 | static struct ata_port_operations ali_early_port_ops = { | 349 | static struct ata_port_operations ali_early_port_ops = { |
350 | .set_piomode = ali_set_piomode, | 350 | .inherits = &ata_sff_port_ops, |
351 | .tf_load = ata_tf_load, | ||
352 | .tf_read = ata_tf_read, | ||
353 | .check_status = ata_check_status, | ||
354 | .exec_command = ata_exec_command, | ||
355 | .dev_select = ata_std_dev_select, | ||
356 | |||
357 | .freeze = ata_bmdma_freeze, | ||
358 | .thaw = ata_bmdma_thaw, | ||
359 | .error_handler = ata_bmdma_error_handler, | ||
360 | .post_internal_cmd = ata_bmdma_post_internal_cmd, | ||
361 | .cable_detect = ata_cable_40wire, | 351 | .cable_detect = ata_cable_40wire, |
352 | .set_piomode = ali_set_piomode, | ||
353 | }; | ||
362 | 354 | ||
363 | .qc_prep = ata_qc_prep, | 355 | static const struct ata_port_operations ali_dma_base_ops = { |
364 | .qc_issue = ata_qc_issue_prot, | 356 | .inherits = &ata_bmdma_port_ops, |
365 | 357 | .set_piomode = ali_set_piomode, | |
366 | .data_xfer = ata_data_xfer, | 358 | .set_dmamode = ali_set_dmamode, |
367 | |||
368 | .irq_handler = ata_interrupt, | ||
369 | .irq_clear = ata_noop_irq_clear, | ||
370 | .irq_on = ata_irq_on, | ||
371 | |||
372 | .port_start = ata_sff_port_start, | ||
373 | }; | 359 | }; |
374 | 360 | ||
375 | /* | 361 | /* |
@@ -377,115 +363,31 @@ static struct ata_port_operations ali_early_port_ops = { | |||
377 | * detect | 363 | * detect |
378 | */ | 364 | */ |
379 | static struct ata_port_operations ali_20_port_ops = { | 365 | static struct ata_port_operations ali_20_port_ops = { |
380 | .set_piomode = ali_set_piomode, | 366 | .inherits = &ali_dma_base_ops, |
381 | .set_dmamode = ali_set_dmamode, | 367 | .cable_detect = ata_cable_40wire, |
382 | .mode_filter = ali_20_filter, | 368 | .mode_filter = ali_20_filter, |
383 | |||
384 | .tf_load = ata_tf_load, | ||
385 | .tf_read = ata_tf_read, | ||
386 | .check_atapi_dma = ali_check_atapi_dma, | 369 | .check_atapi_dma = ali_check_atapi_dma, |
387 | .check_status = ata_check_status, | ||
388 | .exec_command = ata_exec_command, | ||
389 | .dev_select = ata_std_dev_select, | ||
390 | .dev_config = ali_lock_sectors, | 370 | .dev_config = ali_lock_sectors, |
391 | |||
392 | .freeze = ata_bmdma_freeze, | ||
393 | .thaw = ata_bmdma_thaw, | ||
394 | .error_handler = ata_bmdma_error_handler, | ||
395 | .post_internal_cmd = ata_bmdma_post_internal_cmd, | ||
396 | .cable_detect = ata_cable_40wire, | ||
397 | |||
398 | .bmdma_setup = ata_bmdma_setup, | ||
399 | .bmdma_start = ata_bmdma_start, | ||
400 | .bmdma_stop = ata_bmdma_stop, | ||
401 | .bmdma_status = ata_bmdma_status, | ||
402 | |||
403 | .qc_prep = ata_qc_prep, | ||
404 | .qc_issue = ata_qc_issue_prot, | ||
405 | |||
406 | .data_xfer = ata_data_xfer, | ||
407 | |||
408 | .irq_handler = ata_interrupt, | ||
409 | .irq_clear = ata_bmdma_irq_clear, | ||
410 | .irq_on = ata_irq_on, | ||
411 | |||
412 | .port_start = ata_sff_port_start, | ||
413 | }; | 371 | }; |
414 | 372 | ||
415 | /* | 373 | /* |
416 | * Port operations for DMA capable ALi with cable detect | 374 | * Port operations for DMA capable ALi with cable detect |
417 | */ | 375 | */ |
418 | static struct ata_port_operations ali_c2_port_ops = { | 376 | static struct ata_port_operations ali_c2_port_ops = { |
419 | .set_piomode = ali_set_piomode, | 377 | .inherits = &ali_dma_base_ops, |
420 | .set_dmamode = ali_set_dmamode, | ||
421 | .mode_filter = ata_pci_default_filter, | ||
422 | .tf_load = ata_tf_load, | ||
423 | .tf_read = ata_tf_read, | ||
424 | .check_atapi_dma = ali_check_atapi_dma, | 378 | .check_atapi_dma = ali_check_atapi_dma, |
425 | .check_status = ata_check_status, | ||
426 | .exec_command = ata_exec_command, | ||
427 | .dev_select = ata_std_dev_select, | ||
428 | .dev_config = ali_lock_sectors, | ||
429 | |||
430 | .freeze = ata_bmdma_freeze, | ||
431 | .thaw = ata_bmdma_thaw, | ||
432 | .error_handler = ata_bmdma_error_handler, | ||
433 | .post_internal_cmd = ata_bmdma_post_internal_cmd, | ||
434 | .cable_detect = ali_c2_cable_detect, | 379 | .cable_detect = ali_c2_cable_detect, |
435 | 380 | .dev_config = ali_lock_sectors, | |
436 | .bmdma_setup = ata_bmdma_setup, | ||
437 | .bmdma_start = ata_bmdma_start, | ||
438 | .bmdma_stop = ata_bmdma_stop, | ||
439 | .bmdma_status = ata_bmdma_status, | ||
440 | |||
441 | .qc_prep = ata_qc_prep, | ||
442 | .qc_issue = ata_qc_issue_prot, | ||
443 | |||
444 | .data_xfer = ata_data_xfer, | ||
445 | |||
446 | .irq_handler = ata_interrupt, | ||
447 | .irq_clear = ata_bmdma_irq_clear, | ||
448 | .irq_on = ata_irq_on, | ||
449 | |||
450 | .port_start = ata_sff_port_start, | ||
451 | }; | 381 | }; |
452 | 382 | ||
453 | /* | 383 | /* |
454 | * Port operations for DMA capable ALi with cable detect and LBA48 | 384 | * Port operations for DMA capable ALi with cable detect and LBA48 |
455 | */ | 385 | */ |
456 | static struct ata_port_operations ali_c5_port_ops = { | 386 | static struct ata_port_operations ali_c5_port_ops = { |
457 | .set_piomode = ali_set_piomode, | 387 | .inherits = &ali_dma_base_ops, |
458 | .set_dmamode = ali_set_dmamode, | ||
459 | .mode_filter = ata_pci_default_filter, | ||
460 | .tf_load = ata_tf_load, | ||
461 | .tf_read = ata_tf_read, | ||
462 | .check_atapi_dma = ali_check_atapi_dma, | 388 | .check_atapi_dma = ali_check_atapi_dma, |
463 | .check_status = ata_check_status, | ||
464 | .exec_command = ata_exec_command, | ||
465 | .dev_select = ata_std_dev_select, | ||
466 | .dev_config = ali_warn_atapi_dma, | 389 | .dev_config = ali_warn_atapi_dma, |
467 | |||
468 | .freeze = ata_bmdma_freeze, | ||
469 | .thaw = ata_bmdma_thaw, | ||
470 | .error_handler = ata_bmdma_error_handler, | ||
471 | .post_internal_cmd = ata_bmdma_post_internal_cmd, | ||
472 | .cable_detect = ali_c2_cable_detect, | 390 | .cable_detect = ali_c2_cable_detect, |
473 | |||
474 | .bmdma_setup = ata_bmdma_setup, | ||
475 | .bmdma_start = ata_bmdma_start, | ||
476 | .bmdma_stop = ata_bmdma_stop, | ||
477 | .bmdma_status = ata_bmdma_status, | ||
478 | |||
479 | .qc_prep = ata_qc_prep, | ||
480 | .qc_issue = ata_qc_issue_prot, | ||
481 | |||
482 | .data_xfer = ata_data_xfer, | ||
483 | |||
484 | .irq_handler = ata_interrupt, | ||
485 | .irq_clear = ata_bmdma_irq_clear, | ||
486 | .irq_on = ata_irq_on, | ||
487 | |||
488 | .port_start = ata_sff_port_start, | ||
489 | }; | 391 | }; |
490 | 392 | ||
491 | 393 | ||