aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/ide-io.c2
-rw-r--r--drivers/ide/ide-iops.c18
-rw-r--r--drivers/ide/ide-probe.c6
-rw-r--r--drivers/ide/ide-taskfile.c2
-rw-r--r--drivers/ide/pci/scc_pata.c5
-rw-r--r--drivers/ide/ppc/pmac.c6
-rw-r--r--drivers/scsi/ide-scsi.c2
-rw-r--r--include/linux/ide.h2
8 files changed, 20 insertions, 23 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 2083cc08b2ce..c28fcdf0ee9e 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -437,7 +437,7 @@ static ide_startstop_t ide_atapi_error(ide_drive_t *drive, struct request *rq, u
437 437
438 if (ide_read_status(drive) & (BUSY_STAT | DRQ_STAT)) 438 if (ide_read_status(drive) & (BUSY_STAT | DRQ_STAT))
439 /* force an abort */ 439 /* force an abort */
440 hwif->OUTBSYNC(drive, WIN_IDLEIMMEDIATE, 440 hwif->OUTBSYNC(hwif, WIN_IDLEIMMEDIATE,
441 hwif->io_ports.command_addr); 441 hwif->io_ports.command_addr);
442 442
443 if (rq->errors >= ERROR_MAX) { 443 if (rq->errors >= ERROR_MAX) {
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index 491980aab866..4c32cf0b623c 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -42,7 +42,7 @@ static void ide_outb (u8 val, unsigned long port)
42 outb(val, port); 42 outb(val, port);
43} 43}
44 44
45static void ide_outbsync (ide_drive_t *drive, u8 addr, unsigned long port) 45static void ide_outbsync(ide_hwif_t *hwif, u8 addr, unsigned long port)
46{ 46{
47 outb(addr, port); 47 outb(addr, port);
48} 48}
@@ -68,7 +68,7 @@ static void ide_mm_outb (u8 value, unsigned long port)
68 writeb(value, (void __iomem *) port); 68 writeb(value, (void __iomem *) port);
69} 69}
70 70
71static void ide_mm_outbsync (ide_drive_t *drive, u8 value, unsigned long port) 71static void ide_mm_outbsync(ide_hwif_t *hwif, u8 value, unsigned long port)
72{ 72{
73 writeb(value, (void __iomem *) port); 73 writeb(value, (void __iomem *) port);
74} 74}
@@ -686,7 +686,7 @@ int ide_driveid_update(ide_drive_t *drive)
686 SELECT_MASK(drive, 1); 686 SELECT_MASK(drive, 1);
687 ide_set_irq(drive, 0); 687 ide_set_irq(drive, 0);
688 msleep(50); 688 msleep(50);
689 hwif->OUTBSYNC(drive, WIN_IDENTIFY, hwif->io_ports.command_addr); 689 hwif->OUTBSYNC(hwif, WIN_IDENTIFY, hwif->io_ports.command_addr);
690 timeout = jiffies + WAIT_WORSTCASE; 690 timeout = jiffies + WAIT_WORSTCASE;
691 do { 691 do {
692 if (time_after(jiffies, timeout)) { 692 if (time_after(jiffies, timeout)) {
@@ -773,7 +773,7 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
773 ide_set_irq(drive, 0); 773 ide_set_irq(drive, 0);
774 hwif->OUTB(speed, io_ports->nsect_addr); 774 hwif->OUTB(speed, io_ports->nsect_addr);
775 hwif->OUTB(SETFEATURES_XFER, io_ports->feature_addr); 775 hwif->OUTB(SETFEATURES_XFER, io_ports->feature_addr);
776 hwif->OUTBSYNC(drive, WIN_SETFEATURES, io_ports->command_addr); 776 hwif->OUTBSYNC(hwif, WIN_SETFEATURES, io_ports->command_addr);
777 if (drive->quirk_list == 2) 777 if (drive->quirk_list == 2)
778 ide_set_irq(drive, 1); 778 ide_set_irq(drive, 1);
779 779
@@ -881,7 +881,7 @@ void ide_execute_command(ide_drive_t *drive, u8 cmd, ide_handler_t *handler,
881 881
882 spin_lock_irqsave(&ide_lock, flags); 882 spin_lock_irqsave(&ide_lock, flags);
883 __ide_set_handler(drive, handler, timeout, expiry); 883 __ide_set_handler(drive, handler, timeout, expiry);
884 hwif->OUTBSYNC(drive, cmd, hwif->io_ports.command_addr); 884 hwif->OUTBSYNC(hwif, cmd, hwif->io_ports.command_addr);
885 /* 885 /*
886 * Drive takes 400nS to respond, we must avoid the IRQ being 886 * Drive takes 400nS to respond, we must avoid the IRQ being
887 * serviced before that. 887 * serviced before that.
@@ -899,7 +899,7 @@ void ide_execute_pkt_cmd(ide_drive_t *drive)
899 unsigned long flags; 899 unsigned long flags;
900 900
901 spin_lock_irqsave(&ide_lock, flags); 901 spin_lock_irqsave(&ide_lock, flags);
902 hwif->OUTBSYNC(drive, WIN_PACKETCMD, hwif->io_ports.command_addr); 902 hwif->OUTBSYNC(hwif, WIN_PACKETCMD, hwif->io_ports.command_addr);
903 ndelay(400); 903 ndelay(400);
904 spin_unlock_irqrestore(&ide_lock, flags); 904 spin_unlock_irqrestore(&ide_lock, flags);
905} 905}
@@ -1094,7 +1094,7 @@ static ide_startstop_t do_reset1 (ide_drive_t *drive, int do_not_try_atapi)
1094 pre_reset(drive); 1094 pre_reset(drive);
1095 SELECT_DRIVE(drive); 1095 SELECT_DRIVE(drive);
1096 udelay (20); 1096 udelay (20);
1097 hwif->OUTBSYNC(drive, WIN_SRST, io_ports->command_addr); 1097 hwif->OUTBSYNC(hwif, WIN_SRST, io_ports->command_addr);
1098 ndelay(400); 1098 ndelay(400);
1099 hwgroup->poll_timeout = jiffies + WAIT_WORSTCASE; 1099 hwgroup->poll_timeout = jiffies + WAIT_WORSTCASE;
1100 hwgroup->polling = 1; 1100 hwgroup->polling = 1;
@@ -1125,14 +1125,14 @@ 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(drive, drive->ctl|6, io_ports->ctl_addr); 1128 hwif->OUTBSYNC(hwif, drive->ctl | 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 = drive->ctl; /* clear SRST and nIEN */
1133 else 1133 else
1134 ctl = drive->ctl | 2; /* clear SRST, leave nIEN */ 1134 ctl = drive->ctl | 2; /* clear SRST, leave nIEN */
1135 hwif->OUTBSYNC(drive, 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);
1138 hwgroup->poll_timeout = jiffies + WAIT_WORSTCASE; 1138 hwgroup->poll_timeout = jiffies + WAIT_WORSTCASE;
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 12513c45d700..b010633eb5ba 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -293,7 +293,7 @@ static int actual_try_to_identify (ide_drive_t *drive, u8 cmd)
293 hwif->OUTB(0, io_ports->feature_addr); 293 hwif->OUTB(0, io_ports->feature_addr);
294 294
295 /* ask drive for ID */ 295 /* ask drive for ID */
296 hwif->OUTBSYNC(drive, cmd, io_ports->command_addr); 296 hwif->OUTBSYNC(hwif, cmd, hwif->io_ports.command_addr);
297 297
298 timeout = ((cmd == WIN_IDENTIFY) ? WAIT_WORSTCASE : WAIT_PIDENTIFY) / 2; 298 timeout = ((cmd == WIN_IDENTIFY) ? WAIT_WORSTCASE : WAIT_PIDENTIFY) / 2;
299 timeout += jiffies; 299 timeout += jiffies;
@@ -480,7 +480,7 @@ static int do_probe (ide_drive_t *drive, u8 cmd)
480 msleep(50); 480 msleep(50);
481 SELECT_DRIVE(drive); 481 SELECT_DRIVE(drive);
482 msleep(50); 482 msleep(50);
483 hwif->OUTBSYNC(drive, WIN_SRST, io_ports->command_addr); 483 hwif->OUTBSYNC(hwif, WIN_SRST, io_ports->command_addr);
484 (void)ide_busy_sleep(hwif); 484 (void)ide_busy_sleep(hwif);
485 rc = try_to_identify(drive, cmd); 485 rc = try_to_identify(drive, cmd);
486 } 486 }
@@ -516,7 +516,7 @@ static void enable_nest (ide_drive_t *drive)
516 printk("%s: enabling %s -- ", hwif->name, drive->id->model); 516 printk("%s: enabling %s -- ", hwif->name, drive->id->model);
517 SELECT_DRIVE(drive); 517 SELECT_DRIVE(drive);
518 msleep(50); 518 msleep(50);
519 hwif->OUTBSYNC(drive, EXABYTE_ENABLE_NEST, hwif->io_ports.command_addr); 519 hwif->OUTBSYNC(hwif, EXABYTE_ENABLE_NEST, hwif->io_ports.command_addr);
520 520
521 if (ide_busy_sleep(hwif)) { 521 if (ide_busy_sleep(hwif)) {
522 printk(KERN_CONT "failed (timeout)\n"); 522 printk(KERN_CONT "failed (timeout)\n");
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 6a17ab54f801..cf55a48a7dd2 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -117,7 +117,7 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task)
117 switch (task->data_phase) { 117 switch (task->data_phase) {
118 case TASKFILE_MULTI_OUT: 118 case TASKFILE_MULTI_OUT:
119 case TASKFILE_OUT: 119 case TASKFILE_OUT:
120 hwif->OUTBSYNC(drive, tf->command, hwif->io_ports.command_addr); 120 hwif->OUTBSYNC(hwif, tf->command, hwif->io_ports.command_addr);
121 ndelay(400); /* FIXME */ 121 ndelay(400); /* FIXME */
122 return pre_task_out_intr(drive, task->rq); 122 return pre_task_out_intr(drive, task->rq);
123 case TASKFILE_MULTI_IN: 123 case TASKFILE_MULTI_IN:
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c
index 133053c7a480..32eb0877fce2 100644
--- a/drivers/ide/pci/scc_pata.c
+++ b/drivers/ide/pci/scc_pata.c
@@ -148,11 +148,8 @@ static void scc_ide_outb(u8 addr, unsigned long port)
148 out_be32((void*)port, addr); 148 out_be32((void*)port, addr);
149} 149}
150 150
151static void 151static void scc_ide_outbsync(ide_hwif_t *hwif, u8 addr, unsigned long port)
152scc_ide_outbsync(ide_drive_t * drive, u8 addr, unsigned long port)
153{ 152{
154 ide_hwif_t *hwif = HWIF(drive);
155
156 out_be32((void*)port, addr); 153 out_be32((void*)port, addr);
157 eieio(); 154 eieio();
158 in_be32((void*)(hwif->dma_base + 0x01c)); 155 in_be32((void*)(hwif->dma_base + 0x01c));
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index ba2d58727964..dcb2c466bb97 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -480,13 +480,13 @@ pmac_ide_do_update_timings(ide_drive_t *drive)
480 pmac_ide_selectproc(drive); 480 pmac_ide_selectproc(drive);
481} 481}
482 482
483static void 483static void pmac_outbsync(ide_hwif_t *hwif, u8 value, unsigned long port)
484pmac_outbsync(ide_drive_t *drive, u8 value, unsigned long port)
485{ 484{
486 u32 tmp; 485 u32 tmp;
487 486
488 writeb(value, (void __iomem *) port); 487 writeb(value, (void __iomem *) port);
489 tmp = readl(PMAC_IDE_REG(IDE_TIMING_CONFIG)); 488 tmp = readl((void __iomem *)(hwif->io_ports.data_addr
489 + IDE_TIMING_CONFIG));
490} 490}
491 491
492/* 492/*
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 3222aa589dbf..d7fd5e550a25 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -257,7 +257,7 @@ idescsi_atapi_error(ide_drive_t *drive, struct request *rq, u8 stat, u8 err)
257 257
258 if (ide_read_status(drive) & (BUSY_STAT | DRQ_STAT)) 258 if (ide_read_status(drive) & (BUSY_STAT | DRQ_STAT))
259 /* force an abort */ 259 /* force an abort */
260 hwif->OUTBSYNC(drive, WIN_IDLEIMMEDIATE, 260 hwif->OUTBSYNC(hwif, WIN_IDLEIMMEDIATE,
261 hwif->io_ports.command_addr); 261 hwif->io_ports.command_addr);
262 262
263 rq->errors++; 263 rq->errors++;
diff --git a/include/linux/ide.h b/include/linux/ide.h
index b01b102be4de..1c3431469649 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -493,7 +493,7 @@ typedef struct hwif_s {
493 void (*ide_dma_clear_irq)(ide_drive_t *drive); 493 void (*ide_dma_clear_irq)(ide_drive_t *drive);
494 494
495 void (*OUTB)(u8 addr, unsigned long port); 495 void (*OUTB)(u8 addr, unsigned long port);
496 void (*OUTBSYNC)(ide_drive_t *drive, u8 addr, unsigned long port); 496 void (*OUTBSYNC)(struct hwif_s *hwif, u8 addr, unsigned long port);
497 497
498 u8 (*INB)(unsigned long port); 498 u8 (*INB)(unsigned long port);
499 499