aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/tc86c001.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-05-09 18:01:09 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-05-09 18:01:09 -0400
commit29e744d088e3555f4efbdf390f01088dd66993b6 (patch)
tree2747692efcef505872d29e0b62cb2345b0d64978 /drivers/ide/pci/tc86c001.c
parent2d5eaa6dd744a641e75503232a01f52d0768884c (diff)
ide: add ide_tune_dma() helper
After reworking the code responsible for selecting the best DMA transfer mode it is now possible to add generic ide_tune_dma() helper. Convert some IDE PCI host drivers to use it (the ones left need more work). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/tc86c001.c')
-rw-r--r--drivers/ide/pci/tc86c001.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/ide/pci/tc86c001.c b/drivers/ide/pci/tc86c001.c
index 168f035caa3f..cee619bb2eaf 100644
--- a/drivers/ide/pci/tc86c001.c
+++ b/drivers/ide/pci/tc86c001.c
@@ -167,20 +167,9 @@ static int tc86c001_busproc(ide_drive_t *drive, int state)
167 return 0; 167 return 0;
168} 168}
169 169
170static int config_chipset_for_dma(ide_drive_t *drive)
171{
172 u8 speed = ide_max_dma_mode(drive);
173
174 if (!speed)
175 return 0;
176
177 (void) tc86c001_tune_chipset(drive, speed);
178 return ide_dma_enable(drive);
179}
180
181static int tc86c001_config_drive_xfer_rate(ide_drive_t *drive) 170static int tc86c001_config_drive_xfer_rate(ide_drive_t *drive)
182{ 171{
183 if (ide_use_dma(drive) && config_chipset_for_dma(drive)) 172 if (ide_tune_dma(drive))
184 return 0; 173 return 0;
185 174
186 if (ide_use_fast_pio(drive)) 175 if (ide_use_fast_pio(drive))