diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-15 15:21:50 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-15 15:21:50 -0400 |
commit | ff07488346702f554aaeb6aae982540aa0302373 (patch) | |
tree | 1df71858ebc91390c34ffc9e71a1c8c4278a785d /drivers/ide/ide-iops.c | |
parent | 0fd04dcc2ebb6ec9088c24b368b0ce1f42a98ef5 (diff) |
ide: remove drive->ctl
Remove drive->ctl (it is always equal to 0x08 after init time).
While at it:
* Use ATA_DEVCTL_OBS define.
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-iops.c')
-rw-r--r-- | drivers/ide/ide-iops.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 4c32cf0b623c..80ad4f234f3f 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -186,7 +186,7 @@ static void ide_tf_read(ide_drive_t *drive, ide_task_t *task) | |||
186 | } | 186 | } |
187 | 187 | ||
188 | /* be sure we're looking at the low order bits */ | 188 | /* be sure we're looking at the low order bits */ |
189 | tf_outb(drive->ctl & ~0x80, io_ports->ctl_addr); | 189 | tf_outb(ATA_DEVCTL_OBS & ~0x80, io_ports->ctl_addr); |
190 | 190 | ||
191 | if (task->tf_flags & IDE_TFLAG_IN_NSECT) | 191 | if (task->tf_flags & IDE_TFLAG_IN_NSECT) |
192 | tf->nsect = tf_inb(io_ports->nsect_addr); | 192 | tf->nsect = tf_inb(io_ports->nsect_addr); |
@@ -200,7 +200,7 @@ static void ide_tf_read(ide_drive_t *drive, ide_task_t *task) | |||
200 | tf->device = tf_inb(io_ports->device_addr); | 200 | tf->device = tf_inb(io_ports->device_addr); |
201 | 201 | ||
202 | if (task->tf_flags & IDE_TFLAG_LBA48) { | 202 | if (task->tf_flags & IDE_TFLAG_LBA48) { |
203 | tf_outb(drive->ctl | 0x80, io_ports->ctl_addr); | 203 | tf_outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr); |
204 | 204 | ||
205 | if (task->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) | 205 | if (task->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) |
206 | tf->hob_feature = tf_inb(io_ports->feature_addr); | 206 | tf->hob_feature = tf_inb(io_ports->feature_addr); |
@@ -1125,13 +1125,13 @@ static ide_startstop_t do_reset1 (ide_drive_t *drive, int do_not_try_atapi) | |||
1125 | * recover from reset very quickly, saving us the first 50ms wait time. | 1125 | * recover from reset very quickly, saving us the first 50ms wait time. |
1126 | */ | 1126 | */ |
1127 | /* set SRST and nIEN */ | 1127 | /* set SRST and nIEN */ |
1128 | hwif->OUTBSYNC(hwif, drive->ctl | 6, io_ports->ctl_addr); | 1128 | hwif->OUTBSYNC(hwif, ATA_DEVCTL_OBS | 6, io_ports->ctl_addr); |
1129 | /* more than enough time */ | 1129 | /* more than enough time */ |
1130 | udelay(10); | 1130 | udelay(10); |
1131 | if (drive->quirk_list == 2) | 1131 | if (drive->quirk_list == 2) |
1132 | ctl = drive->ctl; /* clear SRST and nIEN */ | 1132 | ctl = ATA_DEVCTL_OBS; /* clear SRST and nIEN */ |
1133 | else | 1133 | else |
1134 | ctl = drive->ctl | 2; /* clear SRST, leave nIEN */ | 1134 | ctl = ATA_DEVCTL_OBS | 2; /* clear SRST, leave nIEN */ |
1135 | hwif->OUTBSYNC(hwif, ctl, io_ports->ctl_addr); | 1135 | hwif->OUTBSYNC(hwif, ctl, io_ports->ctl_addr); |
1136 | /* more than enough time */ | 1136 | /* more than enough time */ |
1137 | udelay(10); | 1137 | udelay(10); |