diff options
author | Tejun Heo <htejun@gmail.com> | 2007-04-17 10:44:07 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-04-28 14:16:03 -0400 |
commit | 21b0ad4fb8306ac2bf5a249ffc978b1b8924c7d0 (patch) | |
tree | 9f82cc6a4bca146ce1021f0825cc12f18f9063b9 /include/linux | |
parent | d491b27b1959565671e2c05dff09b5f535a854ce (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/linux')
-rw-r--r-- | include/linux/libata.h | 5 |
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[]; | |||
690 | extern const unsigned long sata_deb_timing_long[]; | 691 | extern const unsigned long sata_deb_timing_long[]; |
691 | 692 | ||
692 | extern const struct ata_port_operations ata_dummy_port_ops; | 693 | extern const struct ata_port_operations ata_dummy_port_ops; |
694 | extern const struct ata_port_info ata_dummy_port_info; | ||
693 | 695 | ||
694 | static inline const unsigned long * | 696 | static inline const unsigned long * |
695 | sata_ehc_deb_timing(struct ata_eh_context *ehc) | 697 | sata_ehc_deb_timing(struct ata_eh_context *ehc) |
@@ -894,6 +896,9 @@ extern struct ata_probe_ent * | |||
894 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); | 896 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); |
895 | extern int ata_pci_init_native_host(struct ata_host *host, | 897 | extern int ata_pci_init_native_host(struct ata_host *host, |
896 | unsigned int port_mask); | 898 | unsigned int port_mask); |
899 | extern 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); | ||
897 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); | 902 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); |
898 | extern unsigned long ata_pci_default_filter(struct ata_device *, unsigned long); | 903 | extern unsigned long ata_pci_default_filter(struct ata_device *, unsigned long); |
899 | #endif /* CONFIG_PCI */ | 904 | #endif /* CONFIG_PCI */ |