diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-alpha/ide.h | 1 | ||||
-rw-r--r-- | include/asm-arm/ide.h | 1 | ||||
-rw-r--r-- | include/asm-blackfin/ide.h | 1 | ||||
-rw-r--r-- | include/asm-cris/arch-v32/ide.h | 2 | ||||
-rw-r--r-- | include/asm-ia64/ide.h | 1 | ||||
-rw-r--r-- | include/asm-m32r/ide.h | 1 | ||||
-rw-r--r-- | include/asm-m68k/ide.h | 2 | ||||
-rw-r--r-- | include/asm-mips/mach-generic/ide.h | 1 | ||||
-rw-r--r-- | include/asm-parisc/ide.h | 1 | ||||
-rw-r--r-- | include/asm-powerpc/ide.h | 3 | ||||
-rw-r--r-- | include/asm-sh64/ide.h | 1 | ||||
-rw-r--r-- | include/asm-sparc/ide.h | 1 | ||||
-rw-r--r-- | include/asm-sparc64/ide.h | 1 | ||||
-rw-r--r-- | include/asm-x86/ide.h | 1 | ||||
-rw-r--r-- | include/linux/ide.h | 109 |
15 files changed, 36 insertions, 91 deletions
diff --git a/include/asm-alpha/ide.h b/include/asm-alpha/ide.h index 2a5cc0b367ab..b7bf68d0407b 100644 --- a/include/asm-alpha/ide.h +++ b/include/asm-alpha/ide.h | |||
@@ -40,7 +40,6 @@ static inline unsigned long ide_default_io_base(int index) | |||
40 | } | 40 | } |
41 | } | 41 | } |
42 | 42 | ||
43 | #define IDE_ARCH_OBSOLETE_INIT | ||
44 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | 43 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ |
45 | 44 | ||
46 | #ifdef CONFIG_PCI | 45 | #ifdef CONFIG_PCI |
diff --git a/include/asm-arm/ide.h b/include/asm-arm/ide.h index 4f68c8a5a199..f348fcf3150b 100644 --- a/include/asm-arm/ide.h +++ b/include/asm-arm/ide.h | |||
@@ -18,7 +18,6 @@ | |||
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | #if !defined(CONFIG_ARCH_L7200) | 20 | #if !defined(CONFIG_ARCH_L7200) |
21 | # define IDE_ARCH_OBSOLETE_INIT | ||
22 | # ifdef CONFIG_ARCH_CLPS7500 | 21 | # ifdef CONFIG_ARCH_CLPS7500 |
23 | # define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | 22 | # define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ |
24 | # else | 23 | # else |
diff --git a/include/asm-blackfin/ide.h b/include/asm-blackfin/ide.h index 41b2db46a168..121e272581d6 100644 --- a/include/asm-blackfin/ide.h +++ b/include/asm-blackfin/ide.h | |||
@@ -20,7 +20,6 @@ | |||
20 | #define MAX_HWIFS 1 | 20 | #define MAX_HWIFS 1 |
21 | 21 | ||
22 | /* Legacy ... BLK_DEV_IDECS */ | 22 | /* Legacy ... BLK_DEV_IDECS */ |
23 | #define IDE_ARCH_OBSOLETE_INIT | ||
24 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | 23 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ |
25 | 24 | ||
26 | 25 | ||
diff --git a/include/asm-cris/arch-v32/ide.h b/include/asm-cris/arch-v32/ide.h index 6590f657500d..11296170d057 100644 --- a/include/asm-cris/arch-v32/ide.h +++ b/include/asm-cris/arch-v32/ide.h | |||
@@ -54,7 +54,7 @@ static inline unsigned long ide_default_io_base(int index) | |||
54 | #define SUPPORT_VLB_SYNC 0 | 54 | #define SUPPORT_VLB_SYNC 0 |
55 | 55 | ||
56 | #define IDE_ARCH_ACK_INTR | 56 | #define IDE_ARCH_ACK_INTR |
57 | #define ide_ack_intr(hwif) (hwif)->hw.ack_intr(hwif) | 57 | #define ide_ack_intr(hwif) ((hwif)->ack_intr(hwif)) |
58 | 58 | ||
59 | #endif /* __KERNEL__ */ | 59 | #endif /* __KERNEL__ */ |
60 | 60 | ||
diff --git a/include/asm-ia64/ide.h b/include/asm-ia64/ide.h index e928675de352..1ccf23809329 100644 --- a/include/asm-ia64/ide.h +++ b/include/asm-ia64/ide.h | |||
@@ -46,7 +46,6 @@ static inline unsigned long ide_default_io_base(int index) | |||
46 | } | 46 | } |
47 | } | 47 | } |
48 | 48 | ||
49 | #define IDE_ARCH_OBSOLETE_INIT | ||
50 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | 49 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ |
51 | 50 | ||
52 | #ifdef CONFIG_PCI | 51 | #ifdef CONFIG_PCI |
diff --git a/include/asm-m32r/ide.h b/include/asm-m32r/ide.h index 4672a49e8760..5d2044e529ab 100644 --- a/include/asm-m32r/ide.h +++ b/include/asm-m32r/ide.h | |||
@@ -65,7 +65,6 @@ static __inline__ unsigned long ide_default_io_base(int index) | |||
65 | } | 65 | } |
66 | } | 66 | } |
67 | 67 | ||
68 | #define IDE_ARCH_OBSOLETE_INIT | ||
69 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | 68 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ |
70 | 69 | ||
71 | #ifdef CONFIG_BLK_DEV_IDEPCI | 70 | #ifdef CONFIG_BLK_DEV_IDEPCI |
diff --git a/include/asm-m68k/ide.h b/include/asm-m68k/ide.h index f9ffb2cbbae8..909c6dfd3851 100644 --- a/include/asm-m68k/ide.h +++ b/include/asm-m68k/ide.h | |||
@@ -137,7 +137,7 @@ ide_get_lock(irq_handler_t handler, void *data) | |||
137 | #endif /* CONFIG_BLK_DEV_FALCON_IDE */ | 137 | #endif /* CONFIG_BLK_DEV_FALCON_IDE */ |
138 | 138 | ||
139 | #define IDE_ARCH_ACK_INTR | 139 | #define IDE_ARCH_ACK_INTR |
140 | #define ide_ack_intr(hwif) ((hwif)->hw.ack_intr ? (hwif)->hw.ack_intr(hwif) : 1) | 140 | #define ide_ack_intr(hwif) ((hwif)->ack_intr ? (hwif)->ack_intr(hwif) : 1) |
141 | 141 | ||
142 | #endif /* __KERNEL__ */ | 142 | #endif /* __KERNEL__ */ |
143 | #endif /* _M68K_IDE_H */ | 143 | #endif /* _M68K_IDE_H */ |
diff --git a/include/asm-mips/mach-generic/ide.h b/include/asm-mips/mach-generic/ide.h index a77128362a7d..4ec2b930dfbb 100644 --- a/include/asm-mips/mach-generic/ide.h +++ b/include/asm-mips/mach-generic/ide.h | |||
@@ -98,7 +98,6 @@ static __inline__ unsigned long ide_default_io_base(int index) | |||
98 | } | 98 | } |
99 | } | 99 | } |
100 | 100 | ||
101 | #define IDE_ARCH_OBSOLETE_INIT | ||
102 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | 101 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ |
103 | 102 | ||
104 | #ifdef CONFIG_BLK_DEV_IDEPCI | 103 | #ifdef CONFIG_BLK_DEV_IDEPCI |
diff --git a/include/asm-parisc/ide.h b/include/asm-parisc/ide.h index b27bf7aeb256..be8760fbc8ee 100644 --- a/include/asm-parisc/ide.h +++ b/include/asm-parisc/ide.h | |||
@@ -17,7 +17,6 @@ | |||
17 | #define MAX_HWIFS 2 | 17 | #define MAX_HWIFS 2 |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | #define IDE_ARCH_OBSOLETE_INIT | ||
21 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | 20 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ |
22 | 21 | ||
23 | #define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id)) | 22 | #define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id)) |
diff --git a/include/asm-powerpc/ide.h b/include/asm-powerpc/ide.h index 1644e44c8757..fd7f5a430f0a 100644 --- a/include/asm-powerpc/ide.h +++ b/include/asm-powerpc/ide.h | |||
@@ -69,12 +69,11 @@ static __inline__ unsigned long ide_default_io_base(int index) | |||
69 | 69 | ||
70 | #ifdef CONFIG_BLK_DEV_MPC8xx_IDE | 70 | #ifdef CONFIG_BLK_DEV_MPC8xx_IDE |
71 | #define IDE_ARCH_ACK_INTR 1 | 71 | #define IDE_ARCH_ACK_INTR 1 |
72 | #define ide_ack_intr(hwif) (hwif->hw.ack_intr ? hwif->hw.ack_intr(hwif) : 1) | 72 | #define ide_ack_intr(hwif) ((hwif)->ack_intr ? (hwif)->ack_intr(hwif) : 1) |
73 | #endif | 73 | #endif |
74 | 74 | ||
75 | #endif /* __powerpc64__ */ | 75 | #endif /* __powerpc64__ */ |
76 | 76 | ||
77 | #define IDE_ARCH_OBSOLETE_INIT | ||
78 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | 77 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ |
79 | 78 | ||
80 | #endif /* __KERNEL__ */ | 79 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-sh64/ide.h b/include/asm-sh64/ide.h index c9d84d5f772e..b6e31e8b9410 100644 --- a/include/asm-sh64/ide.h +++ b/include/asm-sh64/ide.h | |||
@@ -19,7 +19,6 @@ | |||
19 | /* Without this, the initialisation of PCI IDE cards end up calling | 19 | /* Without this, the initialisation of PCI IDE cards end up calling |
20 | * ide_init_hwif_ports, which won't work. */ | 20 | * ide_init_hwif_ports, which won't work. */ |
21 | #ifdef CONFIG_BLK_DEV_IDEPCI | 21 | #ifdef CONFIG_BLK_DEV_IDEPCI |
22 | #define IDE_ARCH_OBSOLETE_INIT 1 | ||
23 | #define ide_default_io_ctl(base) (0) | 22 | #define ide_default_io_ctl(base) (0) |
24 | #endif | 23 | #endif |
25 | 24 | ||
diff --git a/include/asm-sparc/ide.h b/include/asm-sparc/ide.h index a6d735a1310e..404022765fc7 100644 --- a/include/asm-sparc/ide.h +++ b/include/asm-sparc/ide.h | |||
@@ -18,7 +18,6 @@ | |||
18 | #undef MAX_HWIFS | 18 | #undef MAX_HWIFS |
19 | #define MAX_HWIFS 2 | 19 | #define MAX_HWIFS 2 |
20 | 20 | ||
21 | #define IDE_ARCH_OBSOLETE_INIT | ||
22 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | 21 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ |
23 | 22 | ||
24 | #define __ide_insl(data_reg, buffer, wcount) \ | 23 | #define __ide_insl(data_reg, buffer, wcount) \ |
diff --git a/include/asm-sparc64/ide.h b/include/asm-sparc64/ide.h index 55149cf933c2..ac7eb210b941 100644 --- a/include/asm-sparc64/ide.h +++ b/include/asm-sparc64/ide.h | |||
@@ -24,7 +24,6 @@ | |||
24 | # endif | 24 | # endif |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | #define IDE_ARCH_OBSOLETE_INIT | ||
28 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | 27 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ |
29 | 28 | ||
30 | #define __ide_insl(data_reg, buffer, wcount) \ | 29 | #define __ide_insl(data_reg, buffer, wcount) \ |
diff --git a/include/asm-x86/ide.h b/include/asm-x86/ide.h index e7817a3d6578..42130adf9c7c 100644 --- a/include/asm-x86/ide.h +++ b/include/asm-x86/ide.h | |||
@@ -62,7 +62,6 @@ static __inline__ unsigned long ide_default_io_base(int index) | |||
62 | } | 62 | } |
63 | } | 63 | } |
64 | 64 | ||
65 | #define IDE_ARCH_OBSOLETE_INIT | ||
66 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | 65 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ |
67 | 66 | ||
68 | #ifdef CONFIG_BLK_DEV_IDEPCI | 67 | #ifdef CONFIG_BLK_DEV_IDEPCI |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 19db0a4ae447..2e4b8dd03cfe 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -192,22 +192,20 @@ typedef unsigned char byte; /* used everywhere */ | |||
192 | struct hwif_s; | 192 | struct hwif_s; |
193 | typedef int (ide_ack_intr_t)(struct hwif_s *); | 193 | typedef int (ide_ack_intr_t)(struct hwif_s *); |
194 | 194 | ||
195 | #ifndef NO_DMA | ||
196 | #define NO_DMA 255 | ||
197 | #endif | ||
198 | |||
199 | /* | 195 | /* |
200 | * hwif_chipset_t is used to keep track of the specific hardware | 196 | * hwif_chipset_t is used to keep track of the specific hardware |
201 | * chipset used by each IDE interface, if known. | 197 | * chipset used by each IDE interface, if known. |
202 | */ | 198 | */ |
203 | typedef enum { ide_unknown, ide_generic, ide_pci, | 199 | enum { ide_unknown, ide_generic, ide_pci, |
204 | ide_cmd640, ide_dtc2278, ide_ali14xx, | 200 | ide_cmd640, ide_dtc2278, ide_ali14xx, |
205 | ide_qd65xx, ide_umc8672, ide_ht6560b, | 201 | ide_qd65xx, ide_umc8672, ide_ht6560b, |
206 | ide_rz1000, ide_trm290, | 202 | ide_rz1000, ide_trm290, |
207 | ide_cmd646, ide_cy82c693, ide_4drives, | 203 | ide_cmd646, ide_cy82c693, ide_4drives, |
208 | ide_pmac, ide_etrax100, ide_acorn, | 204 | ide_pmac, ide_etrax100, ide_acorn, |
209 | ide_au1xxx, ide_forced | 205 | ide_au1xxx, ide_forced |
210 | } hwif_chipset_t; | 206 | }; |
207 | |||
208 | typedef u8 hwif_chipset_t; | ||
211 | 209 | ||
212 | /* | 210 | /* |
213 | * Structure to hold all information about the location of this port | 211 | * Structure to hold all information about the location of this port |
@@ -215,22 +213,16 @@ typedef enum { ide_unknown, ide_generic, ide_pci, | |||
215 | typedef struct hw_regs_s { | 213 | typedef struct hw_regs_s { |
216 | unsigned long io_ports[IDE_NR_PORTS]; /* task file registers */ | 214 | unsigned long io_ports[IDE_NR_PORTS]; /* task file registers */ |
217 | int irq; /* our irq number */ | 215 | int irq; /* our irq number */ |
218 | int dma; /* our dma entry */ | ||
219 | ide_ack_intr_t *ack_intr; /* acknowledge interrupt */ | 216 | ide_ack_intr_t *ack_intr; /* acknowledge interrupt */ |
220 | hwif_chipset_t chipset; | 217 | hwif_chipset_t chipset; |
221 | struct device *dev; | 218 | struct device *dev; |
222 | } hw_regs_t; | 219 | } hw_regs_t; |
223 | 220 | ||
224 | /* | 221 | struct hwif_s * ide_find_port(unsigned long); |
225 | * Register new hardware with ide | 222 | |
226 | */ | 223 | int ide_register_hw(hw_regs_t *, void (*)(struct hwif_s *), int, |
227 | int ide_register_hw(hw_regs_t *, int, struct hwif_s **); | 224 | struct hwif_s **); |
228 | int ide_register_hw_with_fixup(hw_regs_t *, int, struct hwif_s **, | ||
229 | void (*)(struct hwif_s *)); | ||
230 | 225 | ||
231 | /* | ||
232 | * Set up hw_regs_t structure before calling ide_register_hw (optional) | ||
233 | */ | ||
234 | void ide_setup_ports( hw_regs_t *hw, | 226 | void ide_setup_ports( hw_regs_t *hw, |
235 | unsigned long base, | 227 | unsigned long base, |
236 | int *offsets, | 228 | int *offsets, |
@@ -268,11 +260,7 @@ static inline void ide_std_init_ports(hw_regs_t *hw, | |||
268 | # define ide_init_default_irq(base) (0) | 260 | # define ide_init_default_irq(base) (0) |
269 | #endif | 261 | #endif |
270 | 262 | ||
271 | /* | 263 | #ifdef CONFIG_IDE_ARCH_OBSOLETE_INIT |
272 | * ide_init_hwif_ports() is OBSOLETE and will be removed in 2.7 series. | ||
273 | * New ports shouldn't define IDE_ARCH_OBSOLETE_INIT in <asm/ide.h>. | ||
274 | */ | ||
275 | #ifdef IDE_ARCH_OBSOLETE_INIT | ||
276 | static inline void ide_init_hwif_ports(hw_regs_t *hw, | 264 | static inline void ide_init_hwif_ports(hw_regs_t *hw, |
277 | unsigned long io_addr, | 265 | unsigned long io_addr, |
278 | unsigned long ctl_addr, | 266 | unsigned long ctl_addr, |
@@ -302,7 +290,7 @@ static inline void ide_init_hwif_ports(hw_regs_t *hw, | |||
302 | if (io_addr || ctl_addr) | 290 | if (io_addr || ctl_addr) |
303 | printk(KERN_WARNING "%s: must not be called\n", __FUNCTION__); | 291 | printk(KERN_WARNING "%s: must not be called\n", __FUNCTION__); |
304 | } | 292 | } |
305 | #endif /* IDE_ARCH_OBSOLETE_INIT */ | 293 | #endif /* CONFIG_IDE_ARCH_OBSOLETE_INIT */ |
306 | 294 | ||
307 | /* Currently only m68k, apus and m8xx need it */ | 295 | /* Currently only m68k, apus and m8xx need it */ |
308 | #ifndef IDE_ARCH_ACK_INTR | 296 | #ifndef IDE_ARCH_ACK_INTR |
@@ -363,7 +351,6 @@ typedef union { | |||
363 | * ATA DATA Register Special. | 351 | * ATA DATA Register Special. |
364 | * ATA NSECTOR Count Register(). | 352 | * ATA NSECTOR Count Register(). |
365 | * ATAPI Byte Count Register. | 353 | * ATAPI Byte Count Register. |
366 | * Channel index ordering pairs. | ||
367 | */ | 354 | */ |
368 | typedef union { | 355 | typedef union { |
369 | unsigned all :16; | 356 | unsigned all :16; |
@@ -378,7 +365,7 @@ typedef union { | |||
378 | #error "Please fix <asm/byteorder.h>" | 365 | #error "Please fix <asm/byteorder.h>" |
379 | #endif | 366 | #endif |
380 | } b; | 367 | } b; |
381 | } ata_nsector_t, ata_data_t, atapi_bcount_t, ata_index_t; | 368 | } ata_nsector_t, ata_data_t, atapi_bcount_t; |
382 | 369 | ||
383 | /* | 370 | /* |
384 | * ATA-IDE Select Register, aka Device-Head | 371 | * ATA-IDE Select Register, aka Device-Head |
@@ -657,7 +644,7 @@ typedef struct ide_drive_s { | |||
657 | ((1<<ide_pci)|(1<<ide_cmd646)|(1<<ide_ali14xx)) | 644 | ((1<<ide_pci)|(1<<ide_cmd646)|(1<<ide_ali14xx)) |
658 | #define IDE_CHIPSET_IS_PCI(c) ((IDE_CHIPSET_PCI_MASK >> (c)) & 1) | 645 | #define IDE_CHIPSET_IS_PCI(c) ((IDE_CHIPSET_PCI_MASK >> (c)) & 1) |
659 | 646 | ||
660 | struct ide_pci_device_s; | 647 | struct ide_port_info; |
661 | 648 | ||
662 | typedef struct hwif_s { | 649 | typedef struct hwif_s { |
663 | struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ | 650 | struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ |
@@ -672,7 +659,6 @@ typedef struct hwif_s { | |||
672 | unsigned long sata_scr[SATA_NR_PORTS]; | 659 | unsigned long sata_scr[SATA_NR_PORTS]; |
673 | unsigned long sata_misc[SATA_NR_PORTS]; | 660 | unsigned long sata_misc[SATA_NR_PORTS]; |
674 | 661 | ||
675 | hw_regs_t hw; /* Hardware info */ | ||
676 | ide_drive_t drives[MAX_DRIVES]; /* drive info */ | 662 | ide_drive_t drives[MAX_DRIVES]; /* drive info */ |
677 | 663 | ||
678 | u8 major; /* our major number */ | 664 | u8 major; /* our major number */ |
@@ -694,7 +680,9 @@ typedef struct hwif_s { | |||
694 | hwif_chipset_t chipset; /* sub-module for tuning.. */ | 680 | hwif_chipset_t chipset; /* sub-module for tuning.. */ |
695 | 681 | ||
696 | struct pci_dev *pci_dev; /* for pci chipsets */ | 682 | struct pci_dev *pci_dev; /* for pci chipsets */ |
697 | struct ide_pci_device_s *cds; /* chipset device struct */ | 683 | const struct ide_port_info *cds; /* chipset device struct */ |
684 | |||
685 | ide_ack_intr_t *ack_intr; | ||
698 | 686 | ||
699 | void (*rw_disk)(ide_drive_t *, struct request *); | 687 | void (*rw_disk)(ide_drive_t *, struct request *); |
700 | 688 | ||
@@ -725,6 +713,8 @@ typedef struct hwif_s { | |||
725 | u8 (*mdma_filter)(ide_drive_t *); | 713 | u8 (*mdma_filter)(ide_drive_t *); |
726 | u8 (*udma_filter)(ide_drive_t *); | 714 | u8 (*udma_filter)(ide_drive_t *); |
727 | 715 | ||
716 | void (*fixup)(struct hwif_s *); | ||
717 | |||
728 | void (*ata_input_data)(ide_drive_t *, void *, u32); | 718 | void (*ata_input_data)(ide_drive_t *, void *, u32); |
729 | void (*ata_output_data)(ide_drive_t *, void *, u32); | 719 | void (*ata_output_data)(ide_drive_t *, void *, u32); |
730 | 720 | ||
@@ -841,8 +831,6 @@ typedef struct hwgroup_s { | |||
841 | 831 | ||
842 | /* for pci chipsets */ | 832 | /* for pci chipsets */ |
843 | struct pci_dev *pci_dev; | 833 | struct pci_dev *pci_dev; |
844 | /* chipset device struct */ | ||
845 | struct ide_pci_device_s *cds; | ||
846 | 834 | ||
847 | /* current request */ | 835 | /* current request */ |
848 | struct request *rq; | 836 | struct request *rq; |
@@ -1030,36 +1018,16 @@ extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); | |||
1030 | int ide_end_dequeued_request(ide_drive_t *drive, struct request *rq, | 1018 | int ide_end_dequeued_request(ide_drive_t *drive, struct request *rq, |
1031 | int uptodate, int nr_sectors); | 1019 | int uptodate, int nr_sectors); |
1032 | 1020 | ||
1033 | /* | ||
1034 | * This is used on exit from the driver to designate the next irq handler | ||
1035 | * and also to start the safety timer. | ||
1036 | */ | ||
1037 | extern void ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry); | 1021 | extern void ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry); |
1038 | 1022 | ||
1039 | /* | ||
1040 | * This is used on exit from the driver to designate the next irq handler | ||
1041 | * and start the safety time safely and atomically from the IRQ handler | ||
1042 | * with respect to the command issue (which it also does) | ||
1043 | */ | ||
1044 | extern void ide_execute_command(ide_drive_t *, task_ioreg_t cmd, ide_handler_t *, unsigned int, ide_expiry_t *); | 1023 | extern void ide_execute_command(ide_drive_t *, task_ioreg_t cmd, ide_handler_t *, unsigned int, ide_expiry_t *); |
1045 | 1024 | ||
1046 | ide_startstop_t __ide_error(ide_drive_t *, struct request *, u8, u8); | 1025 | ide_startstop_t __ide_error(ide_drive_t *, struct request *, u8, u8); |
1047 | 1026 | ||
1048 | /* | ||
1049 | * ide_error() takes action based on the error returned by the controller. | ||
1050 | * The caller should return immediately after invoking this. | ||
1051 | * | ||
1052 | * (drive, msg, status) | ||
1053 | */ | ||
1054 | ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, byte stat); | 1027 | ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, byte stat); |
1055 | 1028 | ||
1056 | ide_startstop_t __ide_abort(ide_drive_t *, struct request *); | 1029 | ide_startstop_t __ide_abort(ide_drive_t *, struct request *); |
1057 | 1030 | ||
1058 | /* | ||
1059 | * Abort a running command on the controller triggering the abort | ||
1060 | * from a host side, non error situation | ||
1061 | * (drive, msg) | ||
1062 | */ | ||
1063 | extern ide_startstop_t ide_abort(ide_drive_t *, const char *); | 1031 | extern ide_startstop_t ide_abort(ide_drive_t *, const char *); |
1064 | 1032 | ||
1065 | extern void ide_fix_driveid(struct hd_driveid *); | 1033 | extern void ide_fix_driveid(struct hd_driveid *); |
@@ -1075,15 +1043,8 @@ extern void ide_fixstring(u8 *, const int, const int); | |||
1075 | 1043 | ||
1076 | int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); | 1044 | int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); |
1077 | 1045 | ||
1078 | /* | ||
1079 | * Start a reset operation for an IDE interface. | ||
1080 | * The caller should return immediately after invoking this. | ||
1081 | */ | ||
1082 | extern ide_startstop_t ide_do_reset (ide_drive_t *); | 1046 | extern ide_startstop_t ide_do_reset (ide_drive_t *); |
1083 | 1047 | ||
1084 | /* | ||
1085 | * This function is intended to be used prior to invoking ide_do_drive_cmd(). | ||
1086 | */ | ||
1087 | extern void ide_init_drive_cmd (struct request *rq); | 1048 | extern void ide_init_drive_cmd (struct request *rq); |
1088 | 1049 | ||
1089 | /* | 1050 | /* |
@@ -1098,13 +1059,6 @@ typedef enum { | |||
1098 | 1059 | ||
1099 | extern int ide_do_drive_cmd(ide_drive_t *, struct request *, ide_action_t); | 1060 | extern int ide_do_drive_cmd(ide_drive_t *, struct request *, ide_action_t); |
1100 | 1061 | ||
1101 | /* | ||
1102 | * Clean up after success/failure of an explicit drive cmd. | ||
1103 | * stat/err are used only when (HWGROUP(drive)->rq->cmd == IDE_DRIVE_CMD). | ||
1104 | * stat/err are used only when (HWGROUP(drive)->rq->cmd == IDE_DRIVE_TASK_MASK). | ||
1105 | * | ||
1106 | * (ide_drive_t *drive, u8 stat, u8 err) | ||
1107 | */ | ||
1108 | extern void ide_end_drive_cmd(ide_drive_t *, u8, u8); | 1062 | extern void ide_end_drive_cmd(ide_drive_t *, u8, u8); |
1109 | 1063 | ||
1110 | /* | 1064 | /* |
@@ -1177,10 +1131,6 @@ extern int taskfile_lib_get_identify(ide_drive_t *drive, u8 *); | |||
1177 | 1131 | ||
1178 | extern int ide_wait_not_busy(ide_hwif_t *hwif, unsigned long timeout); | 1132 | extern int ide_wait_not_busy(ide_hwif_t *hwif, unsigned long timeout); |
1179 | 1133 | ||
1180 | /* | ||
1181 | * ide_stall_queue() can be used by a drive to give excess bandwidth back | ||
1182 | * to the hwgroup by sleeping for timeout jiffies. | ||
1183 | */ | ||
1184 | extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout); | 1134 | extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout); |
1185 | 1135 | ||
1186 | extern int ide_spin_wait_hwgroup(ide_drive_t *); | 1136 | extern int ide_spin_wait_hwgroup(ide_drive_t *); |
@@ -1200,8 +1150,8 @@ extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *o | |||
1200 | #define ide_pci_register_driver(d) pci_register_driver(d) | 1150 | #define ide_pci_register_driver(d) pci_register_driver(d) |
1201 | #endif | 1151 | #endif |
1202 | 1152 | ||
1203 | void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, ata_index_t *); | 1153 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, u8 *); |
1204 | extern void ide_setup_pci_noise (struct pci_dev *dev, struct ide_pci_device_s *d); | 1154 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); |
1205 | 1155 | ||
1206 | extern void default_hwif_iops(ide_hwif_t *); | 1156 | extern void default_hwif_iops(ide_hwif_t *); |
1207 | extern void default_hwif_mmiops(ide_hwif_t *); | 1157 | extern void default_hwif_mmiops(ide_hwif_t *); |
@@ -1261,6 +1211,14 @@ enum { | |||
1261 | IDE_HFLAG_SERIALIZE = (1 << 20), | 1211 | IDE_HFLAG_SERIALIZE = (1 << 20), |
1262 | /* use legacy IRQs */ | 1212 | /* use legacy IRQs */ |
1263 | IDE_HFLAG_LEGACY_IRQS = (1 << 21), | 1213 | IDE_HFLAG_LEGACY_IRQS = (1 << 21), |
1214 | /* force use of legacy IRQs */ | ||
1215 | IDE_HFLAG_FORCE_LEGACY_IRQS = (1 << 22), | ||
1216 | /* limit LBA48 requests to 256 sectors */ | ||
1217 | IDE_HFLAG_RQSIZE_256 = (1 << 23), | ||
1218 | /* use 32-bit I/O ops */ | ||
1219 | IDE_HFLAG_IO_32BIT = (1 << 24), | ||
1220 | /* unmask IRQs */ | ||
1221 | IDE_HFLAG_UNMASK_IRQS = (1 << 25), | ||
1264 | }; | 1222 | }; |
1265 | 1223 | ||
1266 | #ifdef CONFIG_BLK_DEV_OFFBOARD | 1224 | #ifdef CONFIG_BLK_DEV_OFFBOARD |
@@ -1269,7 +1227,7 @@ enum { | |||
1269 | # define IDE_HFLAG_OFF_BOARD 0 | 1227 | # define IDE_HFLAG_OFF_BOARD 0 |
1270 | #endif | 1228 | #endif |
1271 | 1229 | ||
1272 | typedef struct ide_pci_device_s { | 1230 | struct ide_port_info { |
1273 | char *name; | 1231 | char *name; |
1274 | unsigned int (*init_chipset)(struct pci_dev *, const char *); | 1232 | unsigned int (*init_chipset)(struct pci_dev *, const char *); |
1275 | void (*init_iops)(ide_hwif_t *); | 1233 | void (*init_iops)(ide_hwif_t *); |
@@ -1277,17 +1235,17 @@ typedef struct ide_pci_device_s { | |||
1277 | void (*init_dma)(ide_hwif_t *, unsigned long); | 1235 | void (*init_dma)(ide_hwif_t *, unsigned long); |
1278 | void (*fixup)(ide_hwif_t *); | 1236 | void (*fixup)(ide_hwif_t *); |
1279 | ide_pci_enablebit_t enablebits[2]; | 1237 | ide_pci_enablebit_t enablebits[2]; |
1238 | hwif_chipset_t chipset; | ||
1280 | unsigned int extra; | 1239 | unsigned int extra; |
1281 | struct ide_pci_device_s *next; | ||
1282 | u32 host_flags; | 1240 | u32 host_flags; |
1283 | u8 pio_mask; | 1241 | u8 pio_mask; |
1284 | u8 swdma_mask; | 1242 | u8 swdma_mask; |
1285 | u8 mwdma_mask; | 1243 | u8 mwdma_mask; |
1286 | u8 udma_mask; | 1244 | u8 udma_mask; |
1287 | } ide_pci_device_t; | 1245 | }; |
1288 | 1246 | ||
1289 | extern int ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *); | 1247 | int ide_setup_pci_device(struct pci_dev *, const struct ide_port_info *); |
1290 | extern int ide_setup_pci_devices(struct pci_dev *, struct pci_dev *, ide_pci_device_t *); | 1248 | int ide_setup_pci_devices(struct pci_dev *, struct pci_dev *, const struct ide_port_info *); |
1291 | 1249 | ||
1292 | void ide_map_sg(ide_drive_t *, struct request *); | 1250 | void ide_map_sg(ide_drive_t *, struct request *); |
1293 | void ide_init_sg_cmd(ide_drive_t *, struct request *); | 1251 | void ide_init_sg_cmd(ide_drive_t *, struct request *); |
@@ -1370,8 +1328,7 @@ void ide_unregister_region(struct gendisk *); | |||
1370 | 1328 | ||
1371 | void ide_undecoded_slave(ide_hwif_t *); | 1329 | void ide_undecoded_slave(ide_hwif_t *); |
1372 | 1330 | ||
1373 | int probe_hwif_init_with_fixup(ide_hwif_t *, void (*)(ide_hwif_t *)); | 1331 | int ide_device_add(u8 idx[4]); |
1374 | extern int probe_hwif_init(ide_hwif_t *); | ||
1375 | 1332 | ||
1376 | static inline void *ide_get_hwifdata (ide_hwif_t * hwif) | 1333 | static inline void *ide_get_hwifdata (ide_hwif_t * hwif) |
1377 | { | 1334 | { |