[ide] convert ide_hwif_t->ide_dma_begin() to ->dma_start()

Make ->ide_dma_begin() functions void and rename them to ->dma_start().
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent e40ed6c7
...@@ -208,7 +208,7 @@ etrax100_ide_inb(ide_ioreg_t reg) ...@@ -208,7 +208,7 @@ etrax100_ide_inb(ide_ioreg_t reg)
#define ATA_PIO0_HOLD 4 #define ATA_PIO0_HOLD 4
static int e100_dma_check (ide_drive_t *drive); static int e100_dma_check (ide_drive_t *drive);
static int e100_dma_begin (ide_drive_t *drive); static void e100_dma_start(ide_drive_t *drive);
static int e100_dma_end (ide_drive_t *drive); static int e100_dma_end (ide_drive_t *drive);
static void e100_ide_input_data (ide_drive_t *drive, void *, unsigned int); static void e100_ide_input_data (ide_drive_t *drive, void *, unsigned int);
static void e100_ide_output_data (ide_drive_t *drive, void *, unsigned int); static void e100_ide_output_data (ide_drive_t *drive, void *, unsigned int);
...@@ -335,7 +335,7 @@ init_e100_ide (void) ...@@ -335,7 +335,7 @@ init_e100_ide (void)
hwif->ide_dma_end = &e100_dma_end; hwif->ide_dma_end = &e100_dma_end;
hwif->dma_setup = &e100_dma_setup; hwif->dma_setup = &e100_dma_setup;
hwif->dma_exec_cmd = &e100_dma_exec_cmd; hwif->dma_exec_cmd = &e100_dma_exec_cmd;
hwif->ide_dma_begin = &e100_dma_begin; hwif->dma_start = &e100_dma_start;
hwif->OUTB = &etrax100_ide_outb; hwif->OUTB = &etrax100_ide_outb;
hwif->OUTW = &etrax100_ide_outw; hwif->OUTW = &etrax100_ide_outw;
hwif->OUTBSYNC = &etrax100_ide_outbsync; hwif->OUTBSYNC = &etrax100_ide_outbsync;
...@@ -815,7 +815,7 @@ static int e100_dma_end(ide_drive_t *drive) ...@@ -815,7 +815,7 @@ static int e100_dma_end(ide_drive_t *drive)
return 0; return 0;
} }
static int e100_dma_begin(ide_drive_t *drive) static void e100_dma_start(ide_drive_t *drive)
{ {
if (e100_read_command) { if (e100_read_command) {
/* begin DMA */ /* begin DMA */
...@@ -872,5 +872,4 @@ static int e100_dma_begin(ide_drive_t *drive) ...@@ -872,5 +872,4 @@ static int e100_dma_begin(ide_drive_t *drive)
D(printk("dma write of %d bytes.\n", ata_tot_size)); D(printk("dma write of %d bytes.\n", ata_tot_size));
} }
return 0;
} }
...@@ -400,14 +400,13 @@ static int icside_dma_end(ide_drive_t *drive) ...@@ -400,14 +400,13 @@ static int icside_dma_end(ide_drive_t *drive)
return get_dma_residue(hwif->hw.dma) != 0; return get_dma_residue(hwif->hw.dma) != 0;
} }
static int icside_dma_begin(ide_drive_t *drive) static void icside_dma_start(ide_drive_t *drive)
{ {
ide_hwif_t *hwif = HWIF(drive); ide_hwif_t *hwif = HWIF(drive);
/* We can not enable DMA on both channels simultaneously. */ /* We can not enable DMA on both channels simultaneously. */
BUG_ON(dma_channel_active(hwif->hw.dma)); BUG_ON(dma_channel_active(hwif->hw.dma));
enable_dma(hwif->hw.dma); enable_dma(hwif->hw.dma);
return 0;
} }
/* /*
...@@ -559,7 +558,7 @@ static int icside_dma_init(ide_hwif_t *hwif) ...@@ -559,7 +558,7 @@ static int icside_dma_init(ide_hwif_t *hwif)
hwif->ide_dma_on = icside_dma_on; hwif->ide_dma_on = icside_dma_on;
hwif->dma_setup = icside_dma_setup; hwif->dma_setup = icside_dma_setup;
hwif->dma_exec_cmd = icside_dma_exec_cmd; hwif->dma_exec_cmd = icside_dma_exec_cmd;
hwif->ide_dma_begin = icside_dma_begin; hwif->dma_start = icside_dma_start;
hwif->ide_dma_end = icside_dma_end; hwif->ide_dma_end = icside_dma_end;
hwif->ide_dma_test_irq = icside_dma_test_irq; hwif->ide_dma_test_irq = icside_dma_test_irq;
hwif->ide_dma_verbose = icside_dma_verbose; hwif->ide_dma_verbose = icside_dma_verbose;
......
...@@ -910,6 +910,7 @@ static ide_startstop_t cdrom_transfer_packet_command (ide_drive_t *drive, ...@@ -910,6 +910,7 @@ static ide_startstop_t cdrom_transfer_packet_command (ide_drive_t *drive,
struct request *rq, struct request *rq,
ide_handler_t *handler) ide_handler_t *handler)
{ {
ide_hwif_t *hwif = drive->hwif;
int cmd_len; int cmd_len;
struct cdrom_info *info = drive->driver_data; struct cdrom_info *info = drive->driver_data;
ide_startstop_t startstop; ide_startstop_t startstop;
...@@ -941,7 +942,7 @@ static ide_startstop_t cdrom_transfer_packet_command (ide_drive_t *drive, ...@@ -941,7 +942,7 @@ static ide_startstop_t cdrom_transfer_packet_command (ide_drive_t *drive,
/* Start the DMA if need be */ /* Start the DMA if need be */
if (info->dma) if (info->dma)
(void) HWIF(drive)->ide_dma_begin(drive); hwif->dma_start(drive);
return ide_started; return ide_started;
} }
......
...@@ -431,7 +431,7 @@ ide_startstop_t __ide_do_rw_disk (ide_drive_t *drive, struct request *rq, sector ...@@ -431,7 +431,7 @@ ide_startstop_t __ide_do_rw_disk (ide_drive_t *drive, struct request *rq, sector
command = lba48 ? WIN_READ_EXT: WIN_READ; command = lba48 ? WIN_READ_EXT: WIN_READ;
} }
hwif->dma_exec_cmd(drive, command); hwif->dma_exec_cmd(drive, command);
hwif->ide_dma_begin(drive); hwif->dma_start(drive);
return ide_started; return ide_started;
} }
/* fallback to PIO */ /* fallback to PIO */
......
...@@ -636,7 +636,7 @@ static void ide_dma_exec_cmd(ide_drive_t *drive, u8 command) ...@@ -636,7 +636,7 @@ static void ide_dma_exec_cmd(ide_drive_t *drive, u8 command)
ide_execute_command(drive, command, &ide_dma_intr, 2*WAIT_CMD, dma_timer_expiry); ide_execute_command(drive, command, &ide_dma_intr, 2*WAIT_CMD, dma_timer_expiry);
} }
int __ide_dma_begin (ide_drive_t *drive) void ide_dma_start(ide_drive_t *drive)
{ {
ide_hwif_t *hwif = HWIF(drive); ide_hwif_t *hwif = HWIF(drive);
u8 dma_cmd = hwif->INB(hwif->dma_command); u8 dma_cmd = hwif->INB(hwif->dma_command);
...@@ -650,10 +650,9 @@ int __ide_dma_begin (ide_drive_t *drive) ...@@ -650,10 +650,9 @@ int __ide_dma_begin (ide_drive_t *drive)
hwif->OUTB(dma_cmd|1, hwif->dma_command); hwif->OUTB(dma_cmd|1, hwif->dma_command);
hwif->dma = 1; hwif->dma = 1;
wmb(); wmb();
return 0;
} }
EXPORT_SYMBOL(__ide_dma_begin); EXPORT_SYMBOL_GPL(ide_dma_start);
/* returns 1 on error, 0 otherwise */ /* returns 1 on error, 0 otherwise */
int __ide_dma_end (ide_drive_t *drive) int __ide_dma_end (ide_drive_t *drive)
...@@ -955,8 +954,8 @@ void ide_setup_dma (ide_hwif_t *hwif, unsigned long dma_base, unsigned int num_p ...@@ -955,8 +954,8 @@ void ide_setup_dma (ide_hwif_t *hwif, unsigned long dma_base, unsigned int num_p
hwif->dma_setup = &ide_dma_setup; hwif->dma_setup = &ide_dma_setup;
if (!hwif->dma_exec_cmd) if (!hwif->dma_exec_cmd)
hwif->dma_exec_cmd = &ide_dma_exec_cmd; hwif->dma_exec_cmd = &ide_dma_exec_cmd;
if (!hwif->ide_dma_begin) if (!hwif->dma_start)
hwif->ide_dma_begin = &__ide_dma_begin; hwif->dma_start = &ide_dma_start;
if (!hwif->ide_dma_end) if (!hwif->ide_dma_end)
hwif->ide_dma_end = &__ide_dma_end; hwif->ide_dma_end = &__ide_dma_end;
if (!hwif->ide_dma_test_irq) if (!hwif->ide_dma_test_irq)
......
...@@ -1063,7 +1063,7 @@ static ide_startstop_t idefloppy_issue_pc (ide_drive_t *drive, idefloppy_pc_t *p ...@@ -1063,7 +1063,7 @@ static ide_startstop_t idefloppy_issue_pc (ide_drive_t *drive, idefloppy_pc_t *p
if (feature.b.dma) { /* Begin DMA, if necessary */ if (feature.b.dma) { /* Begin DMA, if necessary */
set_bit(PC_DMA_IN_PROGRESS, &pc->flags); set_bit(PC_DMA_IN_PROGRESS, &pc->flags);
(void) (HWIF(drive)->ide_dma_begin(drive)); hwif->dma_start(drive);
} }
/* Can we transfer the packet when we get the interrupt or wait? */ /* Can we transfer the packet when we get the interrupt or wait? */
......
...@@ -2067,7 +2067,7 @@ static ide_startstop_t idetape_transfer_pc(ide_drive_t *drive) ...@@ -2067,7 +2067,7 @@ static ide_startstop_t idetape_transfer_pc(ide_drive_t *drive)
#ifdef CONFIG_BLK_DEV_IDEDMA #ifdef CONFIG_BLK_DEV_IDEDMA
/* Begin DMA, if necessary */ /* Begin DMA, if necessary */
if (test_bit(PC_DMA_IN_PROGRESS, &pc->flags)) if (test_bit(PC_DMA_IN_PROGRESS, &pc->flags))
(void) (HWIF(drive)->ide_dma_begin(drive)); hwif->dma_start(drive);
#endif #endif
/* Send the actual packet */ /* Send the actual packet */
HWIF(drive)->atapi_output_bytes(drive, pc->c, 12); HWIF(drive)->atapi_output_bytes(drive, pc->c, 12);
......
...@@ -156,7 +156,7 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task) ...@@ -156,7 +156,7 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task)
case WIN_IDENTIFY_DMA: case WIN_IDENTIFY_DMA:
if (!hwif->dma_setup(drive)) { if (!hwif->dma_setup(drive)) {
hwif->dma_exec_cmd(drive, taskfile->command); hwif->dma_exec_cmd(drive, taskfile->command);
hwif->ide_dma_begin(drive); hwif->dma_start(drive);
return ide_started; return ide_started;
} }
break; break;
...@@ -903,7 +903,7 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task) ...@@ -903,7 +903,7 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task)
case TASKFILE_IN_DMA: case TASKFILE_IN_DMA:
hwif->dma_setup(drive); hwif->dma_setup(drive);
hwif->dma_exec_cmd(drive, taskfile->command); hwif->dma_exec_cmd(drive, taskfile->command);
hwif->ide_dma_begin(drive); hwif->dma_start(drive);
break; break;
default: default:
......
...@@ -687,7 +687,7 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif) ...@@ -687,7 +687,7 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif)
hwif->dma_setup = tmp_hwif->dma_setup; hwif->dma_setup = tmp_hwif->dma_setup;
hwif->dma_exec_cmd = tmp_hwif->dma_exec_cmd; hwif->dma_exec_cmd = tmp_hwif->dma_exec_cmd;
hwif->ide_dma_begin = tmp_hwif->ide_dma_begin; hwif->dma_start = tmp_hwif->dma_start;
hwif->ide_dma_end = tmp_hwif->ide_dma_end; hwif->ide_dma_end = tmp_hwif->ide_dma_end;
hwif->ide_dma_check = tmp_hwif->ide_dma_check; hwif->ide_dma_check = tmp_hwif->ide_dma_check;
hwif->ide_dma_on = tmp_hwif->ide_dma_on; hwif->ide_dma_on = tmp_hwif->ide_dma_on;
......
...@@ -577,7 +577,7 @@ static int hpt366_ide_dma_lostirq (ide_drive_t *drive) ...@@ -577,7 +577,7 @@ static int hpt366_ide_dma_lostirq (ide_drive_t *drive)
/* how about we flush and reset, mmmkay? */ /* how about we flush and reset, mmmkay? */
pci_write_config_byte(dev, 0x51, 0x1F); pci_write_config_byte(dev, 0x51, 0x1F);
/* fall through to a reset */ /* fall through to a reset */
case ide_dma_begin: case dma_start:
case ide_dma_end: case ide_dma_end:
/* reset the chips state over and over.. */ /* reset the chips state over and over.. */
pci_write_config_byte(dev, 0x51, 0x13); pci_write_config_byte(dev, 0x51, 0x13);
...@@ -592,12 +592,12 @@ static void hpt370_clear_engine (ide_drive_t *drive) ...@@ -592,12 +592,12 @@ static void hpt370_clear_engine (ide_drive_t *drive)
udelay(10); udelay(10);
} }
static int hpt370_ide_dma_begin (ide_drive_t *drive) static void hpt370_ide_dma_start(ide_drive_t *drive)
{ {
#ifdef HPT_RESET_STATE_ENGINE #ifdef HPT_RESET_STATE_ENGINE
hpt370_clear_engine(drive); hpt370_clear_engine(drive);
#endif #endif
return __ide_dma_begin(drive); ide_dma_start(drive);
} }
static int hpt370_ide_dma_end (ide_drive_t *drive) static int hpt370_ide_dma_end (ide_drive_t *drive)
...@@ -1230,7 +1230,7 @@ static void __devinit init_hwif_hpt366(ide_hwif_t *hwif) ...@@ -1230,7 +1230,7 @@ static void __devinit init_hwif_hpt366(ide_hwif_t *hwif)
hwif->ide_dma_test_irq = &hpt374_ide_dma_test_irq; hwif->ide_dma_test_irq = &hpt374_ide_dma_test_irq;
hwif->ide_dma_end = &hpt374_ide_dma_end; hwif->ide_dma_end = &hpt374_ide_dma_end;
} else if (hpt_minimum_revision(dev,3)) { } else if (hpt_minimum_revision(dev,3)) {
hwif->ide_dma_begin = &hpt370_ide_dma_begin; hwif->dma_start = &hpt370_ide_dma_start;
hwif->ide_dma_end = &hpt370_ide_dma_end; hwif->ide_dma_end = &hpt370_ide_dma_end;
hwif->ide_dma_timeout = &hpt370_ide_dma_timeout; hwif->ide_dma_timeout = &hpt370_ide_dma_timeout;
hwif->ide_dma_lostirq = &hpt370_ide_dma_lostirq; hwif->ide_dma_lostirq = &hpt370_ide_dma_lostirq;
......
...@@ -494,7 +494,7 @@ static int pdc202xx_quirkproc (ide_drive_t *drive) ...@@ -494,7 +494,7 @@ static int pdc202xx_quirkproc (ide_drive_t *drive)
return ((int) check_in_drive_lists(drive, pdc_quirk_drives)); return ((int) check_in_drive_lists(drive, pdc_quirk_drives));
} }
static int pdc202xx_old_ide_dma_begin(ide_drive_t *drive) static void pdc202xx_old_ide_dma_start(ide_drive_t *drive)
{ {
if (drive->current_speed > XFER_UDMA_2) if (drive->current_speed > XFER_UDMA_2)
pdc_old_enable_66MHz_clock(drive->hwif); pdc_old_enable_66MHz_clock(drive->hwif);
...@@ -515,7 +515,7 @@ static int pdc202xx_old_ide_dma_begin(ide_drive_t *drive) ...@@ -515,7 +515,7 @@ static int pdc202xx_old_ide_dma_begin(ide_drive_t *drive)
word_count | 0x06000000; word_count | 0x06000000;
hwif->OUTL(word_count, atapi_reg); hwif->OUTL(word_count, atapi_reg);
} }
return __ide_dma_begin(drive); ide_dma_start(drive);
} }
static int pdc202xx_old_ide_dma_end(ide_drive_t *drive) static int pdc202xx_old_ide_dma_end(ide_drive_t *drive)
...@@ -736,7 +736,7 @@ static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif) ...@@ -736,7 +736,7 @@ static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif)
if (hwif->pci_dev->device != PCI_DEVICE_ID_PROMISE_20246) { if (hwif->pci_dev->device != PCI_DEVICE_ID_PROMISE_20246) {
if (!(hwif->udma_four)) if (!(hwif->udma_four))
hwif->udma_four = (pdc202xx_old_cable_detect(hwif)) ? 0 : 1; hwif->udma_four = (pdc202xx_old_cable_detect(hwif)) ? 0 : 1;
hwif->ide_dma_begin = &pdc202xx_old_ide_dma_begin; hwif->dma_start = &pdc202xx_old_ide_dma_start;
hwif->ide_dma_end = &pdc202xx_old_ide_dma_end; hwif->ide_dma_end = &pdc202xx_old_ide_dma_end;
} }
hwif->ide_dma_test_irq = &pdc202xx_old_ide_dma_test_irq; hwif->ide_dma_test_irq = &pdc202xx_old_ide_dma_test_irq;
......
...@@ -192,16 +192,13 @@ sgiioc4_clearirq(ide_drive_t * drive) ...@@ -192,16 +192,13 @@ sgiioc4_clearirq(ide_drive_t * drive)
return intr_reg & 3; return intr_reg & 3;
} }
static int static void sgiioc4_ide_dma_start(ide_drive_t * drive)
sgiioc4_ide_dma_begin(ide_drive_t * drive)
{ {
ide_hwif_t *hwif = HWIF(drive); ide_hwif_t *hwif = HWIF(drive);
unsigned int reg = hwif->INL(hwif->dma_base + IOC4_DMA_CTRL * 4); unsigned int reg = hwif->INL(hwif->dma_base + IOC4_DMA_CTRL * 4);
unsigned int temp_reg = reg | IOC4_S_DMA_START; unsigned int temp_reg = reg | IOC4_S_DMA_START;
hwif->OUTL(temp_reg, hwif->dma_base + IOC4_DMA_CTRL * 4); hwif->OUTL(temp_reg, hwif->dma_base + IOC4_DMA_CTRL * 4);
return 0;
} }
static u32 static u32
...@@ -625,7 +622,7 @@ ide_init_sgiioc4(ide_hwif_t * hwif) ...@@ -625,7 +622,7 @@ ide_init_sgiioc4(ide_hwif_t * hwif)
hwif->busproc = NULL; hwif->busproc = NULL;
hwif->dma_setup = &sgiioc4_ide_dma_setup; hwif->dma_setup = &sgiioc4_ide_dma_setup;
hwif->ide_dma_begin = &sgiioc4_ide_dma_begin; hwif->dma_start = &sgiioc4_ide_dma_start;
hwif->ide_dma_end = &sgiioc4_ide_dma_end; hwif->ide_dma_end = &sgiioc4_ide_dma_end;
hwif->ide_dma_check = &sgiioc4_ide_dma_check; hwif->ide_dma_check = &sgiioc4_ide_dma_check;
hwif->ide_dma_on = &sgiioc4_ide_dma_on; hwif->ide_dma_on = &sgiioc4_ide_dma_on;
......
...@@ -236,15 +236,13 @@ static int sl82c105_ide_dma_lost_irq(ide_drive_t *drive) ...@@ -236,15 +236,13 @@ static int sl82c105_ide_dma_lost_irq(ide_drive_t *drive)
* The generic IDE core will have disabled the BMEN bit before this * The generic IDE core will have disabled the BMEN bit before this
* function is called. * function is called.
*/ */
static int sl82c105_ide_dma_begin(ide_drive_t *drive) static void sl82c105_ide_dma_start(ide_drive_t *drive)
{ {
ide_hwif_t *hwif = HWIF(drive); ide_hwif_t *hwif = HWIF(drive);
struct pci_dev *dev = hwif->pci_dev; struct pci_dev *dev = hwif->pci_dev;
// DBG(("sl82c105_ide_dma_begin(drive:%s)\n", drive->name));
sl82c105_reset_host(dev); sl82c105_reset_host(dev);
return __ide_dma_begin(drive); ide_dma_start(drive);
} }
static int sl82c105_ide_dma_timeout(ide_drive_t *drive) static int sl82c105_ide_dma_timeout(ide_drive_t *drive)
...@@ -469,7 +467,7 @@ static void __init init_hwif_sl82c105(ide_hwif_t *hwif) ...@@ -469,7 +467,7 @@ static void __init init_hwif_sl82c105(ide_hwif_t *hwif)
hwif->ide_dma_on = &sl82c105_ide_dma_on; hwif->ide_dma_on = &sl82c105_ide_dma_on;
hwif->ide_dma_off_quietly = &sl82c105_ide_dma_off_quietly; hwif->ide_dma_off_quietly = &sl82c105_ide_dma_off_quietly;
hwif->ide_dma_lostirq = &sl82c105_ide_dma_lost_irq; hwif->ide_dma_lostirq = &sl82c105_ide_dma_lost_irq;
hwif->ide_dma_begin = &sl82c105_ide_dma_begin; hwif->dma_start = &sl82c105_ide_dma_start;
hwif->ide_dma_timeout = &sl82c105_ide_dma_timeout; hwif->ide_dma_timeout = &sl82c105_ide_dma_timeout;
if (!noautodma) if (!noautodma)
......
...@@ -220,9 +220,8 @@ static int trm290_ide_dma_setup(ide_drive_t *drive) ...@@ -220,9 +220,8 @@ static int trm290_ide_dma_setup(ide_drive_t *drive)
return 0; return 0;
} }
static int trm290_ide_dma_begin (ide_drive_t *drive) static void trm290_ide_dma_start(ide_drive_t *drive)
{ {
return 0;
} }
static int trm290_ide_dma_end (ide_drive_t *drive) static int trm290_ide_dma_end (ide_drive_t *drive)
...@@ -295,7 +294,7 @@ void __devinit init_hwif_trm290(ide_hwif_t *hwif) ...@@ -295,7 +294,7 @@ void __devinit init_hwif_trm290(ide_hwif_t *hwif)
#ifdef CONFIG_BLK_DEV_IDEDMA #ifdef CONFIG_BLK_DEV_IDEDMA
hwif->dma_setup = &trm290_ide_dma_setup; hwif->dma_setup = &trm290_ide_dma_setup;
hwif->dma_exec_cmd = &trm290_ide_dma_exec_cmd; hwif->dma_exec_cmd = &trm290_ide_dma_exec_cmd;
hwif->ide_dma_begin = &trm290_ide_dma_begin; hwif->dma_start = &trm290_ide_dma_start;
hwif->ide_dma_end = &trm290_ide_dma_end; hwif->ide_dma_end = &trm290_ide_dma_end;
hwif->ide_dma_test_irq = &trm290_ide_dma_test_irq; hwif->ide_dma_test_irq = &trm290_ide_dma_test_irq;
#endif /* CONFIG_BLK_DEV_IDEDMA */ #endif /* CONFIG_BLK_DEV_IDEDMA */
......
...@@ -362,7 +362,6 @@ static int pmac_ide_tune_chipset(ide_drive_t *drive, u8 speed); ...@@ -362,7 +362,6 @@ static int pmac_ide_tune_chipset(ide_drive_t *drive, u8 speed);
static void pmac_ide_tuneproc(ide_drive_t *drive, u8 pio); static void pmac_ide_tuneproc(ide_drive_t *drive, u8 pio);
static void pmac_ide_selectproc(ide_drive_t *drive); static void pmac_ide_selectproc(ide_drive_t *drive);
static void pmac_ide_kauai_selectproc(ide_drive_t *drive); static void pmac_ide_kauai_selectproc(ide_drive_t *drive);
static int pmac_ide_dma_begin (ide_drive_t *drive);
#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */
...@@ -1918,8 +1917,8 @@ pmac_ide_dma_exec_cmd(ide_drive_t *drive, u8 command) ...@@ -1918,8 +1917,8 @@ pmac_ide_dma_exec_cmd(ide_drive_t *drive, u8 command)
* Kick the DMA controller into life after the DMA command has been issued * Kick the DMA controller into life after the DMA command has been issued
* to the drive. * to the drive.
*/ */
static int __pmac static void __pmac
pmac_ide_dma_begin (ide_drive_t *drive) pmac_ide_dma_start(ide_drive_t *drive)
{ {
pmac_ide_hwif_t* pmif = (pmac_ide_hwif_t *)HWIF(drive)->hwif_data; pmac_ide_hwif_t* pmif = (pmac_ide_hwif_t *)HWIF(drive)->hwif_data;
volatile struct dbdma_regs __iomem *dma; volatile struct dbdma_regs __iomem *dma;
...@@ -1929,7 +1928,6 @@ pmac_ide_dma_begin (ide_drive_t *drive) ...@@ -1929,7 +1928,6 @@ pmac_ide_dma_begin (ide_drive_t *drive)
writel((RUN << 16) | RUN, &dma->control); writel((RUN << 16) | RUN, &dma->control);
/* Make sure it gets to the controller right now */ /* Make sure it gets to the controller right now */
(void)readl(&dma->control); (void)readl(&dma->control);
return 0;
} }
/* /*
...@@ -2087,7 +2085,7 @@ pmac_ide_setup_dma(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif) ...@@ -2087,7 +2085,7 @@ pmac_ide_setup_dma(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
hwif->ide_dma_check = &pmac_ide_dma_check; hwif->ide_dma_check = &pmac_ide_dma_check;
hwif->dma_setup = &pmac_ide_dma_setup; hwif->dma_setup = &pmac_ide_dma_setup;
hwif->dma_exec_cmd = &pmac_ide_dma_exec_cmd; hwif->dma_exec_cmd = &pmac_ide_dma_exec_cmd;
hwif->ide_dma_begin = &pmac_ide_dma_begin; hwif->dma_start = &pmac_ide_dma_start;
hwif->ide_dma_end = &pmac_ide_dma_end; hwif->ide_dma_end = &pmac_ide_dma_end;
hwif->ide_dma_test_irq = &pmac_ide_dma_test_irq; hwif->ide_dma_test_irq = &pmac_ide_dma_test_irq;
hwif->ide_dma_host_off = &pmac_ide_dma_host_off; hwif->ide_dma_host_off = &pmac_ide_dma_host_off;
......
...@@ -555,6 +555,7 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive) ...@@ -555,6 +555,7 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive)
static ide_startstop_t idescsi_transfer_pc(ide_drive_t *drive) static ide_startstop_t idescsi_transfer_pc(ide_drive_t *drive)
{ {
ide_hwif_t *hwif = drive->hwif;
idescsi_scsi_t *scsi = drive_to_idescsi(drive); idescsi_scsi_t *scsi = drive_to_idescsi(drive);
idescsi_pc_t *pc = scsi->pc; idescsi_pc_t *pc = scsi->pc;
atapi_ireason_t ireason; atapi_ireason_t ireason;
...@@ -579,7 +580,7 @@ static ide_startstop_t idescsi_transfer_pc(ide_drive_t *drive) ...@@ -579,7 +580,7 @@ static ide_startstop_t idescsi_transfer_pc(ide_drive_t *drive)
atapi_output_bytes(drive, scsi->pc->c, 12); atapi_output_bytes(drive, scsi->pc->c, 12);
if (test_bit (PC_DMA_OK, &pc->flags)) { if (test_bit (PC_DMA_OK, &pc->flags)) {
set_bit (PC_DMA_IN_PROGRESS, &pc->flags); set_bit (PC_DMA_IN_PROGRESS, &pc->flags);
(void) (HWIF(drive)->ide_dma_begin(drive)); hwif->dma_start(drive);
} }
return ide_started; return ide_started;
} }
......
...@@ -889,7 +889,7 @@ typedef struct hwif_s { ...@@ -889,7 +889,7 @@ typedef struct hwif_s {
int (*dma_setup)(ide_drive_t *); int (*dma_setup)(ide_drive_t *);
void (*dma_exec_cmd)(ide_drive_t *, u8); void (*dma_exec_cmd)(ide_drive_t *, u8);
int (*ide_dma_begin)(ide_drive_t *drive); void (*dma_start)(ide_drive_t *);
int (*ide_dma_end)(ide_drive_t *drive); int (*ide_dma_end)(ide_drive_t *drive);
int (*ide_dma_check)(ide_drive_t *drive); int (*ide_dma_check)(ide_drive_t *drive);
int (*ide_dma_on)(ide_drive_t *drive); int (*ide_dma_on)(ide_drive_t *drive);
...@@ -1551,7 +1551,7 @@ extern int __ide_dma_host_on(ide_drive_t *); ...@@ -1551,7 +1551,7 @@ extern int __ide_dma_host_on(ide_drive_t *);
extern int __ide_dma_on(ide_drive_t *); extern int __ide_dma_on(ide_drive_t *);
extern int __ide_dma_check(ide_drive_t *); extern int __ide_dma_check(ide_drive_t *);
extern int ide_dma_setup(ide_drive_t *); extern int ide_dma_setup(ide_drive_t *);
extern int __ide_dma_begin(ide_drive_t *); extern void ide_dma_start(ide_drive_t *);
extern int __ide_dma_end(ide_drive_t *); extern int __ide_dma_end(ide_drive_t *);
extern int __ide_dma_test_irq(ide_drive_t *); extern int __ide_dma_test_irq(ide_drive_t *);
extern int __ide_dma_verbose(ide_drive_t *); extern int __ide_dma_verbose(ide_drive_t *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment