aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 17:55:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 17:55:09 -0400
commitb5684b83b1e1579bbbc80e703e990c0cccf5892c (patch)
tree3f1b62b2320bce4d658d2ad0d4b77856499ac533 /include/linux
parent1481b9109fe771ec8b035d7760f42e36d2bed5d4 (diff)
parent1b8ebad87b459e2e1333fbf28005977245ff5402 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (76 commits) ide: use proper printk() KERN_* levels in ide-probe.c ide: fix for EATA SCSI HBA in ATA emulating mode ide: remove stale comments from drivers/ide/Makefile ide: enable local IRQs in all handlers for TASKFILE_NO_DATA data phase ide-scsi: remove kmalloced struct request ht6560b: remove old history ht6560b: update email address ide-cd: fix oops when using growisofs gayle: release resources on ide_host_add() failure palm_bk3710: add UltraDMA/100 support ide: trivial sparse annotations ide: ide-tape.c sparse annotations and unaligned access removal ide: drop 'name' parameter from ->init_chipset method ide: prefix messages from IDE PCI host drivers by driver name it821x: remove DECLARE_ITE_DEV() macro it8213: remove DECLARE_ITE_DEV() macro ide: include PCI device name in messages from IDE PCI host drivers ide: remove <asm/ide.h> for some archs ide-generic: remove ide_default_{io_base,irq}() inlines (take 3) ide-generic: is no longer needed on ppc32 ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ide.h32
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
549struct ide_host;
550
535typedef struct hwif_s { 551typedef 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 {
626struct ide_host { 644struct 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
898int ide_device_get(ide_drive_t *);
899void ide_device_put(ide_drive_t *);
900
877int generic_ide_ioctl(ide_drive_t *, struct file *, struct block_device *, unsigned, unsigned long); 901int generic_ide_ioctl(ide_drive_t *, struct file *, struct block_device *, unsigned, unsigned long);
878 902
879extern int ide_vlb_clk; 903extern int ide_vlb_clk;
@@ -1182,7 +1206,7 @@ enum {
1182 1206
1183struct ide_port_info { 1207struct 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
1204int ide_setup_pci_device(struct pci_dev *, const struct ide_port_info *); 1228int ide_pci_init_one(struct pci_dev *, const struct ide_port_info *, void *);
1205int ide_setup_pci_devices(struct pci_dev *, struct pci_dev *, const struct ide_port_info *); 1229int ide_pci_init_two(struct pci_dev *, struct pci_dev *,
1230 const struct ide_port_info *, void *);
1231void ide_pci_remove(struct pci_dev *);
1206 1232
1207void ide_map_sg(ide_drive_t *, struct request *); 1233void ide_map_sg(ide_drive_t *, struct request *);
1208void ide_init_sg_cmd(ide_drive_t *, struct request *); 1234void ide_init_sg_cmd(ide_drive_t *, struct request *);