aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_cypress.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2008-04-22 07:34:25 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2008-04-22 07:34:25 -0400
commitf838bad1b3be8ca0c785ee0e0c570dfda74cf377 (patch)
tree5a842a8056a708cfad55a20fa8ab733dd94b0903 /drivers/ata/pata_cypress.c
parentdd919660aacdf4adfcd279556aa03e595f7f0fc2 (diff)
parent807501475fce0ebe68baedf87f202c3e4ee0d12c (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/ata/pata_cypress.c')
-rw-r--r--drivers/ata/pata_cypress.c50
1 files changed, 4 insertions, 46 deletions
diff --git a/drivers/ata/pata_cypress.c b/drivers/ata/pata_cypress.c
index fc5f9c4e5d87..a9c3218e22fd 100644
--- a/drivers/ata/pata_cypress.c
+++ b/drivers/ata/pata_cypress.c
@@ -110,61 +110,19 @@ static void cy82c693_set_dmamode(struct ata_port *ap, struct ata_device *adev)
110} 110}
111 111
112static struct scsi_host_template cy82c693_sht = { 112static struct scsi_host_template cy82c693_sht = {
113 .module = THIS_MODULE, 113 ATA_BMDMA_SHT(DRV_NAME),
114 .name = DRV_NAME,
115 .ioctl = ata_scsi_ioctl,
116 .queuecommand = ata_scsi_queuecmd,
117 .can_queue = ATA_DEF_QUEUE,
118 .this_id = ATA_SHT_THIS_ID,
119 .sg_tablesize = LIBATA_MAX_PRD,
120 .cmd_per_lun = ATA_SHT_CMD_PER_LUN,
121 .emulated = ATA_SHT_EMULATED,
122 .use_clustering = ATA_SHT_USE_CLUSTERING,
123 .proc_name = DRV_NAME,
124 .dma_boundary = ATA_DMA_BOUNDARY,
125 .slave_configure = ata_scsi_slave_config,
126 .slave_destroy = ata_scsi_slave_destroy,
127 .bios_param = ata_std_bios_param,
128}; 114};
129 115
130static struct ata_port_operations cy82c693_port_ops = { 116static struct ata_port_operations cy82c693_port_ops = {
117 .inherits = &ata_bmdma_port_ops,
118 .cable_detect = ata_cable_40wire,
131 .set_piomode = cy82c693_set_piomode, 119 .set_piomode = cy82c693_set_piomode,
132 .set_dmamode = cy82c693_set_dmamode, 120 .set_dmamode = cy82c693_set_dmamode,
133 .mode_filter = ata_pci_default_filter,
134
135 .tf_load = ata_tf_load,
136 .tf_read = ata_tf_read,
137 .check_status = ata_check_status,
138 .exec_command = ata_exec_command,
139 .dev_select = ata_std_dev_select,
140
141 .freeze = ata_bmdma_freeze,
142 .thaw = ata_bmdma_thaw,
143 .error_handler = ata_bmdma_error_handler,
144 .post_internal_cmd = ata_bmdma_post_internal_cmd,
145 .cable_detect = ata_cable_40wire,
146
147 .bmdma_setup = ata_bmdma_setup,
148 .bmdma_start = ata_bmdma_start,
149 .bmdma_stop = ata_bmdma_stop,
150 .bmdma_status = ata_bmdma_status,
151
152 .qc_prep = ata_qc_prep,
153 .qc_issue = ata_qc_issue_prot,
154
155 .data_xfer = ata_data_xfer,
156
157 .irq_handler = ata_interrupt,
158 .irq_clear = ata_bmdma_irq_clear,
159 .irq_on = ata_irq_on,
160
161 .port_start = ata_sff_port_start,
162}; 121};
163 122
164static int cy82c693_init_one(struct pci_dev *pdev, const struct pci_device_id *id) 123static int cy82c693_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
165{ 124{
166 static const struct ata_port_info info = { 125 static const struct ata_port_info info = {
167 .sht = &cy82c693_sht,
168 .flags = ATA_FLAG_SLAVE_POSS, 126 .flags = ATA_FLAG_SLAVE_POSS,
169 .pio_mask = 0x1f, 127 .pio_mask = 0x1f,
170 .mwdma_mask = 0x07, 128 .mwdma_mask = 0x07,
@@ -178,7 +136,7 @@ static int cy82c693_init_one(struct pci_dev *pdev, const struct pci_device_id *i
178 if (PCI_FUNC(pdev->devfn) != 1) 136 if (PCI_FUNC(pdev->devfn) != 1)
179 return -ENODEV; 137 return -ENODEV;
180 138
181 return ata_pci_init_one(pdev, ppi); 139 return ata_pci_sff_init_one(pdev, ppi, &cy82c693_sht, NULL);
182} 140}
183 141
184static const struct pci_device_id cy82c693[] = { 142static const struct pci_device_id cy82c693[] = {