aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/scc_pata.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-23 13:55:56 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-23 13:55:56 -0400
commit374e042c3e767ac2e5a40b78529220e0b3de793c (patch)
tree433d258f6da9783f0cb34234af9c359353f531fe /drivers/ide/pci/scc_pata.c
parentd6276b5f5cc7508124de291f3ed59c6945c17ae7 (diff)
ide: add struct ide_tp_ops (take 2)
* Add struct ide_tp_ops for transport methods. * Add 'const struct ide_tp_ops *tp_ops' to struct ide_port_info and ide_hwif_t. * Set the default hwif->tp_ops in ide_init_port_data(). * Set host driver specific hwif->tp_ops in ide_init_port(). * Export ide_exec_command(), ide_read_status(), ide_read_altstatus(), ide_read_sff_dma_status(), ide_set_irq(), ide_tf_{load,read}() and ata_{in,out}put_data(). * Convert host drivers and core code to use struct ide_tp_ops. * Remove no longer needed default_hwif_transport(). * Cleanup ide_hwif_t from methods that are now in struct ide_tp_ops. While at it: * Use struct ide_port_info in falconide.c and q40ide.c. * Rename ata_{in,out}put_data() to ide_{in,out}put_data(). v2: * Fix missing convertion in ns87415.c. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/scc_pata.c')
-rw-r--r--drivers/ide/pci/scc_pata.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c
index 38765d9b0314..5b1a0e950dfd 100644
--- a/drivers/ide/pci/scc_pata.c
+++ b/drivers/ide/pci/scc_pata.c
@@ -808,19 +808,6 @@ static void __devinit init_mmio_iops_scc(ide_hwif_t *hwif)
808 808
809 ide_set_hwifdata(hwif, ports); 809 ide_set_hwifdata(hwif, ports);
810 810
811 hwif->exec_command = scc_exec_command;
812 hwif->read_status = scc_read_status;
813 hwif->read_altstatus = scc_read_altstatus;
814 hwif->read_sff_dma_status = scc_read_sff_dma_status;
815
816 hwif->set_irq = scc_set_irq;
817
818 hwif->tf_load = scc_tf_load;
819 hwif->tf_read = scc_tf_read;
820
821 hwif->input_data = scc_input_data;
822 hwif->output_data = scc_output_data;
823
824 hwif->dma_base = dma_base; 811 hwif->dma_base = dma_base;
825 hwif->config_data = ports->ctl; 812 hwif->config_data = ports->ctl;
826} 813}
@@ -872,6 +859,21 @@ static void __devinit init_hwif_scc(ide_hwif_t *hwif)
872 hwif->ultra_mask = ATA_UDMA5; /* 100MHz */ 859 hwif->ultra_mask = ATA_UDMA5; /* 100MHz */
873} 860}
874 861
862static const struct ide_tp_ops scc_tp_ops = {
863 .exec_command = scc_exec_command,
864 .read_status = scc_read_status,
865 .read_altstatus = scc_read_altstatus,
866 .read_sff_dma_status = scc_read_sff_dma_status,
867
868 .set_irq = scc_set_irq,
869
870 .tf_load = scc_tf_load,
871 .tf_read = scc_tf_read,
872
873 .input_data = scc_input_data,
874 .output_data = scc_output_data,
875};
876
875static const struct ide_port_ops scc_port_ops = { 877static const struct ide_port_ops scc_port_ops = {
876 .set_pio_mode = scc_set_pio_mode, 878 .set_pio_mode = scc_set_pio_mode,
877 .set_dma_mode = scc_set_dma_mode, 879 .set_dma_mode = scc_set_dma_mode,
@@ -895,6 +897,7 @@ static const struct ide_dma_ops scc_dma_ops = {
895 .name = name_str, \ 897 .name = name_str, \
896 .init_iops = init_iops_scc, \ 898 .init_iops = init_iops_scc, \
897 .init_hwif = init_hwif_scc, \ 899 .init_hwif = init_hwif_scc, \
900 .tp_ops = &scc_tp_ops, \
898 .port_ops = &scc_port_ops, \ 901 .port_ops = &scc_port_ops, \
899 .dma_ops = &scc_dma_ops, \ 902 .dma_ops = &scc_dma_ops, \
900 .host_flags = IDE_HFLAG_SINGLE, \ 903 .host_flags = IDE_HFLAG_SINGLE, \