diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-14 21:58:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-14 21:58:46 -0500 |
commit | 7116317dc9148d783846299fc80a7d377baa6dca (patch) | |
tree | 55616e245d7e6f509753d06da03c7b8c4e3896f7 /include | |
parent | 2499604960fff307fe99ff4d4363c50eaa69235a (diff) | |
parent | 0afaa4fc4abc773ce129f41009a50eeecf3aa50c (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-mips/mach-au1x00/au1xxx_ide.h | 22 | ||||
-rw-r--r-- | include/linux/ide.h | 131 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 1 |
3 files changed, 15 insertions, 139 deletions
diff --git a/include/asm-mips/mach-au1x00/au1xxx_ide.h b/include/asm-mips/mach-au1x00/au1xxx_ide.h index 33d275c3b84c..e867b4ef96d1 100644 --- a/include/asm-mips/mach-au1x00/au1xxx_ide.h +++ b/include/asm-mips/mach-au1x00/au1xxx_ide.h | |||
@@ -74,9 +74,6 @@ typedef struct | |||
74 | u8 white_list, black_list; | 74 | u8 white_list, black_list; |
75 | struct dbdma_cmd *dma_table_cpu; | 75 | struct dbdma_cmd *dma_table_cpu; |
76 | dma_addr_t dma_table_dma; | 76 | dma_addr_t dma_table_dma; |
77 | struct scatterlist *sg_table; | ||
78 | int sg_nents; | ||
79 | int sg_dma_direction; | ||
80 | #endif | 77 | #endif |
81 | struct device *dev; | 78 | struct device *dev; |
82 | int irq; | 79 | int irq; |
@@ -87,11 +84,6 @@ typedef struct | |||
87 | } _auide_hwif; | 84 | } _auide_hwif; |
88 | 85 | ||
89 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA | 86 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA |
90 | struct drive_list_entry { | ||
91 | const char * id_model; | ||
92 | const char * id_firmware; | ||
93 | }; | ||
94 | |||
95 | /* HD white list */ | 87 | /* HD white list */ |
96 | static const struct drive_list_entry dma_white_list [] = { | 88 | static const struct drive_list_entry dma_white_list [] = { |
97 | /* | 89 | /* |
@@ -167,13 +159,9 @@ int __init auide_probe(void); | |||
167 | * Multi-Word DMA + DbDMA functions | 159 | * Multi-Word DMA + DbDMA functions |
168 | */ | 160 | */ |
169 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA | 161 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA |
170 | |||
171 | static int in_drive_list(struct hd_driveid *id, | ||
172 | const struct drive_list_entry *drive_table); | ||
173 | static int auide_build_sglist(ide_drive_t *drive, struct request *rq); | 162 | static int auide_build_sglist(ide_drive_t *drive, struct request *rq); |
174 | static int auide_build_dmatable(ide_drive_t *drive); | 163 | static int auide_build_dmatable(ide_drive_t *drive); |
175 | static int auide_dma_end(ide_drive_t *drive); | 164 | static int auide_dma_end(ide_drive_t *drive); |
176 | static void auide_dma_start(ide_drive_t *drive ); | ||
177 | ide_startstop_t auide_dma_intr (ide_drive_t *drive); | 165 | ide_startstop_t auide_dma_intr (ide_drive_t *drive); |
178 | static void auide_dma_exec_cmd(ide_drive_t *drive, u8 command); | 166 | static void auide_dma_exec_cmd(ide_drive_t *drive, u8 command); |
179 | static int auide_dma_setup(ide_drive_t *drive); | 167 | static int auide_dma_setup(ide_drive_t *drive); |
@@ -188,8 +176,6 @@ int __init auide_probe(void); | |||
188 | static void auide_ddma_rx_callback(int irq, void *param, | 176 | static void auide_ddma_rx_callback(int irq, void *param, |
189 | struct pt_regs *regs); | 177 | struct pt_regs *regs); |
190 | static int auide_dma_off_quietly(ide_drive_t *drive); | 178 | static int auide_dma_off_quietly(ide_drive_t *drive); |
191 | static int auide_dma_timeout(ide_drive_t *drive); | ||
192 | |||
193 | #endif /* end CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA */ | 179 | #endif /* end CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA */ |
194 | 180 | ||
195 | /******************************************************************************* | 181 | /******************************************************************************* |
@@ -299,3 +285,11 @@ int __init auide_probe(void); | |||
299 | #define SBC_IDE_MDMA2_TPM (0x00<<6) | 285 | #define SBC_IDE_MDMA2_TPM (0x00<<6) |
300 | #define SBC_IDE_MDMA2_TA (0x12<<0) | 286 | #define SBC_IDE_MDMA2_TA (0x12<<0) |
301 | 287 | ||
288 | #define SBC_IDE_TIMING(mode) \ | ||
289 | SBC_IDE_##mode##_TWCS | \ | ||
290 | SBC_IDE_##mode##_TCSH | \ | ||
291 | SBC_IDE_##mode##_TCSOFF | \ | ||
292 | SBC_IDE_##mode##_TWP | \ | ||
293 | SBC_IDE_##mode##_TCSW | \ | ||
294 | SBC_IDE_##mode##_TPM | \ | ||
295 | SBC_IDE_##mode##_TA | ||
diff --git a/include/linux/ide.h b/include/linux/ide.h index a39c3c59789d..7b6a6a58e465 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -23,17 +23,6 @@ | |||
23 | #include <asm/io.h> | 23 | #include <asm/io.h> |
24 | #include <asm/semaphore.h> | 24 | #include <asm/semaphore.h> |
25 | 25 | ||
26 | /* | ||
27 | * This is the multiple IDE interface driver, as evolved from hd.c. | ||
28 | * It supports up to four IDE interfaces, on one or more IRQs (usually 14 & 15). | ||
29 | * There can be up to two drives per interface, as per the ATA-2 spec. | ||
30 | * | ||
31 | * Primary i/f: ide0: major=3; (hda) minor=0; (hdb) minor=64 | ||
32 | * Secondary i/f: ide1: major=22; (hdc or hd1a) minor=0; (hdd or hd1b) minor=64 | ||
33 | * Tertiary i/f: ide2: major=33; (hde) minor=0; (hdf) minor=64 | ||
34 | * Quaternary i/f: ide3: major=34; (hdg) minor=0; (hdh) minor=64 | ||
35 | */ | ||
36 | |||
37 | /****************************************************************************** | 26 | /****************************************************************************** |
38 | * IDE driver configuration options (play with these as desired): | 27 | * IDE driver configuration options (play with these as desired): |
39 | * | 28 | * |
@@ -193,11 +182,6 @@ typedef unsigned char byte; /* used everywhere */ | |||
193 | #define WAIT_CMD (10*HZ) /* 10sec - maximum wait for an IRQ to happen */ | 182 | #define WAIT_CMD (10*HZ) /* 10sec - maximum wait for an IRQ to happen */ |
194 | #define WAIT_MIN_SLEEP (2*HZ/100) /* 20msec - minimum sleep time */ | 183 | #define WAIT_MIN_SLEEP (2*HZ/100) /* 20msec - minimum sleep time */ |
195 | 184 | ||
196 | #define HOST(hwif,chipset) \ | ||
197 | { \ | ||
198 | return ((hwif)->chipset == chipset) ? 1 : 0; \ | ||
199 | } | ||
200 | |||
201 | /* | 185 | /* |
202 | * Check for an interrupt and acknowledge the interrupt status | 186 | * Check for an interrupt and acknowledge the interrupt status |
203 | */ | 187 | */ |
@@ -391,45 +375,6 @@ typedef union { | |||
391 | } ata_nsector_t, ata_data_t, atapi_bcount_t, ata_index_t; | 375 | } ata_nsector_t, ata_data_t, atapi_bcount_t, ata_index_t; |
392 | 376 | ||
393 | /* | 377 | /* |
394 | * ATA-IDE Error Register | ||
395 | * | ||
396 | * mark : Bad address mark | ||
397 | * tzero : Couldn't find track 0 | ||
398 | * abrt : Aborted Command | ||
399 | * mcr : Media Change Request | ||
400 | * id : ID field not found | ||
401 | * mce : Media Change Event | ||
402 | * ecc : Uncorrectable ECC error | ||
403 | * bdd : dual meaing | ||
404 | */ | ||
405 | typedef union { | ||
406 | unsigned all :8; | ||
407 | struct { | ||
408 | #if defined(__LITTLE_ENDIAN_BITFIELD) | ||
409 | unsigned mark :1; | ||
410 | unsigned tzero :1; | ||
411 | unsigned abrt :1; | ||
412 | unsigned mcr :1; | ||
413 | unsigned id :1; | ||
414 | unsigned mce :1; | ||
415 | unsigned ecc :1; | ||
416 | unsigned bdd :1; | ||
417 | #elif defined(__BIG_ENDIAN_BITFIELD) | ||
418 | unsigned bdd :1; | ||
419 | unsigned ecc :1; | ||
420 | unsigned mce :1; | ||
421 | unsigned id :1; | ||
422 | unsigned mcr :1; | ||
423 | unsigned abrt :1; | ||
424 | unsigned tzero :1; | ||
425 | unsigned mark :1; | ||
426 | #else | ||
427 | #error "Please fix <asm/byteorder.h>" | ||
428 | #endif | ||
429 | } b; | ||
430 | } ata_error_t; | ||
431 | |||
432 | /* | ||
433 | * ATA-IDE Select Register, aka Device-Head | 378 | * ATA-IDE Select Register, aka Device-Head |
434 | * | 379 | * |
435 | * head : always zeros here | 380 | * head : always zeros here |
@@ -504,39 +449,6 @@ typedef union { | |||
504 | } ata_status_t, atapi_status_t; | 449 | } ata_status_t, atapi_status_t; |
505 | 450 | ||
506 | /* | 451 | /* |
507 | * ATA-IDE Control Register | ||
508 | * | ||
509 | * bit0 : Should be set to zero | ||
510 | * nIEN : device INTRQ to host | ||
511 | * SRST : host soft reset bit | ||
512 | * bit3 : ATA-2 thingy, Should be set to 1 | ||
513 | * reserved456 : Reserved | ||
514 | * HOB : 48-bit address ordering, High Ordered Bit | ||
515 | */ | ||
516 | typedef union { | ||
517 | unsigned all : 8; | ||
518 | struct { | ||
519 | #if defined(__LITTLE_ENDIAN_BITFIELD) | ||
520 | unsigned bit0 : 1; | ||
521 | unsigned nIEN : 1; | ||
522 | unsigned SRST : 1; | ||
523 | unsigned bit3 : 1; | ||
524 | unsigned reserved456 : 3; | ||
525 | unsigned HOB : 1; | ||
526 | #elif defined(__BIG_ENDIAN_BITFIELD) | ||
527 | unsigned HOB : 1; | ||
528 | unsigned reserved456 : 3; | ||
529 | unsigned bit3 : 1; | ||
530 | unsigned SRST : 1; | ||
531 | unsigned nIEN : 1; | ||
532 | unsigned bit0 : 1; | ||
533 | #else | ||
534 | #error "Please fix <asm/byteorder.h>" | ||
535 | #endif | ||
536 | } b; | ||
537 | } ata_control_t; | ||
538 | |||
539 | /* | ||
540 | * ATAPI Feature Register | 452 | * ATAPI Feature Register |
541 | * | 453 | * |
542 | * dma : Using DMA or PIO | 454 | * dma : Using DMA or PIO |
@@ -618,39 +530,6 @@ typedef union { | |||
618 | } atapi_error_t; | 530 | } atapi_error_t; |
619 | 531 | ||
620 | /* | 532 | /* |
621 | * ATAPI floppy Drive Select Register | ||
622 | * | ||
623 | * sam_lun : Logical unit number | ||
624 | * reserved3 : Reserved | ||
625 | * drv : The responding drive will be drive 0 (0) or drive 1 (1) | ||
626 | * one5 : Should be set to 1 | ||
627 | * reserved6 : Reserved | ||
628 | * one7 : Should be set to 1 | ||
629 | */ | ||
630 | typedef union { | ||
631 | unsigned all :8; | ||
632 | struct { | ||
633 | #if defined(__LITTLE_ENDIAN_BITFIELD) | ||
634 | unsigned sam_lun :3; | ||
635 | unsigned reserved3 :1; | ||
636 | unsigned drv :1; | ||
637 | unsigned one5 :1; | ||
638 | unsigned reserved6 :1; | ||
639 | unsigned one7 :1; | ||
640 | #elif defined(__BIG_ENDIAN_BITFIELD) | ||
641 | unsigned one7 :1; | ||
642 | unsigned reserved6 :1; | ||
643 | unsigned one5 :1; | ||
644 | unsigned drv :1; | ||
645 | unsigned reserved3 :1; | ||
646 | unsigned sam_lun :3; | ||
647 | #else | ||
648 | #error "Please fix <asm/byteorder.h>" | ||
649 | #endif | ||
650 | } b; | ||
651 | } atapi_select_t; | ||
652 | |||
653 | /* | ||
654 | * Status returned from various ide_ functions | 533 | * Status returned from various ide_ functions |
655 | */ | 534 | */ |
656 | typedef enum { | 535 | typedef enum { |
@@ -1101,10 +980,7 @@ typedef struct ide_driver_s { | |||
1101 | int (*end_request)(ide_drive_t *, int, int); | 980 | int (*end_request)(ide_drive_t *, int, int); |
1102 | ide_startstop_t (*error)(ide_drive_t *, struct request *rq, u8, u8); | 981 | ide_startstop_t (*error)(ide_drive_t *, struct request *rq, u8, u8); |
1103 | ide_startstop_t (*abort)(ide_drive_t *, struct request *rq); | 982 | ide_startstop_t (*abort)(ide_drive_t *, struct request *rq); |
1104 | int (*ioctl)(ide_drive_t *, struct inode *, struct file *, unsigned int, unsigned long); | ||
1105 | ide_proc_entry_t *proc; | 983 | ide_proc_entry_t *proc; |
1106 | void (*ata_prebuilder)(ide_drive_t *); | ||
1107 | void (*atapi_prebuilder)(ide_drive_t *); | ||
1108 | struct device_driver gen_driver; | 984 | struct device_driver gen_driver; |
1109 | } ide_driver_t; | 985 | } ide_driver_t; |
1110 | 986 | ||
@@ -1298,7 +1174,6 @@ extern int ide_spin_wait_hwgroup(ide_drive_t *); | |||
1298 | extern void ide_timer_expiry(unsigned long); | 1174 | extern void ide_timer_expiry(unsigned long); |
1299 | extern irqreturn_t ide_intr(int irq, void *dev_id, struct pt_regs *regs); | 1175 | extern irqreturn_t ide_intr(int irq, void *dev_id, struct pt_regs *regs); |
1300 | extern void do_ide_request(request_queue_t *); | 1176 | extern void do_ide_request(request_queue_t *); |
1301 | extern void ide_init_subdrivers(void); | ||
1302 | 1177 | ||
1303 | void ide_init_disk(struct gendisk *, ide_drive_t *); | 1178 | void ide_init_disk(struct gendisk *, ide_drive_t *); |
1304 | 1179 | ||
@@ -1371,6 +1246,12 @@ void ide_init_sg_cmd(ide_drive_t *, struct request *); | |||
1371 | #define GOOD_DMA_DRIVE 1 | 1246 | #define GOOD_DMA_DRIVE 1 |
1372 | 1247 | ||
1373 | #ifdef CONFIG_BLK_DEV_IDEDMA | 1248 | #ifdef CONFIG_BLK_DEV_IDEDMA |
1249 | struct drive_list_entry { | ||
1250 | const char *id_model; | ||
1251 | const char *id_firmware; | ||
1252 | }; | ||
1253 | |||
1254 | int ide_in_drive_list(struct hd_driveid *, const struct drive_list_entry *); | ||
1374 | int __ide_dma_bad_drive(ide_drive_t *); | 1255 | int __ide_dma_bad_drive(ide_drive_t *); |
1375 | int __ide_dma_good_drive(ide_drive_t *); | 1256 | int __ide_dma_good_drive(ide_drive_t *); |
1376 | int ide_use_dma(ide_drive_t *); | 1257 | int ide_use_dma(ide_drive_t *); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 1e737e269db9..4db67b3b05cc 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1244,6 +1244,7 @@ | |||
1244 | #define PCI_DEVICE_ID_VIA_8378_0 0x3205 | 1244 | #define PCI_DEVICE_ID_VIA_8378_0 0x3205 |
1245 | #define PCI_DEVICE_ID_VIA_8783_0 0x3208 | 1245 | #define PCI_DEVICE_ID_VIA_8783_0 0x3208 |
1246 | #define PCI_DEVICE_ID_VIA_8237 0x3227 | 1246 | #define PCI_DEVICE_ID_VIA_8237 0x3227 |
1247 | #define PCI_DEVICE_ID_VIA_8251 0x3287 | ||
1247 | #define PCI_DEVICE_ID_VIA_3296_0 0x0296 | 1248 | #define PCI_DEVICE_ID_VIA_3296_0 0x0296 |
1248 | #define PCI_DEVICE_ID_VIA_8231 0x8231 | 1249 | #define PCI_DEVICE_ID_VIA_8231 0x8231 |
1249 | #define PCI_DEVICE_ID_VIA_8231_4 0x8235 | 1250 | #define PCI_DEVICE_ID_VIA_8231_4 0x8235 |