]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/ide.h
ide: add ide_pio_cycle_time() helper (take 2)
[linux-2.6-omap-h63xx.git] / include / linux / ide.h
index 19ab25804056b7b467197d89f1d6b8a02a757912..0afa52c14ffaefc980e4e3597a86020882fe0a76 100644 (file)
@@ -1244,7 +1244,8 @@ typedef struct ide_pci_enablebit_s {
 
 enum {
        /* Uses ISA control ports not PCI ones. */
-       IDEPCI_FLAG_ISA_PORTS           = (1 << 0),
+       IDE_HFLAG_ISA_PORTS             = (1 << 0),
+       IDE_HFLAG_SINGLE                = (1 << 1),
 };
 
 typedef struct ide_pci_device_s {
@@ -1256,13 +1257,12 @@ typedef struct ide_pci_device_s {
        void                    (*init_hwif)(ide_hwif_t *);
        void                    (*init_dma)(ide_hwif_t *, unsigned long);
        void                    (*fixup)(ide_hwif_t *);
-       u8                      channels;
        u8                      autodma;
        ide_pci_enablebit_t     enablebits[2];
        u8                      bootable;
        unsigned int            extra;
        struct ide_pci_device_s *next;
-       u8                      flags;
+       u8                      host_flags;
        u8                      udma_mask;
 } ide_pci_device_t;
 
@@ -1363,6 +1363,11 @@ extern void ide_toggle_bounce(ide_drive_t *drive, int on);
 extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate);
 int ide_use_fast_pio(ide_drive_t *);
 
+static inline int ide_dev_has_iordy(struct hd_driveid *id)
+{
+       return ((id->field_valid & 2) && (id->capability & 8)) ? 1 : 0;
+}
+
 u8 ide_dump_status(ide_drive_t *, const char *, u8);
 
 typedef struct ide_pio_timings_s {
@@ -1374,11 +1379,9 @@ typedef struct ide_pio_timings_s {
 
 typedef struct ide_pio_data_s {
        u8 pio_mode;
-       u8 use_iordy;
-       u8 overridden;
-       unsigned int cycle_time;
 } ide_pio_data_t;
 
+unsigned int ide_pio_cycle_time(ide_drive_t *, u8);
 extern u8 ide_get_best_pio_mode (ide_drive_t *drive, u8 mode_wanted, u8 max_mode, ide_pio_data_t *d);
 extern const ide_pio_timings_t ide_pio_timings[6];