aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_cs5535.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_cs5535.c')
-rw-r--r--drivers/ata/pata_cs5535.c50
1 files changed, 4 insertions, 46 deletions
diff --git a/drivers/ata/pata_cs5535.c b/drivers/ata/pata_cs5535.c
index 01324530d052..f1b6556f0483 100644
--- a/drivers/ata/pata_cs5535.c
+++ b/drivers/ata/pata_cs5535.c
@@ -158,55 +158,14 @@ static void cs5535_set_dmamode(struct ata_port *ap, struct ata_device *adev)
158} 158}
159 159
160static struct scsi_host_template cs5535_sht = { 160static struct scsi_host_template cs5535_sht = {
161 .module = THIS_MODULE, 161 ATA_BMDMA_SHT(DRV_NAME),
162 .name = DRV_NAME,
163 .ioctl = ata_scsi_ioctl,
164 .queuecommand = ata_scsi_queuecmd,
165 .can_queue = ATA_DEF_QUEUE,
166 .this_id = ATA_SHT_THIS_ID,
167 .sg_tablesize = LIBATA_MAX_PRD,
168 .cmd_per_lun = ATA_SHT_CMD_PER_LUN,
169 .emulated = ATA_SHT_EMULATED,
170 .use_clustering = ATA_SHT_USE_CLUSTERING,
171 .proc_name = DRV_NAME,
172 .dma_boundary = ATA_DMA_BOUNDARY,
173 .slave_configure = ata_scsi_slave_config,
174 .slave_destroy = ata_scsi_slave_destroy,
175 .bios_param = ata_std_bios_param,
176}; 162};
177 163
178static struct ata_port_operations cs5535_port_ops = { 164static struct ata_port_operations cs5535_port_ops = {
165 .inherits = &ata_bmdma_port_ops,
166 .cable_detect = cs5535_cable_detect,
179 .set_piomode = cs5535_set_piomode, 167 .set_piomode = cs5535_set_piomode,
180 .set_dmamode = cs5535_set_dmamode, 168 .set_dmamode = cs5535_set_dmamode,
181 .mode_filter = ata_pci_default_filter,
182
183 .tf_load = ata_tf_load,
184 .tf_read = ata_tf_read,
185 .check_status = ata_check_status,
186 .exec_command = ata_exec_command,
187 .dev_select = ata_std_dev_select,
188
189 .freeze = ata_bmdma_freeze,
190 .thaw = ata_bmdma_thaw,
191 .error_handler = ata_bmdma_error_handler,
192 .post_internal_cmd = ata_bmdma_post_internal_cmd,
193 .cable_detect = cs5535_cable_detect,
194
195 .bmdma_setup = ata_bmdma_setup,
196 .bmdma_start = ata_bmdma_start,
197 .bmdma_stop = ata_bmdma_stop,
198 .bmdma_status = ata_bmdma_status,
199
200 .qc_prep = ata_qc_prep,
201 .qc_issue = ata_qc_issue_prot,
202
203 .data_xfer = ata_data_xfer,
204
205 .irq_handler = ata_interrupt,
206 .irq_clear = ata_bmdma_irq_clear,
207 .irq_on = ata_irq_on,
208
209 .port_start = ata_sff_port_start,
210}; 169};
211 170
212/** 171/**
@@ -222,7 +181,6 @@ static struct ata_port_operations cs5535_port_ops = {
222static int cs5535_init_one(struct pci_dev *dev, const struct pci_device_id *id) 181static int cs5535_init_one(struct pci_dev *dev, const struct pci_device_id *id)
223{ 182{
224 static const struct ata_port_info info = { 183 static const struct ata_port_info info = {
225 .sht = &cs5535_sht,
226 .flags = ATA_FLAG_SLAVE_POSS, 184 .flags = ATA_FLAG_SLAVE_POSS,
227 .pio_mask = 0x1f, 185 .pio_mask = 0x1f,
228 .mwdma_mask = 0x07, 186 .mwdma_mask = 0x07,
@@ -241,7 +199,7 @@ static int cs5535_init_one(struct pci_dev *dev, const struct pci_device_id *id)
241 rdmsr(ATAC_CH0D1_PIO, timings, dummy); 199 rdmsr(ATAC_CH0D1_PIO, timings, dummy);
242 if (CS5535_BAD_PIO(timings)) 200 if (CS5535_BAD_PIO(timings))
243 wrmsr(ATAC_CH0D1_PIO, 0xF7F4F7F4UL, 0); 201 wrmsr(ATAC_CH0D1_PIO, 0xF7F4F7F4UL, 0);
244 return ata_pci_init_one(dev, ppi); 202 return ata_pci_sff_init_one(dev, ppi, &cs5535_sht, NULL);
245} 203}
246 204
247static const struct pci_device_id cs5535[] = { 205static const struct pci_device_id cs5535[] = {