diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-27 09:38:32 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-27 09:38:32 -0400 |
commit | 4c3032d8a4d6c97bd6e02bcab524ef2428d89561 (patch) | |
tree | 4528851a9b04282f602cebb6b2ab4bc677b63259 /drivers/ide/ide-tape.c | |
parent | 387750c3bf49c22f6189436032145e2131985076 (diff) |
ide: add struct ide_io_ports (take 3)
* Add struct ide_io_ports and use it instead of `unsigned long io_ports[]`
in ide_hwif_t.
* Rename io_ports[] in hw_regs_t to io_ports_array[].
* Use un-named union for 'unsigned long io_ports_array[]' and 'struct
ide_io_ports io_ports' in hw_regs_t.
* Remove IDE_*_OFFSET defines.
v2:
* scc_pata.c build fix from Stephen Rothwell.
v3:
* Fix ctl_adrr typo in Sparc-specific part of ns87415.c.
(Noticed by Andrew Morton)
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-tape.c')
-rw-r--r-- | drivers/ide/ide-tape.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 6752d47db2f8..2275cd22902c 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -849,10 +849,10 @@ static ide_startstop_t idetape_pc_intr(ide_drive_t *drive) | |||
849 | return ide_do_reset(drive); | 849 | return ide_do_reset(drive); |
850 | } | 850 | } |
851 | /* Get the number of bytes to transfer on this interrupt. */ | 851 | /* Get the number of bytes to transfer on this interrupt. */ |
852 | bcount = (hwif->INB(hwif->io_ports[IDE_BCOUNTH_OFFSET]) << 8) | | 852 | bcount = (hwif->INB(hwif->io_ports.lbah_addr) << 8) | |
853 | hwif->INB(hwif->io_ports[IDE_BCOUNTL_OFFSET]); | 853 | hwif->INB(hwif->io_ports.lbam_addr); |
854 | 854 | ||
855 | ireason = hwif->INB(hwif->io_ports[IDE_IREASON_OFFSET]); | 855 | ireason = hwif->INB(hwif->io_ports.nsect_addr); |
856 | 856 | ||
857 | if (ireason & CD) { | 857 | if (ireason & CD) { |
858 | printk(KERN_ERR "ide-tape: CoD != 0 in %s\n", __func__); | 858 | printk(KERN_ERR "ide-tape: CoD != 0 in %s\n", __func__); |
@@ -956,12 +956,12 @@ static ide_startstop_t idetape_transfer_pc(ide_drive_t *drive) | |||
956 | "yet DRQ isn't asserted\n"); | 956 | "yet DRQ isn't asserted\n"); |
957 | return startstop; | 957 | return startstop; |
958 | } | 958 | } |
959 | ireason = hwif->INB(hwif->io_ports[IDE_IREASON_OFFSET]); | 959 | ireason = hwif->INB(hwif->io_ports.nsect_addr); |
960 | while (retries-- && ((ireason & CD) == 0 || (ireason & IO))) { | 960 | while (retries-- && ((ireason & CD) == 0 || (ireason & IO))) { |
961 | printk(KERN_ERR "ide-tape: (IO,CoD != (0,1) while issuing " | 961 | printk(KERN_ERR "ide-tape: (IO,CoD != (0,1) while issuing " |
962 | "a packet command, retrying\n"); | 962 | "a packet command, retrying\n"); |
963 | udelay(100); | 963 | udelay(100); |
964 | ireason = hwif->INB(hwif->io_ports[IDE_IREASON_OFFSET]); | 964 | ireason = hwif->INB(hwif->io_ports.nsect_addr); |
965 | if (retries == 0) { | 965 | if (retries == 0) { |
966 | printk(KERN_ERR "ide-tape: (IO,CoD != (0,1) while " | 966 | printk(KERN_ERR "ide-tape: (IO,CoD != (0,1) while " |
967 | "issuing a packet command, ignoring\n"); | 967 | "issuing a packet command, ignoring\n"); |
@@ -1058,7 +1058,7 @@ static ide_startstop_t idetape_issue_pc(ide_drive_t *drive, | |||
1058 | IDETAPE_WAIT_CMD, NULL); | 1058 | IDETAPE_WAIT_CMD, NULL); |
1059 | return ide_started; | 1059 | return ide_started; |
1060 | } else { | 1060 | } else { |
1061 | hwif->OUTB(WIN_PACKETCMD, hwif->io_ports[IDE_COMMAND_OFFSET]); | 1061 | hwif->OUTB(WIN_PACKETCMD, hwif->io_ports.command_addr); |
1062 | return idetape_transfer_pc(drive); | 1062 | return idetape_transfer_pc(drive); |
1063 | } | 1063 | } |
1064 | } | 1064 | } |