diff options
Diffstat (limited to 'drivers/ata/pata_pcmcia.c')
-rw-r--r-- | drivers/ata/pata_pcmcia.c | 68 |
1 files changed, 9 insertions, 59 deletions
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c index 3e7f6a9da28b..3d39f9dfec5a 100644 --- a/drivers/ata/pata_pcmcia.c +++ b/drivers/ata/pata_pcmcia.c | |||
@@ -128,71 +128,21 @@ static unsigned int ata_data_xfer_8bit(struct ata_device *dev, | |||
128 | 128 | ||
129 | 129 | ||
130 | static struct scsi_host_template pcmcia_sht = { | 130 | static struct scsi_host_template pcmcia_sht = { |
131 | .module = THIS_MODULE, | 131 | ATA_PIO_SHT(DRV_NAME), |
132 | .name = DRV_NAME, | ||
133 | .ioctl = ata_scsi_ioctl, | ||
134 | .queuecommand = ata_scsi_queuecmd, | ||
135 | .can_queue = ATA_DEF_QUEUE, | ||
136 | .this_id = ATA_SHT_THIS_ID, | ||
137 | .sg_tablesize = LIBATA_MAX_PRD, | ||
138 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | ||
139 | .emulated = ATA_SHT_EMULATED, | ||
140 | .use_clustering = ATA_SHT_USE_CLUSTERING, | ||
141 | .proc_name = DRV_NAME, | ||
142 | .dma_boundary = ATA_DMA_BOUNDARY, | ||
143 | .slave_configure = ata_scsi_slave_config, | ||
144 | .slave_destroy = ata_scsi_slave_destroy, | ||
145 | .bios_param = ata_std_bios_param, | ||
146 | }; | 132 | }; |
147 | 133 | ||
148 | static struct ata_port_operations pcmcia_port_ops = { | 134 | static struct ata_port_operations pcmcia_port_ops = { |
149 | .set_mode = pcmcia_set_mode, | 135 | .inherits = &ata_sff_port_ops, |
150 | .tf_load = ata_tf_load, | 136 | .sff_data_xfer = ata_sff_data_xfer_noirq, |
151 | .tf_read = ata_tf_read, | ||
152 | .check_status = ata_check_status, | ||
153 | .exec_command = ata_exec_command, | ||
154 | .dev_select = ata_std_dev_select, | ||
155 | |||
156 | .freeze = ata_bmdma_freeze, | ||
157 | .thaw = ata_bmdma_thaw, | ||
158 | .error_handler = ata_bmdma_error_handler, | ||
159 | .post_internal_cmd = ata_bmdma_post_internal_cmd, | ||
160 | .cable_detect = ata_cable_40wire, | 137 | .cable_detect = ata_cable_40wire, |
161 | 138 | .set_mode = pcmcia_set_mode, | |
162 | .qc_prep = ata_qc_prep, | ||
163 | .qc_issue = ata_qc_issue_prot, | ||
164 | |||
165 | .data_xfer = ata_data_xfer_noirq, | ||
166 | |||
167 | .irq_clear = ata_bmdma_irq_clear, | ||
168 | .irq_on = ata_irq_on, | ||
169 | |||
170 | .port_start = ata_sff_port_start, | ||
171 | }; | 139 | }; |
172 | 140 | ||
173 | static struct ata_port_operations pcmcia_8bit_port_ops = { | 141 | static struct ata_port_operations pcmcia_8bit_port_ops = { |
174 | .set_mode = pcmcia_set_mode_8bit, | 142 | .inherits = &ata_sff_port_ops, |
175 | .tf_load = ata_tf_load, | 143 | .sff_data_xfer = ata_data_xfer_8bit, |
176 | .tf_read = ata_tf_read, | ||
177 | .check_status = ata_check_status, | ||
178 | .exec_command = ata_exec_command, | ||
179 | .dev_select = ata_std_dev_select, | ||
180 | |||
181 | .freeze = ata_bmdma_freeze, | ||
182 | .thaw = ata_bmdma_thaw, | ||
183 | .error_handler = ata_bmdma_error_handler, | ||
184 | .post_internal_cmd = ata_bmdma_post_internal_cmd, | ||
185 | .cable_detect = ata_cable_40wire, | 144 | .cable_detect = ata_cable_40wire, |
186 | 145 | .set_mode = pcmcia_set_mode_8bit, | |
187 | .qc_prep = ata_qc_prep, | ||
188 | .qc_issue = ata_qc_issue_prot, | ||
189 | |||
190 | .data_xfer = ata_data_xfer_8bit, | ||
191 | |||
192 | .irq_clear = ata_bmdma_irq_clear, | ||
193 | .irq_on = ata_irq_on, | ||
194 | |||
195 | .port_start = ata_sff_port_start, | ||
196 | }; | 146 | }; |
197 | 147 | ||
198 | #define CS_CHECK(fn, ret) \ | 148 | #define CS_CHECK(fn, ret) \ |
@@ -373,13 +323,13 @@ next_entry: | |||
373 | ap->ioaddr.cmd_addr = io_addr + 0x10 * p; | 323 | ap->ioaddr.cmd_addr = io_addr + 0x10 * p; |
374 | ap->ioaddr.altstatus_addr = ctl_addr + 0x10 * p; | 324 | ap->ioaddr.altstatus_addr = ctl_addr + 0x10 * p; |
375 | ap->ioaddr.ctl_addr = ctl_addr + 0x10 * p; | 325 | ap->ioaddr.ctl_addr = ctl_addr + 0x10 * p; |
376 | ata_std_ports(&ap->ioaddr); | 326 | ata_sff_std_ports(&ap->ioaddr); |
377 | 327 | ||
378 | ata_port_desc(ap, "cmd 0x%lx ctl 0x%lx", io_base, ctl_base); | 328 | ata_port_desc(ap, "cmd 0x%lx ctl 0x%lx", io_base, ctl_base); |
379 | } | 329 | } |
380 | 330 | ||
381 | /* activate */ | 331 | /* activate */ |
382 | ret = ata_host_activate(host, pdev->irq.AssignedIRQ, ata_interrupt, | 332 | ret = ata_host_activate(host, pdev->irq.AssignedIRQ, ata_sff_interrupt, |
383 | IRQF_SHARED, &pcmcia_sht); | 333 | IRQF_SHARED, &pcmcia_sht); |
384 | if (ret) | 334 | if (ret) |
385 | goto failed; | 335 | goto failed; |