aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/sgiioc4.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/sgiioc4.c')
-rw-r--r--drivers/ide/sgiioc4.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/ide/sgiioc4.c b/drivers/ide/sgiioc4.c
index a687a7dfea6f..fdb9d7037694 100644
--- a/drivers/ide/sgiioc4.c
+++ b/drivers/ide/sgiioc4.c
@@ -123,7 +123,7 @@ static int
123sgiioc4_clearirq(ide_drive_t * drive) 123sgiioc4_clearirq(ide_drive_t * drive)
124{ 124{
125 u32 intr_reg; 125 u32 intr_reg;
126 ide_hwif_t *hwif = HWIF(drive); 126 ide_hwif_t *hwif = drive->hwif;
127 struct ide_io_ports *io_ports = &hwif->io_ports; 127 struct ide_io_ports *io_ports = &hwif->io_ports;
128 unsigned long other_ir = io_ports->irq_addr + (IOC4_INTR_REG << 2); 128 unsigned long other_ir = io_ports->irq_addr + (IOC4_INTR_REG << 2);
129 129
@@ -181,7 +181,7 @@ sgiioc4_clearirq(ide_drive_t * drive)
181 181
182static void sgiioc4_dma_start(ide_drive_t *drive) 182static void sgiioc4_dma_start(ide_drive_t *drive)
183{ 183{
184 ide_hwif_t *hwif = HWIF(drive); 184 ide_hwif_t *hwif = drive->hwif;
185 unsigned long ioc4_dma_addr = hwif->dma_base + IOC4_DMA_CTRL * 4; 185 unsigned long ioc4_dma_addr = hwif->dma_base + IOC4_DMA_CTRL * 4;
186 unsigned int reg = readl((void __iomem *)ioc4_dma_addr); 186 unsigned int reg = readl((void __iomem *)ioc4_dma_addr);
187 unsigned int temp_reg = reg | IOC4_S_DMA_START; 187 unsigned int temp_reg = reg | IOC4_S_DMA_START;
@@ -209,7 +209,7 @@ sgiioc4_ide_dma_stop(ide_hwif_t *hwif, u64 dma_base)
209static int sgiioc4_dma_end(ide_drive_t *drive) 209static int sgiioc4_dma_end(ide_drive_t *drive)
210{ 210{
211 u32 ioc4_dma, bc_dev, bc_mem, num, valid = 0, cnt = 0; 211 u32 ioc4_dma, bc_dev, bc_mem, num, valid = 0, cnt = 0;
212 ide_hwif_t *hwif = HWIF(drive); 212 ide_hwif_t *hwif = drive->hwif;
213 unsigned long dma_base = hwif->dma_base; 213 unsigned long dma_base = hwif->dma_base;
214 int dma_stat = 0; 214 int dma_stat = 0;
215 unsigned long *ending_dma = ide_get_hwifdata(hwif); 215 unsigned long *ending_dma = ide_get_hwifdata(hwif);
@@ -271,7 +271,7 @@ static void sgiioc4_set_dma_mode(ide_drive_t *drive, const u8 speed)
271/* returns 1 if dma irq issued, 0 otherwise */ 271/* returns 1 if dma irq issued, 0 otherwise */
272static int sgiioc4_dma_test_irq(ide_drive_t *drive) 272static int sgiioc4_dma_test_irq(ide_drive_t *drive)
273{ 273{
274 return sgiioc4_checkirq(HWIF(drive)); 274 return sgiioc4_checkirq(drive->hwif);
275} 275}
276 276
277static void sgiioc4_dma_host_set(ide_drive_t *drive, int on) 277static void sgiioc4_dma_host_set(ide_drive_t *drive, int on)
@@ -367,7 +367,7 @@ static void
367sgiioc4_configure_for_dma(int dma_direction, ide_drive_t * drive) 367sgiioc4_configure_for_dma(int dma_direction, ide_drive_t * drive)
368{ 368{
369 u32 ioc4_dma; 369 u32 ioc4_dma;
370 ide_hwif_t *hwif = HWIF(drive); 370 ide_hwif_t *hwif = drive->hwif;
371 unsigned long dma_base = hwif->dma_base; 371 unsigned long dma_base = hwif->dma_base;
372 unsigned long ioc4_dma_addr = dma_base + IOC4_DMA_CTRL * 4; 372 unsigned long ioc4_dma_addr = dma_base + IOC4_DMA_CTRL * 4;
373 u32 dma_addr, ending_dma_addr; 373 u32 dma_addr, ending_dma_addr;
@@ -427,7 +427,7 @@ sgiioc4_configure_for_dma(int dma_direction, ide_drive_t * drive)
427static unsigned int 427static unsigned int
428sgiioc4_build_dma_table(ide_drive_t * drive, struct request *rq, int ddir) 428sgiioc4_build_dma_table(ide_drive_t * drive, struct request *rq, int ddir)
429{ 429{
430 ide_hwif_t *hwif = HWIF(drive); 430 ide_hwif_t *hwif = drive->hwif;
431 unsigned int *table = hwif->dmatable_cpu; 431 unsigned int *table = hwif->dmatable_cpu;
432 unsigned int count = 0, i = 1; 432 unsigned int count = 0, i = 1;
433 struct scatterlist *sg; 433 struct scatterlist *sg;
@@ -492,7 +492,7 @@ use_pio_instead:
492 492
493static int sgiioc4_dma_setup(ide_drive_t *drive) 493static int sgiioc4_dma_setup(ide_drive_t *drive)
494{ 494{
495 struct request *rq = HWGROUP(drive)->rq; 495 struct request *rq = drive->hwif->rq;
496 unsigned int count = 0; 496 unsigned int count = 0;
497 int ddir; 497 int ddir;
498 498
@@ -523,7 +523,6 @@ static const struct ide_tp_ops sgiioc4_tp_ops = {
523 .exec_command = ide_exec_command, 523 .exec_command = ide_exec_command,
524 .read_status = sgiioc4_read_status, 524 .read_status = sgiioc4_read_status,
525 .read_altstatus = ide_read_altstatus, 525 .read_altstatus = ide_read_altstatus,
526 .read_sff_dma_status = ide_read_sff_dma_status,
527 526
528 .set_irq = ide_set_irq, 527 .set_irq = ide_set_irq,
529 528