diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/libata.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index fe2be88bc266..4c5eca4e663b 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -513,7 +513,9 @@ struct ata_ioports { | |||
513 | void __iomem *command_addr; | 513 | void __iomem *command_addr; |
514 | void __iomem *altstatus_addr; | 514 | void __iomem *altstatus_addr; |
515 | void __iomem *ctl_addr; | 515 | void __iomem *ctl_addr; |
516 | #ifdef CONFIG_ATA_BMDMA | ||
516 | void __iomem *bmdma_addr; | 517 | void __iomem *bmdma_addr; |
518 | #endif /* CONFIG_ATA_BMDMA */ | ||
517 | void __iomem *scr_addr; | 519 | void __iomem *scr_addr; |
518 | }; | 520 | }; |
519 | #endif /* CONFIG_ATA_SFF */ | 521 | #endif /* CONFIG_ATA_SFF */ |
@@ -721,8 +723,10 @@ struct ata_port { | |||
721 | u8 ctl; /* cache of ATA control register */ | 723 | u8 ctl; /* cache of ATA control register */ |
722 | u8 last_ctl; /* Cache last written value */ | 724 | u8 last_ctl; /* Cache last written value */ |
723 | struct delayed_work sff_pio_task; | 725 | struct delayed_work sff_pio_task; |
726 | #ifdef CONFIG_ATA_BMDMA | ||
724 | struct ata_bmdma_prd *bmdma_prd; /* BMDMA SG list */ | 727 | struct ata_bmdma_prd *bmdma_prd; /* BMDMA SG list */ |
725 | dma_addr_t bmdma_prd_dma; /* and its DMA mapping */ | 728 | dma_addr_t bmdma_prd_dma; /* and its DMA mapping */ |
729 | #endif /* CONFIG_ATA_BMDMA */ | ||
726 | #endif /* CONFIG_ATA_SFF */ | 730 | #endif /* CONFIG_ATA_SFF */ |
727 | 731 | ||
728 | unsigned int pio_mask; | 732 | unsigned int pio_mask; |
@@ -856,10 +860,12 @@ struct ata_port_operations { | |||
856 | void (*sff_irq_clear)(struct ata_port *); | 860 | void (*sff_irq_clear)(struct ata_port *); |
857 | void (*sff_drain_fifo)(struct ata_queued_cmd *qc); | 861 | void (*sff_drain_fifo)(struct ata_queued_cmd *qc); |
858 | 862 | ||
863 | #ifdef CONFIG_ATA_BMDMA | ||
859 | void (*bmdma_setup)(struct ata_queued_cmd *qc); | 864 | void (*bmdma_setup)(struct ata_queued_cmd *qc); |
860 | void (*bmdma_start)(struct ata_queued_cmd *qc); | 865 | void (*bmdma_start)(struct ata_queued_cmd *qc); |
861 | void (*bmdma_stop)(struct ata_queued_cmd *qc); | 866 | void (*bmdma_stop)(struct ata_queued_cmd *qc); |
862 | u8 (*bmdma_status)(struct ata_port *ap); | 867 | u8 (*bmdma_status)(struct ata_port *ap); |
868 | #endif /* CONFIG_ATA_BMDMA */ | ||
863 | #endif /* CONFIG_ATA_SFF */ | 869 | #endif /* CONFIG_ATA_SFF */ |
864 | 870 | ||
865 | ssize_t (*em_show)(struct ata_port *ap, char *buf); | 871 | ssize_t (*em_show)(struct ata_port *ap, char *buf); |
@@ -1555,7 +1561,6 @@ extern void sata_pmp_error_handler(struct ata_port *ap); | |||
1555 | #ifdef CONFIG_ATA_SFF | 1561 | #ifdef CONFIG_ATA_SFF |
1556 | 1562 | ||
1557 | extern const struct ata_port_operations ata_sff_port_ops; | 1563 | extern const struct ata_port_operations ata_sff_port_ops; |
1558 | extern const struct ata_port_operations ata_bmdma_port_ops; | ||
1559 | extern const struct ata_port_operations ata_bmdma32_port_ops; | 1564 | extern const struct ata_port_operations ata_bmdma32_port_ops; |
1560 | 1565 | ||
1561 | /* PIO only, sg_tablesize and dma_boundary limits can be removed */ | 1566 | /* PIO only, sg_tablesize and dma_boundary limits can be removed */ |
@@ -1564,11 +1569,6 @@ extern const struct ata_port_operations ata_bmdma32_port_ops; | |||
1564 | .sg_tablesize = LIBATA_MAX_PRD, \ | 1569 | .sg_tablesize = LIBATA_MAX_PRD, \ |
1565 | .dma_boundary = ATA_DMA_BOUNDARY | 1570 | .dma_boundary = ATA_DMA_BOUNDARY |
1566 | 1571 | ||
1567 | #define ATA_BMDMA_SHT(drv_name) \ | ||
1568 | ATA_BASE_SHT(drv_name), \ | ||
1569 | .sg_tablesize = LIBATA_MAX_PRD, \ | ||
1570 | .dma_boundary = ATA_DMA_BOUNDARY | ||
1571 | |||
1572 | extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device); | 1572 | extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device); |
1573 | extern u8 ata_sff_check_status(struct ata_port *ap); | 1573 | extern u8 ata_sff_check_status(struct ata_port *ap); |
1574 | extern void ata_sff_pause(struct ata_port *ap); | 1574 | extern void ata_sff_pause(struct ata_port *ap); |
@@ -1625,6 +1625,15 @@ extern int ata_pci_sff_init_one(struct pci_dev *pdev, | |||
1625 | struct scsi_host_template *sht, void *host_priv, int hflags); | 1625 | struct scsi_host_template *sht, void *host_priv, int hflags); |
1626 | #endif /* CONFIG_PCI */ | 1626 | #endif /* CONFIG_PCI */ |
1627 | 1627 | ||
1628 | #ifdef CONFIG_ATA_BMDMA | ||
1629 | |||
1630 | extern const struct ata_port_operations ata_bmdma_port_ops; | ||
1631 | |||
1632 | #define ATA_BMDMA_SHT(drv_name) \ | ||
1633 | ATA_BASE_SHT(drv_name), \ | ||
1634 | .sg_tablesize = LIBATA_MAX_PRD, \ | ||
1635 | .dma_boundary = ATA_DMA_BOUNDARY | ||
1636 | |||
1628 | extern void ata_bmdma_qc_prep(struct ata_queued_cmd *qc); | 1637 | extern void ata_bmdma_qc_prep(struct ata_queued_cmd *qc); |
1629 | extern unsigned int ata_bmdma_qc_issue(struct ata_queued_cmd *qc); | 1638 | extern unsigned int ata_bmdma_qc_issue(struct ata_queued_cmd *qc); |
1630 | extern void ata_bmdma_dumb_qc_prep(struct ata_queued_cmd *qc); | 1639 | extern void ata_bmdma_dumb_qc_prep(struct ata_queued_cmd *qc); |
@@ -1652,6 +1661,7 @@ extern int ata_pci_bmdma_init_one(struct pci_dev *pdev, | |||
1652 | struct scsi_host_template *sht, | 1661 | struct scsi_host_template *sht, |
1653 | void *host_priv, int hflags); | 1662 | void *host_priv, int hflags); |
1654 | #endif /* CONFIG_PCI */ | 1663 | #endif /* CONFIG_PCI */ |
1664 | #endif /* CONFIG_ATA_BMDMA */ | ||
1655 | 1665 | ||
1656 | /** | 1666 | /** |
1657 | * ata_sff_busy_wait - Wait for a port status register | 1667 | * ata_sff_busy_wait - Wait for a port status register |