aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-04-17 10:44:07 -0400
committerJeff Garzik <jeff@garzik.org>2007-04-28 14:16:03 -0400
commit21b0ad4fb8306ac2bf5a249ffc978b1b8924c7d0 (patch)
tree9f82cc6a4bca146ce1021f0825cc12f18f9063b9 /include
parentd491b27b1959565671e2c05dff09b5f535a854ce (diff)
libata: add init helpers including ata_pci_prepare_native_host()
These will be used to convert LLDs to new init model. * Add irq_handler field to port_info. In new init model, requesting IRQ is LLD's responsibility and libata doesn't need to know about irq_handler. Most LLDs can simply register their irq_handler but some need different irq_handler depending on specific chip. The added port_info->irq_handler field can be used by LLDs to select the matching IRQ handler in such cases. * Add ata_dummy_port_info. * Implement ata_pci_prepare_native_host(), a helper to alloc ATA host, acquire all resources and init the host in one go. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/libata.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 400429f9cd9d..5d32c157de60 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -668,6 +668,7 @@ struct ata_port_info {
668 unsigned long mwdma_mask; 668 unsigned long mwdma_mask;
669 unsigned long udma_mask; 669 unsigned long udma_mask;
670 const struct ata_port_operations *port_ops; 670 const struct ata_port_operations *port_ops;
671 irq_handler_t irq_handler;
671 void *private_data; 672 void *private_data;
672}; 673};
673 674
@@ -690,6 +691,7 @@ extern const unsigned long sata_deb_timing_hotplug[];
690extern const unsigned long sata_deb_timing_long[]; 691extern const unsigned long sata_deb_timing_long[];
691 692
692extern const struct ata_port_operations ata_dummy_port_ops; 693extern const struct ata_port_operations ata_dummy_port_ops;
694extern const struct ata_port_info ata_dummy_port_info;
693 695
694static inline const unsigned long * 696static inline const unsigned long *
695sata_ehc_deb_timing(struct ata_eh_context *ehc) 697sata_ehc_deb_timing(struct ata_eh_context *ehc)
@@ -894,6 +896,9 @@ extern struct ata_probe_ent *
894ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); 896ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask);
895extern int ata_pci_init_native_host(struct ata_host *host, 897extern int ata_pci_init_native_host(struct ata_host *host,
896 unsigned int port_mask); 898 unsigned int port_mask);
899extern int ata_pci_prepare_native_host(struct pci_dev *pdev,
900 const struct ata_port_info * const * ppi,
901 int n_ports, struct ata_host **r_host);
897extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); 902extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits);
898extern unsigned long ata_pci_default_filter(struct ata_device *, unsigned long); 903extern unsigned long ata_pci_default_filter(struct ata_device *, unsigned long);
899#endif /* CONFIG_PCI */ 904#endif /* CONFIG_PCI */