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/pci | |
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/pci')
-rw-r--r-- | drivers/ide/pci/hpt366.c | 3 | ||||
-rw-r--r-- | drivers/ide/pci/ns87415.c | 4 | ||||
-rw-r--r-- | drivers/ide/pci/scc_pata.c | 4 | ||||
-rw-r--r-- | drivers/ide/pci/sgiioc4.c | 2 |
4 files changed, 6 insertions, 7 deletions
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index c929dadaaaff..397c6cbe953c 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c | |||
@@ -759,8 +759,7 @@ static void hpt3xx_maskproc(ide_drive_t *drive, int mask) | |||
759 | enable_irq (hwif->irq); | 759 | enable_irq (hwif->irq); |
760 | } | 760 | } |
761 | } else | 761 | } else |
762 | outb(mask ? (drive->ctl | 2) : (drive->ctl & ~2), | 762 | outb(ATA_DEVCTL_OBS | (mask ? 2 : 0), hwif->io_ports.ctl_addr); |
763 | hwif->io_ports.ctl_addr); | ||
764 | } | 763 | } |
765 | 764 | ||
766 | /* | 765 | /* |
diff --git a/drivers/ide/pci/ns87415.c b/drivers/ide/pci/ns87415.c index a7a41bb82778..45ba71a7182f 100644 --- a/drivers/ide/pci/ns87415.c +++ b/drivers/ide/pci/ns87415.c | |||
@@ -76,7 +76,7 @@ static void superio_tf_read(ide_drive_t *drive, ide_task_t *task) | |||
76 | } | 76 | } |
77 | 77 | ||
78 | /* be sure we're looking at the low order bits */ | 78 | /* be sure we're looking at the low order bits */ |
79 | outb(drive->ctl & ~0x80, io_ports->ctl_addr); | 79 | outb(ATA_DEVCTL_OBS & ~0x80, io_ports->ctl_addr); |
80 | 80 | ||
81 | if (task->tf_flags & IDE_TFLAG_IN_NSECT) | 81 | if (task->tf_flags & IDE_TFLAG_IN_NSECT) |
82 | tf->nsect = inb(io_ports->nsect_addr); | 82 | tf->nsect = inb(io_ports->nsect_addr); |
@@ -90,7 +90,7 @@ static void superio_tf_read(ide_drive_t *drive, ide_task_t *task) | |||
90 | tf->device = superio_ide_inb(io_ports->device_addr); | 90 | tf->device = superio_ide_inb(io_ports->device_addr); |
91 | 91 | ||
92 | if (task->tf_flags & IDE_TFLAG_LBA48) { | 92 | if (task->tf_flags & IDE_TFLAG_LBA48) { |
93 | outb(drive->ctl | 0x80, io_ports->ctl_addr); | 93 | outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr); |
94 | 94 | ||
95 | if (task->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) | 95 | if (task->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) |
96 | tf->hob_feature = inb(io_ports->feature_addr); | 96 | tf->hob_feature = inb(io_ports->feature_addr); |
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c index 32eb0877fce2..1584ebb6a185 100644 --- a/drivers/ide/pci/scc_pata.c +++ b/drivers/ide/pci/scc_pata.c | |||
@@ -703,7 +703,7 @@ static void scc_tf_read(ide_drive_t *drive, ide_task_t *task) | |||
703 | } | 703 | } |
704 | 704 | ||
705 | /* be sure we're looking at the low order bits */ | 705 | /* be sure we're looking at the low order bits */ |
706 | scc_ide_outb(drive->ctl & ~0x80, io_ports->ctl_addr); | 706 | scc_ide_outb(ATA_DEVCTL_OBS & ~0x80, io_ports->ctl_addr); |
707 | 707 | ||
708 | if (task->tf_flags & IDE_TFLAG_IN_NSECT) | 708 | if (task->tf_flags & IDE_TFLAG_IN_NSECT) |
709 | tf->nsect = scc_ide_inb(io_ports->nsect_addr); | 709 | tf->nsect = scc_ide_inb(io_ports->nsect_addr); |
@@ -717,7 +717,7 @@ static void scc_tf_read(ide_drive_t *drive, ide_task_t *task) | |||
717 | tf->device = scc_ide_inb(io_ports->device_addr); | 717 | tf->device = scc_ide_inb(io_ports->device_addr); |
718 | 718 | ||
719 | if (task->tf_flags & IDE_TFLAG_LBA48) { | 719 | if (task->tf_flags & IDE_TFLAG_LBA48) { |
720 | scc_ide_outb(drive->ctl | 0x80, io_ports->ctl_addr); | 720 | scc_ide_outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr); |
721 | 721 | ||
722 | if (task->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) | 722 | if (task->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) |
723 | tf->hob_feature = scc_ide_inb(io_ports->feature_addr); | 723 | tf->hob_feature = scc_ide_inb(io_ports->feature_addr); |
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index c1b667c53f2b..24513e3dcd6b 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c | |||
@@ -111,7 +111,7 @@ sgiioc4_init_hwif_ports(hw_regs_t * hw, unsigned long data_port, | |||
111 | static void | 111 | static void |
112 | sgiioc4_maskproc(ide_drive_t * drive, int mask) | 112 | sgiioc4_maskproc(ide_drive_t * drive, int mask) |
113 | { | 113 | { |
114 | writeb(mask ? (drive->ctl | 2) : (drive->ctl & ~2), | 114 | writeb(ATA_DEVCTL_OBS | (mask ? 2 : 0), |
115 | (void __iomem *)drive->hwif->io_ports.ctl_addr); | 115 | (void __iomem *)drive->hwif->io_ports.ctl_addr); |
116 | } | 116 | } |
117 | 117 | ||