aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_winbond.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_winbond.c')
-rw-r--r--drivers/ata/pata_winbond.c47
1 files changed, 7 insertions, 40 deletions
diff --git a/drivers/ata/pata_winbond.c b/drivers/ata/pata_winbond.c
index 99c92eda217b..6e52a3573fbf 100644
--- a/drivers/ata/pata_winbond.c
+++ b/drivers/ata/pata_winbond.c
@@ -116,53 +116,20 @@ static unsigned int winbond_data_xfer(struct ata_device *dev,
116 buflen += 4 - slop; 116 buflen += 4 - slop;
117 } 117 }
118 } else 118 } else
119 buflen = ata_data_xfer(dev, buf, buflen, rw); 119 buflen = ata_sff_data_xfer(dev, buf, buflen, rw);
120 120
121 return buflen; 121 return buflen;
122} 122}
123 123
124static struct scsi_host_template winbond_sht = { 124static struct scsi_host_template winbond_sht = {
125 .module = THIS_MODULE, 125 ATA_PIO_SHT(DRV_NAME),
126 .name = DRV_NAME,
127 .ioctl = ata_scsi_ioctl,
128 .queuecommand = ata_scsi_queuecmd,
129 .can_queue = ATA_DEF_QUEUE,
130 .this_id = ATA_SHT_THIS_ID,
131 .sg_tablesize = LIBATA_MAX_PRD,
132 .cmd_per_lun = ATA_SHT_CMD_PER_LUN,
133 .emulated = ATA_SHT_EMULATED,
134 .use_clustering = ATA_SHT_USE_CLUSTERING,
135 .proc_name = DRV_NAME,
136 .dma_boundary = ATA_DMA_BOUNDARY,
137 .slave_configure = ata_scsi_slave_config,
138 .slave_destroy = ata_scsi_slave_destroy,
139 .bios_param = ata_std_bios_param,
140}; 126};
141 127
142static struct ata_port_operations winbond_port_ops = { 128static struct ata_port_operations winbond_port_ops = {
143 .set_piomode = winbond_set_piomode, 129 .inherits = &ata_sff_port_ops,
144 130 .sff_data_xfer = winbond_data_xfer,
145 .tf_load = ata_tf_load,
146 .tf_read = ata_tf_read,
147 .check_status = ata_check_status,
148 .exec_command = ata_exec_command,
149 .dev_select = ata_std_dev_select,
150
151 .freeze = ata_bmdma_freeze,
152 .thaw = ata_bmdma_thaw,
153 .error_handler = ata_bmdma_error_handler,
154 .post_internal_cmd = ata_bmdma_post_internal_cmd,
155 .cable_detect = ata_cable_40wire, 131 .cable_detect = ata_cable_40wire,
156 132 .set_piomode = winbond_set_piomode,
157 .qc_prep = ata_qc_prep,
158 .qc_issue = ata_qc_issue_prot,
159
160 .data_xfer = winbond_data_xfer,
161
162 .irq_clear = ata_bmdma_irq_clear,
163 .irq_on = ata_irq_on,
164
165 .port_start = ata_sff_port_start,
166}; 133};
167 134
168/** 135/**
@@ -231,7 +198,7 @@ static __init int winbond_init_one(unsigned long port)
231 ap->ioaddr.cmd_addr = cmd_addr; 198 ap->ioaddr.cmd_addr = cmd_addr;
232 ap->ioaddr.altstatus_addr = ctl_addr; 199 ap->ioaddr.altstatus_addr = ctl_addr;
233 ap->ioaddr.ctl_addr = ctl_addr; 200 ap->ioaddr.ctl_addr = ctl_addr;
234 ata_std_ports(&ap->ioaddr); 201 ata_sff_std_ports(&ap->ioaddr);
235 202
236 /* hook in a private data structure per channel */ 203 /* hook in a private data structure per channel */
237 host->private_data = &winbond_data[nr_winbond_host]; 204 host->private_data = &winbond_data[nr_winbond_host];
@@ -239,7 +206,7 @@ static __init int winbond_init_one(unsigned long port)
239 winbond_data[nr_winbond_host].platform_dev = pdev; 206 winbond_data[nr_winbond_host].platform_dev = pdev;
240 207
241 /* activate */ 208 /* activate */
242 rc = ata_host_activate(host, 14 + i, ata_interrupt, 0, 209 rc = ata_host_activate(host, 14 + i, ata_sff_interrupt, 0,
243 &winbond_sht); 210 &winbond_sht);
244 if (rc) 211 if (rc)
245 goto err_unregister; 212 goto err_unregister;