diff options
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index ee84e7e12039..3bad2701bfa6 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -386,6 +386,7 @@ enum { | |||
386 | ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */ | 386 | ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */ |
387 | ATA_HORKAGE_NOSETXFER = (1 << 14), /* skip SETXFER, SATA only */ | 387 | ATA_HORKAGE_NOSETXFER = (1 << 14), /* skip SETXFER, SATA only */ |
388 | ATA_HORKAGE_BROKEN_FPDMA_AA = (1 << 15), /* skip AA */ | 388 | ATA_HORKAGE_BROKEN_FPDMA_AA = (1 << 15), /* skip AA */ |
389 | ATA_HORKAGE_DUMP_ID = (1 << 16), /* dump IDENTIFY data */ | ||
389 | 390 | ||
390 | /* DMA mask for user DMA control: User visible values; DO NOT | 391 | /* DMA mask for user DMA control: User visible values; DO NOT |
391 | renumber */ | 392 | renumber */ |
@@ -513,7 +514,9 @@ struct ata_ioports { | |||
513 | void __iomem *command_addr; | 514 | void __iomem *command_addr; |
514 | void __iomem *altstatus_addr; | 515 | void __iomem *altstatus_addr; |
515 | void __iomem *ctl_addr; | 516 | void __iomem *ctl_addr; |
517 | #ifdef CONFIG_ATA_BMDMA | ||
516 | void __iomem *bmdma_addr; | 518 | void __iomem *bmdma_addr; |
519 | #endif /* CONFIG_ATA_BMDMA */ | ||
517 | void __iomem *scr_addr; | 520 | void __iomem *scr_addr; |
518 | }; | 521 | }; |
519 | #endif /* CONFIG_ATA_SFF */ | 522 | #endif /* CONFIG_ATA_SFF */ |
@@ -721,8 +724,10 @@ struct ata_port { | |||
721 | u8 ctl; /* cache of ATA control register */ | 724 | u8 ctl; /* cache of ATA control register */ |
722 | u8 last_ctl; /* Cache last written value */ | 725 | u8 last_ctl; /* Cache last written value */ |
723 | struct delayed_work sff_pio_task; | 726 | struct delayed_work sff_pio_task; |
727 | #ifdef CONFIG_ATA_BMDMA | ||
724 | struct ata_bmdma_prd *bmdma_prd; /* BMDMA SG list */ | 728 | struct ata_bmdma_prd *bmdma_prd; /* BMDMA SG list */ |
725 | dma_addr_t bmdma_prd_dma; /* and its DMA mapping */ | 729 | dma_addr_t bmdma_prd_dma; /* and its DMA mapping */ |
730 | #endif /* CONFIG_ATA_BMDMA */ | ||
726 | #endif /* CONFIG_ATA_SFF */ | 731 | #endif /* CONFIG_ATA_SFF */ |
727 | 732 | ||
728 | unsigned int pio_mask; | 733 | unsigned int pio_mask; |
@@ -856,10 +861,12 @@ struct ata_port_operations { | |||
856 | void (*sff_irq_clear)(struct ata_port *); | 861 | void (*sff_irq_clear)(struct ata_port *); |
857 | void (*sff_drain_fifo)(struct ata_queued_cmd *qc); | 862 | void (*sff_drain_fifo)(struct ata_queued_cmd *qc); |
858 | 863 | ||
864 | #ifdef CONFIG_ATA_BMDMA | ||
859 | void (*bmdma_setup)(struct ata_queued_cmd *qc); | 865 | void (*bmdma_setup)(struct ata_queued_cmd *qc); |
860 | void (*bmdma_start)(struct ata_queued_cmd *qc); | 866 | void (*bmdma_start)(struct ata_queued_cmd *qc); |
861 | void (*bmdma_stop)(struct ata_queued_cmd *qc); | 867 | void (*bmdma_stop)(struct ata_queued_cmd *qc); |
862 | u8 (*bmdma_status)(struct ata_port *ap); | 868 | u8 (*bmdma_status)(struct ata_port *ap); |
869 | #endif /* CONFIG_ATA_BMDMA */ | ||
863 | #endif /* CONFIG_ATA_SFF */ | 870 | #endif /* CONFIG_ATA_SFF */ |
864 | 871 | ||
865 | ssize_t (*em_show)(struct ata_port *ap, char *buf); | 872 | ssize_t (*em_show)(struct ata_port *ap, char *buf); |
@@ -1555,7 +1562,6 @@ extern void sata_pmp_error_handler(struct ata_port *ap); | |||
1555 | #ifdef CONFIG_ATA_SFF | 1562 | #ifdef CONFIG_ATA_SFF |
1556 | 1563 | ||
1557 | extern const struct ata_port_operations ata_sff_port_ops; | 1564 | 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; | 1565 | extern const struct ata_port_operations ata_bmdma32_port_ops; |
1560 | 1566 | ||
1561 | /* PIO only, sg_tablesize and dma_boundary limits can be removed */ | 1567 | /* PIO only, sg_tablesize and dma_boundary limits can be removed */ |
@@ -1564,11 +1570,6 @@ extern const struct ata_port_operations ata_bmdma32_port_ops; | |||
1564 | .sg_tablesize = LIBATA_MAX_PRD, \ | 1570 | .sg_tablesize = LIBATA_MAX_PRD, \ |
1565 | .dma_boundary = ATA_DMA_BOUNDARY | 1571 | .dma_boundary = ATA_DMA_BOUNDARY |
1566 | 1572 | ||
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); | 1573 | extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device); |
1573 | extern u8 ata_sff_check_status(struct ata_port *ap); | 1574 | extern u8 ata_sff_check_status(struct ata_port *ap); |
1574 | extern void ata_sff_pause(struct ata_port *ap); | 1575 | extern void ata_sff_pause(struct ata_port *ap); |
@@ -1593,7 +1594,7 @@ extern int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc, | |||
1593 | extern void ata_sff_queue_pio_task(struct ata_port *ap, unsigned long delay); | 1594 | extern void ata_sff_queue_pio_task(struct ata_port *ap, unsigned long delay); |
1594 | extern unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc); | 1595 | extern unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc); |
1595 | extern bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc); | 1596 | extern bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc); |
1596 | extern unsigned int ata_sff_host_intr(struct ata_port *ap, | 1597 | extern unsigned int ata_sff_port_intr(struct ata_port *ap, |
1597 | struct ata_queued_cmd *qc); | 1598 | struct ata_queued_cmd *qc); |
1598 | extern irqreturn_t ata_sff_interrupt(int irq, void *dev_instance); | 1599 | extern irqreturn_t ata_sff_interrupt(int irq, void *dev_instance); |
1599 | extern void ata_sff_lost_interrupt(struct ata_port *ap); | 1600 | extern void ata_sff_lost_interrupt(struct ata_port *ap); |
@@ -1625,11 +1626,24 @@ extern int ata_pci_sff_init_one(struct pci_dev *pdev, | |||
1625 | struct scsi_host_template *sht, void *host_priv, int hflags); | 1626 | struct scsi_host_template *sht, void *host_priv, int hflags); |
1626 | #endif /* CONFIG_PCI */ | 1627 | #endif /* CONFIG_PCI */ |
1627 | 1628 | ||
1629 | #ifdef CONFIG_ATA_BMDMA | ||
1630 | |||
1631 | extern const struct ata_port_operations ata_bmdma_port_ops; | ||
1632 | |||
1633 | #define ATA_BMDMA_SHT(drv_name) \ | ||
1634 | ATA_BASE_SHT(drv_name), \ | ||
1635 | .sg_tablesize = LIBATA_MAX_PRD, \ | ||
1636 | .dma_boundary = ATA_DMA_BOUNDARY | ||
1637 | |||
1628 | extern void ata_bmdma_qc_prep(struct ata_queued_cmd *qc); | 1638 | extern void ata_bmdma_qc_prep(struct ata_queued_cmd *qc); |
1629 | extern unsigned int ata_bmdma_qc_issue(struct ata_queued_cmd *qc); | 1639 | 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); | 1640 | extern void ata_bmdma_dumb_qc_prep(struct ata_queued_cmd *qc); |
1641 | extern unsigned int ata_bmdma_port_intr(struct ata_port *ap, | ||
1642 | struct ata_queued_cmd *qc); | ||
1643 | extern irqreturn_t ata_bmdma_interrupt(int irq, void *dev_instance); | ||
1631 | extern void ata_bmdma_error_handler(struct ata_port *ap); | 1644 | extern void ata_bmdma_error_handler(struct ata_port *ap); |
1632 | extern void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc); | 1645 | extern void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc); |
1646 | extern void ata_bmdma_irq_clear(struct ata_port *ap); | ||
1633 | extern void ata_bmdma_setup(struct ata_queued_cmd *qc); | 1647 | extern void ata_bmdma_setup(struct ata_queued_cmd *qc); |
1634 | extern void ata_bmdma_start(struct ata_queued_cmd *qc); | 1648 | extern void ata_bmdma_start(struct ata_queued_cmd *qc); |
1635 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); | 1649 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); |
@@ -1640,7 +1654,15 @@ extern int ata_bmdma_port_start32(struct ata_port *ap); | |||
1640 | #ifdef CONFIG_PCI | 1654 | #ifdef CONFIG_PCI |
1641 | extern int ata_pci_bmdma_clear_simplex(struct pci_dev *pdev); | 1655 | extern int ata_pci_bmdma_clear_simplex(struct pci_dev *pdev); |
1642 | extern void ata_pci_bmdma_init(struct ata_host *host); | 1656 | extern void ata_pci_bmdma_init(struct ata_host *host); |
1657 | extern int ata_pci_bmdma_prepare_host(struct pci_dev *pdev, | ||
1658 | const struct ata_port_info * const * ppi, | ||
1659 | struct ata_host **r_host); | ||
1660 | extern int ata_pci_bmdma_init_one(struct pci_dev *pdev, | ||
1661 | const struct ata_port_info * const * ppi, | ||
1662 | struct scsi_host_template *sht, | ||
1663 | void *host_priv, int hflags); | ||
1643 | #endif /* CONFIG_PCI */ | 1664 | #endif /* CONFIG_PCI */ |
1665 | #endif /* CONFIG_ATA_BMDMA */ | ||
1644 | 1666 | ||
1645 | /** | 1667 | /** |
1646 | * ata_sff_busy_wait - Wait for a port status register | 1668 | * ata_sff_busy_wait - Wait for a port status register |