diff options
Diffstat (limited to 'drivers/ata/sata_uli.c')
-rw-r--r-- | drivers/ata/sata_uli.c | 55 |
1 files changed, 9 insertions, 46 deletions
diff --git a/drivers/ata/sata_uli.c b/drivers/ata/sata_uli.c index e710e71b7b92..f277cea904ce 100644 --- a/drivers/ata/sata_uli.c +++ b/drivers/ata/sata_uli.c | |||
@@ -76,50 +76,13 @@ static struct pci_driver uli_pci_driver = { | |||
76 | }; | 76 | }; |
77 | 77 | ||
78 | static struct scsi_host_template uli_sht = { | 78 | static struct scsi_host_template uli_sht = { |
79 | .module = THIS_MODULE, | 79 | ATA_BMDMA_SHT(DRV_NAME), |
80 | .name = DRV_NAME, | ||
81 | .ioctl = ata_scsi_ioctl, | ||
82 | .queuecommand = ata_scsi_queuecmd, | ||
83 | .can_queue = ATA_DEF_QUEUE, | ||
84 | .this_id = ATA_SHT_THIS_ID, | ||
85 | .sg_tablesize = LIBATA_MAX_PRD, | ||
86 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | ||
87 | .emulated = ATA_SHT_EMULATED, | ||
88 | .use_clustering = ATA_SHT_USE_CLUSTERING, | ||
89 | .proc_name = DRV_NAME, | ||
90 | .dma_boundary = ATA_DMA_BOUNDARY, | ||
91 | .slave_configure = ata_scsi_slave_config, | ||
92 | .slave_destroy = ata_scsi_slave_destroy, | ||
93 | .bios_param = ata_std_bios_param, | ||
94 | }; | 80 | }; |
95 | 81 | ||
96 | static const struct ata_port_operations uli_ops = { | 82 | static struct ata_port_operations uli_ops = { |
97 | .tf_load = ata_tf_load, | 83 | .inherits = &ata_bmdma_port_ops, |
98 | .tf_read = ata_tf_read, | ||
99 | .check_status = ata_check_status, | ||
100 | .exec_command = ata_exec_command, | ||
101 | .dev_select = ata_std_dev_select, | ||
102 | |||
103 | .bmdma_setup = ata_bmdma_setup, | ||
104 | .bmdma_start = ata_bmdma_start, | ||
105 | .bmdma_stop = ata_bmdma_stop, | ||
106 | .bmdma_status = ata_bmdma_status, | ||
107 | .qc_prep = ata_qc_prep, | ||
108 | .qc_issue = ata_qc_issue_prot, | ||
109 | .data_xfer = ata_data_xfer, | ||
110 | |||
111 | .freeze = ata_bmdma_freeze, | ||
112 | .thaw = ata_bmdma_thaw, | ||
113 | .error_handler = ata_bmdma_error_handler, | ||
114 | .post_internal_cmd = ata_bmdma_post_internal_cmd, | ||
115 | |||
116 | .irq_clear = ata_bmdma_irq_clear, | ||
117 | .irq_on = ata_irq_on, | ||
118 | |||
119 | .scr_read = uli_scr_read, | 84 | .scr_read = uli_scr_read, |
120 | .scr_write = uli_scr_write, | 85 | .scr_write = uli_scr_write, |
121 | |||
122 | .port_start = ata_port_start, | ||
123 | }; | 86 | }; |
124 | 87 | ||
125 | static const struct ata_port_info uli_port_info = { | 88 | static const struct ata_port_info uli_port_info = { |
@@ -212,11 +175,11 @@ static int uli_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
212 | host->private_data = hpriv; | 175 | host->private_data = hpriv; |
213 | 176 | ||
214 | /* the first two ports are standard SFF */ | 177 | /* the first two ports are standard SFF */ |
215 | rc = ata_pci_init_sff_host(host); | 178 | rc = ata_pci_sff_init_host(host); |
216 | if (rc) | 179 | if (rc) |
217 | return rc; | 180 | return rc; |
218 | 181 | ||
219 | rc = ata_pci_init_bmdma(host); | 182 | rc = ata_pci_bmdma_init(host); |
220 | if (rc) | 183 | if (rc) |
221 | return rc; | 184 | return rc; |
222 | 185 | ||
@@ -237,7 +200,7 @@ static int uli_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
237 | ((unsigned long)iomap[1] | ATA_PCI_CTL_OFS) + 4; | 200 | ((unsigned long)iomap[1] | ATA_PCI_CTL_OFS) + 4; |
238 | ioaddr->bmdma_addr = iomap[4] + 16; | 201 | ioaddr->bmdma_addr = iomap[4] + 16; |
239 | hpriv->scr_cfg_addr[2] = ULI5287_BASE + ULI5287_OFFS*4; | 202 | hpriv->scr_cfg_addr[2] = ULI5287_BASE + ULI5287_OFFS*4; |
240 | ata_std_ports(ioaddr); | 203 | ata_sff_std_ports(ioaddr); |
241 | 204 | ||
242 | ata_port_desc(host->ports[2], | 205 | ata_port_desc(host->ports[2], |
243 | "cmd 0x%llx ctl 0x%llx bmdma 0x%llx", | 206 | "cmd 0x%llx ctl 0x%llx bmdma 0x%llx", |
@@ -252,7 +215,7 @@ static int uli_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
252 | ((unsigned long)iomap[3] | ATA_PCI_CTL_OFS) + 4; | 215 | ((unsigned long)iomap[3] | ATA_PCI_CTL_OFS) + 4; |
253 | ioaddr->bmdma_addr = iomap[4] + 24; | 216 | ioaddr->bmdma_addr = iomap[4] + 24; |
254 | hpriv->scr_cfg_addr[3] = ULI5287_BASE + ULI5287_OFFS*5; | 217 | hpriv->scr_cfg_addr[3] = ULI5287_BASE + ULI5287_OFFS*5; |
255 | ata_std_ports(ioaddr); | 218 | ata_sff_std_ports(ioaddr); |
256 | 219 | ||
257 | ata_port_desc(host->ports[2], | 220 | ata_port_desc(host->ports[2], |
258 | "cmd 0x%llx ctl 0x%llx bmdma 0x%llx", | 221 | "cmd 0x%llx ctl 0x%llx bmdma 0x%llx", |
@@ -279,8 +242,8 @@ static int uli_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
279 | 242 | ||
280 | pci_set_master(pdev); | 243 | pci_set_master(pdev); |
281 | pci_intx(pdev, 1); | 244 | pci_intx(pdev, 1); |
282 | return ata_host_activate(host, pdev->irq, ata_interrupt, IRQF_SHARED, | 245 | return ata_host_activate(host, pdev->irq, ata_sff_interrupt, |
283 | &uli_sht); | 246 | IRQF_SHARED, &uli_sht); |
284 | } | 247 | } |
285 | 248 | ||
286 | static int __init uli_init(void) | 249 | static int __init uli_init(void) |