aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 19:31:22 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 19:31:22 -0400
commit64fb98fc40738ae1a98bcea9ca3145b89fb71524 (patch)
tree24130f9c56b04638e91969d216db199652470a17 /include
parent5f47c7eac65a45e33d7fe390effe75ec5c74f8bf (diff)
parent89636af25d75d8672aea05d258be357d0dc4bd70 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6: (23 commits) ide: add support for SCSI ioctls to ide-floppy ide: remove stale changelog from setup-pci.c ide: remove stale changelog/comments/TODO from ide.c ide-cris: handle PIO auto-tuning in tune_cris_ide() ide: add PIO masks ide: remove ide_find_best_pio_mode() ide: drop "PIO data" argument from ide_get_best_pio_mode() ide: ide_find_best_pio_mode() fixes (take 2) ide: add ide_pio_cycle_time() helper (take 2) sc1200: remove stale Power Management code ide: ide_start_power_step() fix WRT disabling DMA serverworks: fix DMA serverworks: always tune PIO ide: add ide_pci_device_t.host_flags (take 2) ide: add ide_dev_has_iordy() helper (take 4) ide: make ide_get_best_pio_mode() print info if overriding PIO mode siimage: PIO mode setup fixes (take 2) atiixp: PIO mode setup fixes ide: Stop mapping ROMs IDE: Remove references to dead ETRAX-related variables. ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/ata.h9
-rw-r--r--include/linux/ide.h31
2 files changed, 29 insertions, 11 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h
index b5a20162af32..23a22df039d8 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -64,6 +64,15 @@ enum {
64 ATA_ID_PROD_LEN = 40, 64 ATA_ID_PROD_LEN = 40,
65 65
66 ATA_PCI_CTL_OFS = 2, 66 ATA_PCI_CTL_OFS = 2,
67
68 ATA_PIO0 = (1 << 0),
69 ATA_PIO1 = ATA_PIO0 | (1 << 1),
70 ATA_PIO2 = ATA_PIO1 | (1 << 2),
71 ATA_PIO3 = ATA_PIO2 | (1 << 3),
72 ATA_PIO4 = ATA_PIO3 | (1 << 4),
73 ATA_PIO5 = ATA_PIO4 | (1 << 5),
74 ATA_PIO6 = ATA_PIO5 | (1 << 6),
75
67 ATA_UDMA0 = (1 << 0), 76 ATA_UDMA0 = (1 << 0),
68 ATA_UDMA1 = ATA_UDMA0 | (1 << 1), 77 ATA_UDMA1 = ATA_UDMA0 | (1 << 1),
69 ATA_UDMA2 = ATA_UDMA1 | (1 << 2), 78 ATA_UDMA2 = ATA_UDMA1 | (1 << 2),
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 19ab25804056..5f5daad8bc54 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -681,6 +681,10 @@ typedef struct hwif_s {
681 u8 straight8; /* Alan's straight 8 check */ 681 u8 straight8; /* Alan's straight 8 check */
682 u8 bus_state; /* power state of the IDE bus */ 682 u8 bus_state; /* power state of the IDE bus */
683 683
684 u8 host_flags;
685
686 u8 pio_mask;
687
684 u8 atapi_dma; /* host supports atapi_dma */ 688 u8 atapi_dma; /* host supports atapi_dma */
685 u8 ultra_mask; 689 u8 ultra_mask;
686 u8 mwdma_mask; 690 u8 mwdma_mask;
@@ -1244,7 +1248,13 @@ typedef struct ide_pci_enablebit_s {
1244 1248
1245enum { 1249enum {
1246 /* Uses ISA control ports not PCI ones. */ 1250 /* Uses ISA control ports not PCI ones. */
1247 IDEPCI_FLAG_ISA_PORTS = (1 << 0), 1251 IDE_HFLAG_ISA_PORTS = (1 << 0),
1252 /* single port device */
1253 IDE_HFLAG_SINGLE = (1 << 1),
1254 /* don't use legacy PIO blacklist */
1255 IDE_HFLAG_PIO_NO_BLACKLIST = (1 << 2),
1256 /* don't use conservative PIO "downgrade" */
1257 IDE_HFLAG_PIO_NO_DOWNGRADE = (1 << 3),
1248}; 1258};
1249 1259
1250typedef struct ide_pci_device_s { 1260typedef struct ide_pci_device_s {
@@ -1256,13 +1266,13 @@ typedef struct ide_pci_device_s {
1256 void (*init_hwif)(ide_hwif_t *); 1266 void (*init_hwif)(ide_hwif_t *);
1257 void (*init_dma)(ide_hwif_t *, unsigned long); 1267 void (*init_dma)(ide_hwif_t *, unsigned long);
1258 void (*fixup)(ide_hwif_t *); 1268 void (*fixup)(ide_hwif_t *);
1259 u8 channels;
1260 u8 autodma; 1269 u8 autodma;
1261 ide_pci_enablebit_t enablebits[2]; 1270 ide_pci_enablebit_t enablebits[2];
1262 u8 bootable; 1271 u8 bootable;
1263 unsigned int extra; 1272 unsigned int extra;
1264 struct ide_pci_device_s *next; 1273 struct ide_pci_device_s *next;
1265 u8 flags; 1274 u8 host_flags;
1275 u8 pio_mask;
1266 u8 udma_mask; 1276 u8 udma_mask;
1267} ide_pci_device_t; 1277} ide_pci_device_t;
1268 1278
@@ -1363,6 +1373,11 @@ extern void ide_toggle_bounce(ide_drive_t *drive, int on);
1363extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); 1373extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate);
1364int ide_use_fast_pio(ide_drive_t *); 1374int ide_use_fast_pio(ide_drive_t *);
1365 1375
1376static inline int ide_dev_has_iordy(struct hd_driveid *id)
1377{
1378 return ((id->field_valid & 2) && (id->capability & 8)) ? 1 : 0;
1379}
1380
1366u8 ide_dump_status(ide_drive_t *, const char *, u8); 1381u8 ide_dump_status(ide_drive_t *, const char *, u8);
1367 1382
1368typedef struct ide_pio_timings_s { 1383typedef struct ide_pio_timings_s {
@@ -1372,14 +1387,8 @@ typedef struct ide_pio_timings_s {
1372 /* active + recovery (+ setup for some chips) */ 1387 /* active + recovery (+ setup for some chips) */
1373} ide_pio_timings_t; 1388} ide_pio_timings_t;
1374 1389
1375typedef struct ide_pio_data_s { 1390unsigned int ide_pio_cycle_time(ide_drive_t *, u8);
1376 u8 pio_mode; 1391u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8);
1377 u8 use_iordy;
1378 u8 overridden;
1379 unsigned int cycle_time;
1380} ide_pio_data_t;
1381
1382extern u8 ide_get_best_pio_mode (ide_drive_t *drive, u8 mode_wanted, u8 max_mode, ide_pio_data_t *d);
1383extern const ide_pio_timings_t ide_pio_timings[6]; 1392extern const ide_pio_timings_t ide_pio_timings[6];
1384 1393
1385 1394