diff options
Diffstat (limited to 'drivers/ide/ide-iops.c')
-rw-r--r-- | drivers/ide/ide-iops.c | 50 |
1 files changed, 11 insertions, 39 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index bb9693dabe41..c97c0719ddf1 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -158,14 +158,6 @@ void default_hwif_mmiops (ide_hwif_t *hwif) | |||
158 | 158 | ||
159 | EXPORT_SYMBOL(default_hwif_mmiops); | 159 | EXPORT_SYMBOL(default_hwif_mmiops); |
160 | 160 | ||
161 | u32 ide_read_24 (ide_drive_t *drive) | ||
162 | { | ||
163 | u8 hcyl = HWIF(drive)->INB(IDE_HCYL_REG); | ||
164 | u8 lcyl = HWIF(drive)->INB(IDE_LCYL_REG); | ||
165 | u8 sect = HWIF(drive)->INB(IDE_SECTOR_REG); | ||
166 | return (hcyl<<16)|(lcyl<<8)|sect; | ||
167 | } | ||
168 | |||
169 | void SELECT_DRIVE (ide_drive_t *drive) | 161 | void SELECT_DRIVE (ide_drive_t *drive) |
170 | { | 162 | { |
171 | if (HWIF(drive)->selectproc) | 163 | if (HWIF(drive)->selectproc) |
@@ -175,26 +167,12 @@ void SELECT_DRIVE (ide_drive_t *drive) | |||
175 | 167 | ||
176 | EXPORT_SYMBOL(SELECT_DRIVE); | 168 | EXPORT_SYMBOL(SELECT_DRIVE); |
177 | 169 | ||
178 | void SELECT_INTERRUPT (ide_drive_t *drive) | ||
179 | { | ||
180 | if (HWIF(drive)->intrproc) | ||
181 | HWIF(drive)->intrproc(drive); | ||
182 | else | ||
183 | HWIF(drive)->OUTB(drive->ctl|2, IDE_CONTROL_REG); | ||
184 | } | ||
185 | |||
186 | void SELECT_MASK (ide_drive_t *drive, int mask) | 170 | void SELECT_MASK (ide_drive_t *drive, int mask) |
187 | { | 171 | { |
188 | if (HWIF(drive)->maskproc) | 172 | if (HWIF(drive)->maskproc) |
189 | HWIF(drive)->maskproc(drive, mask); | 173 | HWIF(drive)->maskproc(drive, mask); |
190 | } | 174 | } |
191 | 175 | ||
192 | void QUIRK_LIST (ide_drive_t *drive) | ||
193 | { | ||
194 | if (HWIF(drive)->quirkproc) | ||
195 | drive->quirk_list = HWIF(drive)->quirkproc(drive); | ||
196 | } | ||
197 | |||
198 | /* | 176 | /* |
199 | * Some localbus EIDE interfaces require a special access sequence | 177 | * Some localbus EIDE interfaces require a special access sequence |
200 | * when using 32-bit I/O instructions to transfer data. We call this | 178 | * when using 32-bit I/O instructions to transfer data. We call this |
@@ -449,7 +427,6 @@ int drive_is_ready (ide_drive_t *drive) | |||
449 | udelay(1); | 427 | udelay(1); |
450 | #endif | 428 | #endif |
451 | 429 | ||
452 | #ifdef CONFIG_IDEPCI_SHARE_IRQ | ||
453 | /* | 430 | /* |
454 | * We do a passive status test under shared PCI interrupts on | 431 | * We do a passive status test under shared PCI interrupts on |
455 | * cards that truly share the ATA side interrupt, but may also share | 432 | * cards that truly share the ATA side interrupt, but may also share |
@@ -459,7 +436,6 @@ int drive_is_ready (ide_drive_t *drive) | |||
459 | if (IDE_CONTROL_REG) | 436 | if (IDE_CONTROL_REG) |
460 | stat = hwif->INB(IDE_ALTSTATUS_REG); | 437 | stat = hwif->INB(IDE_ALTSTATUS_REG); |
461 | else | 438 | else |
462 | #endif /* CONFIG_IDEPCI_SHARE_IRQ */ | ||
463 | /* Note: this may clear a pending IRQ!! */ | 439 | /* Note: this may clear a pending IRQ!! */ |
464 | stat = hwif->INB(IDE_STATUS_REG); | 440 | stat = hwif->INB(IDE_STATUS_REG); |
465 | 441 | ||
@@ -642,9 +618,9 @@ no_80w: | |||
642 | 618 | ||
643 | int ide_ata66_check (ide_drive_t *drive, ide_task_t *args) | 619 | int ide_ata66_check (ide_drive_t *drive, ide_task_t *args) |
644 | { | 620 | { |
645 | if ((args->tfRegister[IDE_COMMAND_OFFSET] == WIN_SETFEATURES) && | 621 | if (args->tf.command == WIN_SETFEATURES && |
646 | (args->tfRegister[IDE_SECTOR_OFFSET] > XFER_UDMA_2) && | 622 | args->tf.lbal > XFER_UDMA_2 && |
647 | (args->tfRegister[IDE_FEATURE_OFFSET] == SETFEATURES_XFER)) { | 623 | args->tf.feature == SETFEATURES_XFER) { |
648 | if (eighty_ninty_three(drive) == 0) { | 624 | if (eighty_ninty_three(drive) == 0) { |
649 | printk(KERN_WARNING "%s: UDMA speeds >UDMA33 cannot " | 625 | printk(KERN_WARNING "%s: UDMA speeds >UDMA33 cannot " |
650 | "be set\n", drive->name); | 626 | "be set\n", drive->name); |
@@ -662,9 +638,9 @@ int ide_ata66_check (ide_drive_t *drive, ide_task_t *args) | |||
662 | */ | 638 | */ |
663 | int set_transfer (ide_drive_t *drive, ide_task_t *args) | 639 | int set_transfer (ide_drive_t *drive, ide_task_t *args) |
664 | { | 640 | { |
665 | if ((args->tfRegister[IDE_COMMAND_OFFSET] == WIN_SETFEATURES) && | 641 | if (args->tf.command == WIN_SETFEATURES && |
666 | (args->tfRegister[IDE_SECTOR_OFFSET] >= XFER_SW_DMA_0) && | 642 | args->tf.lbal >= XFER_SW_DMA_0 && |
667 | (args->tfRegister[IDE_FEATURE_OFFSET] == SETFEATURES_XFER) && | 643 | args->tf.feature == SETFEATURES_XFER && |
668 | (drive->id->dma_ultra || | 644 | (drive->id->dma_ultra || |
669 | drive->id->dma_mword || | 645 | drive->id->dma_mword || |
670 | drive->id->dma_1word)) | 646 | drive->id->dma_1word)) |
@@ -902,8 +878,9 @@ EXPORT_SYMBOL(ide_set_handler); | |||
902 | * handler and IRQ setup do not race. All IDE command kick off | 878 | * handler and IRQ setup do not race. All IDE command kick off |
903 | * should go via this function or do equivalent locking. | 879 | * should go via this function or do equivalent locking. |
904 | */ | 880 | */ |
905 | 881 | ||
906 | void ide_execute_command(ide_drive_t *drive, task_ioreg_t cmd, ide_handler_t *handler, unsigned timeout, ide_expiry_t *expiry) | 882 | void ide_execute_command(ide_drive_t *drive, u8 cmd, ide_handler_t *handler, |
883 | unsigned timeout, ide_expiry_t *expiry) | ||
907 | { | 884 | { |
908 | unsigned long flags; | 885 | unsigned long flags; |
909 | ide_hwgroup_t *hwgroup = HWGROUP(drive); | 886 | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
@@ -1051,8 +1028,7 @@ static void ide_disk_pre_reset(ide_drive_t *drive) | |||
1051 | drive->special.all = 0; | 1028 | drive->special.all = 0; |
1052 | drive->special.b.set_geometry = legacy; | 1029 | drive->special.b.set_geometry = legacy; |
1053 | drive->special.b.recalibrate = legacy; | 1030 | drive->special.b.recalibrate = legacy; |
1054 | if (OK_TO_RESET_CONTROLLER) | 1031 | drive->mult_count = 0; |
1055 | drive->mult_count = 0; | ||
1056 | if (!drive->keep_settings && !drive->using_dma) | 1032 | if (!drive->keep_settings && !drive->using_dma) |
1057 | drive->mult_req = 0; | 1033 | drive->mult_req = 0; |
1058 | if (drive->mult_req != drive->mult_count) | 1034 | if (drive->mult_req != drive->mult_count) |
@@ -1137,7 +1113,6 @@ static ide_startstop_t do_reset1 (ide_drive_t *drive, int do_not_try_atapi) | |||
1137 | for (unit = 0; unit < MAX_DRIVES; ++unit) | 1113 | for (unit = 0; unit < MAX_DRIVES; ++unit) |
1138 | pre_reset(&hwif->drives[unit]); | 1114 | pre_reset(&hwif->drives[unit]); |
1139 | 1115 | ||
1140 | #if OK_TO_RESET_CONTROLLER | ||
1141 | if (!IDE_CONTROL_REG) { | 1116 | if (!IDE_CONTROL_REG) { |
1142 | spin_unlock_irqrestore(&ide_lock, flags); | 1117 | spin_unlock_irqrestore(&ide_lock, flags); |
1143 | return ide_stopped; | 1118 | return ide_stopped; |
@@ -1174,11 +1149,8 @@ static ide_startstop_t do_reset1 (ide_drive_t *drive, int do_not_try_atapi) | |||
1174 | * state when the disks are reset this way. At least, the Winbond | 1149 | * state when the disks are reset this way. At least, the Winbond |
1175 | * 553 documentation says that | 1150 | * 553 documentation says that |
1176 | */ | 1151 | */ |
1177 | if (hwif->resetproc != NULL) { | 1152 | if (hwif->resetproc) |
1178 | hwif->resetproc(drive); | 1153 | hwif->resetproc(drive); |
1179 | } | ||
1180 | |||
1181 | #endif /* OK_TO_RESET_CONTROLLER */ | ||
1182 | 1154 | ||
1183 | spin_unlock_irqrestore(&ide_lock, flags); | 1155 | spin_unlock_irqrestore(&ide_lock, flags); |
1184 | return ide_started; | 1156 | return ide_started; |