diff options
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r-- | include/linux/ide.h | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index d67ccca2b964..b846bc44a27e 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -211,7 +211,21 @@ static inline int __ide_default_irq(unsigned long base) | |||
211 | return 0; | 211 | return 0; |
212 | } | 212 | } |
213 | 213 | ||
214 | #if defined(CONFIG_ARM) || defined(CONFIG_FRV) || defined(CONFIG_M68K) || \ | ||
215 | defined(CONFIG_MIPS) || defined(CONFIG_MN10300) || defined(CONFIG_PARISC) \ | ||
216 | || defined(CONFIG_PPC) || defined(CONFIG_SPARC) || defined(CONFIG_SPARC64) | ||
214 | #include <asm/ide.h> | 217 | #include <asm/ide.h> |
218 | #else | ||
219 | #include <asm-generic/ide_iops.h> | ||
220 | #endif | ||
221 | |||
222 | #ifndef MAX_HWIFS | ||
223 | #if defined(CONFIG_BLACKFIN) || defined(CONFIG_H8300) || defined(CONFIG_XTENSA) | ||
224 | # define MAX_HWIFS 1 | ||
225 | #else | ||
226 | # define MAX_HWIFS 10 | ||
227 | #endif | ||
228 | #endif | ||
215 | 229 | ||
216 | #if !defined(MAX_HWIFS) || defined(CONFIG_EMBEDDED) | 230 | #if !defined(MAX_HWIFS) || defined(CONFIG_EMBEDDED) |
217 | #undef MAX_HWIFS | 231 | #undef MAX_HWIFS |
@@ -532,12 +546,16 @@ struct ide_dma_ops { | |||
532 | void (*dma_timeout)(struct ide_drive_s *); | 546 | void (*dma_timeout)(struct ide_drive_s *); |
533 | }; | 547 | }; |
534 | 548 | ||
549 | struct ide_host; | ||
550 | |||
535 | typedef struct hwif_s { | 551 | typedef struct hwif_s { |
536 | struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ | 552 | struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ |
537 | struct hwif_s *mate; /* other hwif from same PCI chip */ | 553 | struct hwif_s *mate; /* other hwif from same PCI chip */ |
538 | struct hwgroup_s *hwgroup; /* actually (ide_hwgroup_t *) */ | 554 | struct hwgroup_s *hwgroup; /* actually (ide_hwgroup_t *) */ |
539 | struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ | 555 | struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ |
540 | 556 | ||
557 | struct ide_host *host; | ||
558 | |||
541 | char name[6]; /* name of interface, eg. "ide0" */ | 559 | char name[6]; /* name of interface, eg. "ide0" */ |
542 | 560 | ||
543 | struct ide_io_ports io_ports; | 561 | struct ide_io_ports io_ports; |
@@ -626,6 +644,9 @@ typedef struct hwif_s { | |||
626 | struct ide_host { | 644 | struct ide_host { |
627 | ide_hwif_t *ports[MAX_HWIFS]; | 645 | ide_hwif_t *ports[MAX_HWIFS]; |
628 | unsigned int n_ports; | 646 | unsigned int n_ports; |
647 | struct device *dev[2]; | ||
648 | unsigned long host_flags; | ||
649 | void *host_priv; | ||
629 | }; | 650 | }; |
630 | 651 | ||
631 | /* | 652 | /* |
@@ -874,6 +895,9 @@ struct ide_driver_s { | |||
874 | 895 | ||
875 | #define to_ide_driver(drv) container_of(drv, ide_driver_t, gen_driver) | 896 | #define to_ide_driver(drv) container_of(drv, ide_driver_t, gen_driver) |
876 | 897 | ||
898 | int ide_device_get(ide_drive_t *); | ||
899 | void ide_device_put(ide_drive_t *); | ||
900 | |||
877 | int generic_ide_ioctl(ide_drive_t *, struct file *, struct block_device *, unsigned, unsigned long); | 901 | int generic_ide_ioctl(ide_drive_t *, struct file *, struct block_device *, unsigned, unsigned long); |
878 | 902 | ||
879 | extern int ide_vlb_clk; | 903 | extern int ide_vlb_clk; |
@@ -1182,7 +1206,7 @@ enum { | |||
1182 | 1206 | ||
1183 | struct ide_port_info { | 1207 | struct ide_port_info { |
1184 | char *name; | 1208 | char *name; |
1185 | unsigned int (*init_chipset)(struct pci_dev *, const char *); | 1209 | unsigned int (*init_chipset)(struct pci_dev *); |
1186 | void (*init_iops)(ide_hwif_t *); | 1210 | void (*init_iops)(ide_hwif_t *); |
1187 | void (*init_hwif)(ide_hwif_t *); | 1211 | void (*init_hwif)(ide_hwif_t *); |
1188 | int (*init_dma)(ide_hwif_t *, | 1212 | int (*init_dma)(ide_hwif_t *, |
@@ -1201,8 +1225,10 @@ struct ide_port_info { | |||
1201 | u8 udma_mask; | 1225 | u8 udma_mask; |
1202 | }; | 1226 | }; |
1203 | 1227 | ||
1204 | int ide_setup_pci_device(struct pci_dev *, const struct ide_port_info *); | 1228 | int ide_pci_init_one(struct pci_dev *, const struct ide_port_info *, void *); |
1205 | int ide_setup_pci_devices(struct pci_dev *, struct pci_dev *, const struct ide_port_info *); | 1229 | int ide_pci_init_two(struct pci_dev *, struct pci_dev *, |
1230 | const struct ide_port_info *, void *); | ||
1231 | void ide_pci_remove(struct pci_dev *); | ||
1206 | 1232 | ||
1207 | void ide_map_sg(ide_drive_t *, struct request *); | 1233 | void ide_map_sg(ide_drive_t *, struct request *); |
1208 | void ide_init_sg_cmd(ide_drive_t *, struct request *); | 1234 | void ide_init_sg_cmd(ide_drive_t *, struct request *); |