]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - include/linux/ide.h
ide-{floppy,tape}: PC_FLAG_DMA_RECOMMENDED -> PC_FLAG_DMA_OK
[linux-2.6.git] / include / linux / ide.h
index eddb6daadf4abceaffec3f9a0b36603e2e97f4cb..63cee2947f60c18c31870080bf1f81572c01774f 100644 (file)
@@ -364,7 +364,6 @@ typedef struct ide_drive_s {
         u8     wcache;         /* status of write cache */
        u8      acoustic;       /* acoustic management */
        u8      media;          /* disk, cdrom, tape, floppy, ... */
-       u8      ctl;            /* "normal" value for Control register */
        u8      ready_stat;     /* min status value for drive ready */
        u8      mult_count;     /* current multiple sector setting */
        u8      mult_req;       /* requested multiple sector setting */
@@ -493,7 +492,7 @@ typedef struct hwif_s {
        void (*ide_dma_clear_irq)(ide_drive_t *drive);
 
        void (*OUTB)(u8 addr, unsigned long port);
-       void (*OUTBSYNC)(ide_drive_t *drive, u8 addr, unsigned long port);
+       void (*OUTBSYNC)(struct hwif_s *hwif, u8 addr, unsigned long port);
 
        u8  (*INB)(unsigned long port);
 
@@ -532,7 +531,6 @@ typedef struct hwif_s {
        unsigned        serialized : 1; /* serialized all channel operation */
        unsigned        sharing_irq: 1; /* 1 = sharing irq with another hwif */
        unsigned        sg_mapped  : 1; /* sg_table and sg_nents are ready */
-       unsigned        mmio       : 1; /* host uses MMIO */
 
        struct device           gendev;
        struct device           *portdev;
@@ -604,12 +602,11 @@ enum {
        PC_FLAG_SUPPRESS_ERROR          = (1 << 1),
        PC_FLAG_WAIT_FOR_DSC            = (1 << 2),
        PC_FLAG_DMA_OK                  = (1 << 3),
-       PC_FLAG_DMA_RECOMMENDED         = (1 << 4),
-       PC_FLAG_DMA_IN_PROGRESS         = (1 << 5),
-       PC_FLAG_DMA_ERROR               = (1 << 6),
-       PC_FLAG_WRITING                 = (1 << 7),
+       PC_FLAG_DMA_IN_PROGRESS         = (1 << 4),
+       PC_FLAG_DMA_ERROR               = (1 << 5),
+       PC_FLAG_WRITING                 = (1 << 6),
        /* command timed out */
-       PC_FLAG_TIMEDOUT                = (1 << 8),
+       PC_FLAG_TIMEDOUT                = (1 << 7),
 };
 
 struct ide_atapi_pc {
@@ -642,8 +639,8 @@ struct ide_atapi_pc {
         * to change/removal later.
         */
        u8 pc_buf[256];
-       void (*idefloppy_callback) (ide_drive_t *);
-       ide_startstop_t (*idetape_callback) (ide_drive_t *);
+
+       void (*callback)(ide_drive_t *);
 
        /* idetape only */
        struct idetape_bh *bh;
@@ -813,10 +810,6 @@ int generic_ide_ioctl(ide_drive_t *, struct file *, struct block_device *, unsig
 #ifndef _IDE_C
 extern ide_hwif_t      ide_hwifs[];            /* master data repository */
 #endif
-extern int ide_noacpi;
-extern int ide_acpigtf;
-extern int ide_acpionboot;
-extern int noautodma;
 
 extern int ide_vlb_clk;
 extern int ide_pci_clk;
@@ -857,25 +850,12 @@ int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long);
 
 extern ide_startstop_t ide_do_reset (ide_drive_t *);
 
-extern void ide_init_drive_cmd (struct request *rq);
-
-/*
- * "action" parameter type for ide_do_drive_cmd() below.
- */
-typedef enum {
-       ide_wait,       /* insert rq at end of list, and wait for it */
-       ide_preempt,    /* insert rq in front of current request */
-       ide_head_wait,  /* insert rq in front of current request and wait for it */
-       ide_end         /* insert rq at end of list, but don't wait for it */
-} ide_action_t;
-
-extern int ide_do_drive_cmd(ide_drive_t *, struct request *, ide_action_t);
+extern void ide_do_drive_cmd(ide_drive_t *, struct request *);
 
 extern void ide_end_drive_cmd(ide_drive_t *, u8, u8);
 
 enum {
        IDE_TFLAG_LBA48                 = (1 << 0),
-       IDE_TFLAG_NO_SELECT_MASK        = (1 << 1),
        IDE_TFLAG_FLAGGED               = (1 << 2),
        IDE_TFLAG_OUT_DATA              = (1 << 3),
        IDE_TFLAG_OUT_HOB_FEATURE       = (1 << 4),
@@ -980,6 +960,7 @@ typedef struct ide_task_s {
 void ide_tf_dump(const char *, struct ide_taskfile *);
 
 extern void SELECT_DRIVE(ide_drive_t *);
+void SELECT_MASK(ide_drive_t *, int);
 
 extern int drive_is_ready(ide_drive_t *);
 
@@ -996,8 +977,6 @@ int ide_taskfile_ioctl(ide_drive_t *, unsigned int, unsigned long);
 int ide_cmd_ioctl(ide_drive_t *, unsigned int, unsigned long);
 int ide_task_ioctl(ide_drive_t *, unsigned int, unsigned long);
 
-extern int system_bus_clock(void);
-
 extern int ide_driveid_update(ide_drive_t *);
 extern int ide_config_drive_speed(ide_drive_t *, u8);
 extern u8 eighty_ninty_three (ide_drive_t *);
@@ -1349,7 +1328,8 @@ static inline void ide_set_irq(ide_drive_t *drive, int on)
 {
        ide_hwif_t *hwif = drive->hwif;
 
-       hwif->OUTB(drive->ctl | (on ? 0 : 2), hwif->io_ports.ctl_addr);
+       hwif->OUTBSYNC(hwif, ATA_DEVCTL_OBS | (on ? 0 : 2),
+                      hwif->io_ports.ctl_addr);
 }
 
 static inline u8 ide_read_status(ide_drive_t *drive)