diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-04-19 12:17:34 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-04-19 12:17:34 -0400 |
commit | cf816ecb533ab96b883dfdc0db174598b5b5c4d2 (patch) | |
tree | 1b7705db288ae2917105e624b01fdf81e0882bf1 /drivers/ata/sata_svw.c | |
parent | adf6d34e460387ee3e8f1e1875d52bff51212c7d (diff) | |
parent | 15f7d677ccff6f0f5de8a1ee43a792567e9f9de9 (diff) |
Merge branch 'merge-fixes' into devel
Diffstat (limited to 'drivers/ata/sata_svw.c')
-rw-r--r-- | drivers/ata/sata_svw.c | 51 |
1 files changed, 12 insertions, 39 deletions
diff --git a/drivers/ata/sata_svw.c b/drivers/ata/sata_svw.c index 840d1c4a7850..16aa6839aa5a 100644 --- a/drivers/ata/sata_svw.c +++ b/drivers/ata/sata_svw.c | |||
@@ -233,7 +233,7 @@ static void k2_bmdma_setup_mmio(struct ata_queued_cmd *qc) | |||
233 | 233 | ||
234 | /* issue r/w command if this is not a ATA DMA command*/ | 234 | /* issue r/w command if this is not a ATA DMA command*/ |
235 | if (qc->tf.protocol != ATA_PROT_DMA) | 235 | if (qc->tf.protocol != ATA_PROT_DMA) |
236 | ap->ops->exec_command(ap, &qc->tf); | 236 | ap->ops->sff_exec_command(ap, &qc->tf); |
237 | } | 237 | } |
238 | 238 | ||
239 | /** | 239 | /** |
@@ -269,7 +269,7 @@ static void k2_bmdma_start_mmio(struct ata_queued_cmd *qc) | |||
269 | and the start command. */ | 269 | and the start command. */ |
270 | /* issue r/w command if the access is to ATA*/ | 270 | /* issue r/w command if the access is to ATA*/ |
271 | if (qc->tf.protocol == ATA_PROT_DMA) | 271 | if (qc->tf.protocol == ATA_PROT_DMA) |
272 | ap->ops->exec_command(ap, &qc->tf); | 272 | ap->ops->sff_exec_command(ap, &qc->tf); |
273 | } | 273 | } |
274 | 274 | ||
275 | 275 | ||
@@ -327,50 +327,23 @@ static int k2_sata_proc_info(struct Scsi_Host *shost, char *page, char **start, | |||
327 | 327 | ||
328 | 328 | ||
329 | static struct scsi_host_template k2_sata_sht = { | 329 | static struct scsi_host_template k2_sata_sht = { |
330 | .module = THIS_MODULE, | 330 | ATA_BMDMA_SHT(DRV_NAME), |
331 | .name = DRV_NAME, | ||
332 | .ioctl = ata_scsi_ioctl, | ||
333 | .queuecommand = ata_scsi_queuecmd, | ||
334 | .can_queue = ATA_DEF_QUEUE, | ||
335 | .this_id = ATA_SHT_THIS_ID, | ||
336 | .sg_tablesize = LIBATA_MAX_PRD, | ||
337 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | ||
338 | .emulated = ATA_SHT_EMULATED, | ||
339 | .use_clustering = ATA_SHT_USE_CLUSTERING, | ||
340 | .proc_name = DRV_NAME, | ||
341 | .dma_boundary = ATA_DMA_BOUNDARY, | ||
342 | .slave_configure = ata_scsi_slave_config, | ||
343 | .slave_destroy = ata_scsi_slave_destroy, | ||
344 | #ifdef CONFIG_PPC_OF | 331 | #ifdef CONFIG_PPC_OF |
345 | .proc_info = k2_sata_proc_info, | 332 | .proc_info = k2_sata_proc_info, |
346 | #endif | 333 | #endif |
347 | .bios_param = ata_std_bios_param, | ||
348 | }; | 334 | }; |
349 | 335 | ||
350 | 336 | ||
351 | static const struct ata_port_operations k2_sata_ops = { | 337 | static struct ata_port_operations k2_sata_ops = { |
352 | .tf_load = k2_sata_tf_load, | 338 | .inherits = &ata_bmdma_port_ops, |
353 | .tf_read = k2_sata_tf_read, | 339 | .sff_tf_load = k2_sata_tf_load, |
354 | .check_status = k2_stat_check_status, | 340 | .sff_tf_read = k2_sata_tf_read, |
355 | .exec_command = ata_exec_command, | 341 | .sff_check_status = k2_stat_check_status, |
356 | .dev_select = ata_std_dev_select, | ||
357 | .check_atapi_dma = k2_sata_check_atapi_dma, | 342 | .check_atapi_dma = k2_sata_check_atapi_dma, |
358 | .bmdma_setup = k2_bmdma_setup_mmio, | 343 | .bmdma_setup = k2_bmdma_setup_mmio, |
359 | .bmdma_start = k2_bmdma_start_mmio, | 344 | .bmdma_start = k2_bmdma_start_mmio, |
360 | .bmdma_stop = ata_bmdma_stop, | ||
361 | .bmdma_status = ata_bmdma_status, | ||
362 | .qc_prep = ata_qc_prep, | ||
363 | .qc_issue = ata_qc_issue_prot, | ||
364 | .data_xfer = ata_data_xfer, | ||
365 | .freeze = ata_bmdma_freeze, | ||
366 | .thaw = ata_bmdma_thaw, | ||
367 | .error_handler = ata_bmdma_error_handler, | ||
368 | .post_internal_cmd = ata_bmdma_post_internal_cmd, | ||
369 | .irq_clear = ata_bmdma_irq_clear, | ||
370 | .irq_on = ata_irq_on, | ||
371 | .scr_read = k2_sata_scr_read, | 345 | .scr_read = k2_sata_scr_read, |
372 | .scr_write = k2_sata_scr_write, | 346 | .scr_write = k2_sata_scr_write, |
373 | .port_start = ata_port_start, | ||
374 | }; | 347 | }; |
375 | 348 | ||
376 | static const struct ata_port_info k2_port_info[] = { | 349 | static const struct ata_port_info k2_port_info[] = { |
@@ -519,8 +492,8 @@ static int k2_sata_init_one(struct pci_dev *pdev, const struct pci_device_id *en | |||
519 | writel(0x0, mmio_base + K2_SATA_SIM_OFFSET); | 492 | writel(0x0, mmio_base + K2_SATA_SIM_OFFSET); |
520 | 493 | ||
521 | pci_set_master(pdev); | 494 | pci_set_master(pdev); |
522 | return ata_host_activate(host, pdev->irq, ata_interrupt, IRQF_SHARED, | 495 | return ata_host_activate(host, pdev->irq, ata_sff_interrupt, |
523 | &k2_sata_sht); | 496 | IRQF_SHARED, &k2_sata_sht); |
524 | } | 497 | } |
525 | 498 | ||
526 | /* 0x240 is device ID for Apple K2 device | 499 | /* 0x240 is device ID for Apple K2 device |
@@ -531,8 +504,8 @@ static int k2_sata_init_one(struct pci_dev *pdev, const struct pci_device_id *en | |||
531 | * */ | 504 | * */ |
532 | static const struct pci_device_id k2_sata_pci_tbl[] = { | 505 | static const struct pci_device_id k2_sata_pci_tbl[] = { |
533 | { PCI_VDEVICE(SERVERWORKS, 0x0240), chip_svw4 }, | 506 | { PCI_VDEVICE(SERVERWORKS, 0x0240), chip_svw4 }, |
534 | { PCI_VDEVICE(SERVERWORKS, 0x0241), chip_svw4 }, | 507 | { PCI_VDEVICE(SERVERWORKS, 0x0241), chip_svw8 }, |
535 | { PCI_VDEVICE(SERVERWORKS, 0x0242), chip_svw8 }, | 508 | { PCI_VDEVICE(SERVERWORKS, 0x0242), chip_svw4 }, |
536 | { PCI_VDEVICE(SERVERWORKS, 0x024a), chip_svw4 }, | 509 | { PCI_VDEVICE(SERVERWORKS, 0x024a), chip_svw4 }, |
537 | { PCI_VDEVICE(SERVERWORKS, 0x024b), chip_svw4 }, | 510 | { PCI_VDEVICE(SERVERWORKS, 0x024b), chip_svw4 }, |
538 | { PCI_VDEVICE(SERVERWORKS, 0x0410), chip_svw42 }, | 511 | { PCI_VDEVICE(SERVERWORKS, 0x0410), chip_svw42 }, |