aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-tape.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-17 18:46:26 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-17 18:46:26 -0400
commit23579a2a170265aacf78069f4817a41c1d6e9323 (patch)
treea20db3f337b64b13e482a2cb2f41e03b13d52e66 /drivers/ide/ide-tape.c
parent7616c0ad2087c7d244b8985390c63059a6223c45 (diff)
ide: remove IDE_*_REG macros
* Add IDE_{ALTSTATUS,IREASON,BCOUNTL,BCOUNTH}_OFFSET defines. * Remove IDE_*_REG macros - this results in more readable and slightly smaller code. There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-tape.c')
-rw-r--r--drivers/ide/ide-tape.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index bfdc4f44979..8c39146b608 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -1117,10 +1117,10 @@ static ide_startstop_t idetape_pc_intr(ide_drive_t *drive)
1117 return ide_do_reset(drive); 1117 return ide_do_reset(drive);
1118 } 1118 }
1119 /* Get the number of bytes to transfer on this interrupt. */ 1119 /* Get the number of bytes to transfer on this interrupt. */
1120 bcount = (hwif->INB(IDE_BCOUNTH_REG) << 8) | 1120 bcount = (hwif->INB(hwif->io_ports[IDE_BCOUNTH_OFFSET]) << 8) |
1121 hwif->INB(IDE_BCOUNTL_REG); 1121 hwif->INB(hwif->io_ports[IDE_BCOUNTL_OFFSET]);
1122 1122
1123 ireason = hwif->INB(IDE_IREASON_REG); 1123 ireason = hwif->INB(hwif->io_ports[IDE_IREASON_OFFSET]);
1124 1124
1125 if (ireason & CD) { 1125 if (ireason & CD) {
1126 printk(KERN_ERR "ide-tape: CoD != 0 in %s\n", __func__); 1126 printk(KERN_ERR "ide-tape: CoD != 0 in %s\n", __func__);
@@ -1224,12 +1224,12 @@ static ide_startstop_t idetape_transfer_pc(ide_drive_t *drive)
1224 "yet DRQ isn't asserted\n"); 1224 "yet DRQ isn't asserted\n");
1225 return startstop; 1225 return startstop;
1226 } 1226 }
1227 ireason = hwif->INB(IDE_IREASON_REG); 1227 ireason = hwif->INB(hwif->io_ports[IDE_IREASON_OFFSET]);
1228 while (retries-- && ((ireason & CD) == 0 || (ireason & IO))) { 1228 while (retries-- && ((ireason & CD) == 0 || (ireason & IO))) {
1229 printk(KERN_ERR "ide-tape: (IO,CoD != (0,1) while issuing " 1229 printk(KERN_ERR "ide-tape: (IO,CoD != (0,1) while issuing "
1230 "a packet command, retrying\n"); 1230 "a packet command, retrying\n");
1231 udelay(100); 1231 udelay(100);
1232 ireason = hwif->INB(IDE_IREASON_REG); 1232 ireason = hwif->INB(hwif->io_ports[IDE_IREASON_OFFSET]);
1233 if (retries == 0) { 1233 if (retries == 0) {
1234 printk(KERN_ERR "ide-tape: (IO,CoD != (0,1) while " 1234 printk(KERN_ERR "ide-tape: (IO,CoD != (0,1) while "
1235 "issuing a packet command, ignoring\n"); 1235 "issuing a packet command, ignoring\n");
@@ -1323,7 +1323,7 @@ static ide_startstop_t idetape_issue_pc(ide_drive_t *drive, idetape_pc_t *pc)
1323 IDETAPE_WAIT_CMD, NULL); 1323 IDETAPE_WAIT_CMD, NULL);
1324 return ide_started; 1324 return ide_started;
1325 } else { 1325 } else {
1326 hwif->OUTB(WIN_PACKETCMD, IDE_COMMAND_REG); 1326 hwif->OUTB(WIN_PACKETCMD, hwif->io_ports[IDE_COMMAND_OFFSET]);
1327 return idetape_transfer_pc(drive); 1327 return idetape_transfer_pc(drive);
1328 } 1328 }
1329} 1329}