aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/triflex.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/triflex.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/triflex.c')
-rw-r--r--drivers/ide/pci/triflex.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c
index 8a877235b949..35e8c612638f 100644
--- a/drivers/ide/pci/triflex.c
+++ b/drivers/ide/pci/triflex.c
@@ -100,20 +100,9 @@ static void triflex_tune_drive(ide_drive_t *drive, u8 pio)
100 (void) triflex_tune_chipset(drive, (XFER_PIO_0 + use_pio)); 100 (void) triflex_tune_chipset(drive, (XFER_PIO_0 + use_pio));
101} 101}
102 102
103static int triflex_config_drive_for_dma(ide_drive_t *drive)
104{
105 u8 speed = ide_max_dma_mode(drive);
106
107 if (!speed)
108 return 0;
109
110 (void) triflex_tune_chipset(drive, speed);
111 return ide_dma_enable(drive);
112}
113
114static int triflex_config_drive_xfer_rate(ide_drive_t *drive) 103static int triflex_config_drive_xfer_rate(ide_drive_t *drive)
115{ 104{
116 if (ide_use_dma(drive) && triflex_config_drive_for_dma(drive)) 105 if (ide_tune_dma(drive))
117 return 0; 106 return 0;
118 107
119 triflex_tune_drive(drive, 255); 108 triflex_tune_drive(drive, 255);