summaryrefslogtreecommitdiff
path: root/drivers/ide/pci
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-05-15 22:51:46 (GMT)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-05-15 22:51:46 (GMT)
commit4728d546d7137ad5350cc2e53d4748fd26f61a60 (patch)
tree73cd688f1f16b1d04a23958e7110ba3f70def531 /drivers/ide/pci
parent46cedc9b773795b6190c31e5d32de5207b55a356 (diff)
downloadlinux-4728d546d7137ad5350cc2e53d4748fd26f61a60.tar.xz
ide: remove ide_dma_enable()
* check ->speedproc return value in ide_tune_dma() * use ide_tune_dma() in cmd64x/cs5530/sc1200/siimage/sl82c105/scc_pata drivers * remove no longer needed ide_dma_enable() Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci')
-rw-r--r--drivers/ide/pci/cmd64x.c15
-rw-r--r--drivers/ide/pci/cs5530.c8
-rw-r--r--drivers/ide/pci/sc1200.c8
-rw-r--r--drivers/ide/pci/scc_pata.c22
-rw-r--r--drivers/ide/pci/siimage.c24
-rw-r--r--drivers/ide/pci/sl82c105.c17
6 files changed, 8 insertions, 86 deletions
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c
index 61ea96b..7c57dc6 100644
--- a/drivers/ide/pci/cmd64x.c
+++ b/drivers/ide/pci/cmd64x.c
@@ -352,22 +352,9 @@ static int cmd64x_tune_chipset (ide_drive_t *drive, u8 speed)
return ide_config_drive_speed(drive, speed);
}
-static int config_chipset_for_dma (ide_drive_t *drive)
-{
- u8 speed = ide_max_dma_mode(drive);
-
- if (!speed)
- return 0;
-
- if (cmd64x_tune_chipset(drive, speed))
- return 0;
-
- return ide_dma_enable(drive);
-}
-
static int cmd64x_config_drive_for_dma (ide_drive_t *drive)
{
- if (ide_use_dma(drive) && config_chipset_for_dma(drive))
+ if (ide_tune_dma(drive))
return 0;
if (ide_use_fast_pio(drive))
diff --git a/drivers/ide/pci/cs5530.c b/drivers/ide/pci/cs5530.c
index aacb79b..1eec1f3 100644
--- a/drivers/ide/pci/cs5530.c
+++ b/drivers/ide/pci/cs5530.c
@@ -137,12 +137,8 @@ out:
static int cs5530_config_dma(ide_drive_t *drive)
{
- if (ide_use_dma(drive)) {
- u8 mode = ide_max_dma_mode(drive);
-
- if (mode && drive->hwif->speedproc(drive, mode) == 0)
- return 0;
- }
+ if (ide_tune_dma(drive))
+ return 0;
return 1;
}
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c
index c989fd9..523363c 100644
--- a/drivers/ide/pci/sc1200.c
+++ b/drivers/ide/pci/sc1200.c
@@ -240,12 +240,8 @@ static int sc1200_tune_chipset(ide_drive_t *drive, u8 mode)
*/
static int sc1200_config_dma (ide_drive_t *drive)
{
- if (ide_use_dma(drive)) {
- u8 mode = ide_max_dma_mode(drive);
-
- if (mode && drive->hwif->speedproc(drive, mode) == 0)
- return 0;
- }
+ if (ide_tune_dma(drive))
+ return 0;
return 1;
}
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c
index cbf9363..55bc0a3 100644
--- a/drivers/ide/pci/scc_pata.c
+++ b/drivers/ide/pci/scc_pata.c
@@ -322,26 +322,6 @@ static int scc_tune_chipset(ide_drive_t *drive, byte xferspeed)
}
/**
- * scc_config_chipset_for_dma - configure for DMA
- * @drive: drive to configure
- *
- * Called by scc_config_drive_for_dma().
- */
-
-static int scc_config_chipset_for_dma(ide_drive_t *drive)
-{
- u8 speed = ide_max_dma_mode(drive);
-
- if (!speed)
- return 0;
-
- if (scc_tune_chipset(drive, speed))
- return 0;
-
- return ide_dma_enable(drive);
-}
-
-/**
* scc_configure_drive_for_dma - set up for DMA transfers
* @drive: drive we are going to set up
*
@@ -354,7 +334,7 @@ static int scc_config_chipset_for_dma(ide_drive_t *drive)
static int scc_config_drive_for_dma(ide_drive_t *drive)
{
- if (ide_use_dma(drive) && scc_config_chipset_for_dma(drive))
+ if (ide_tune_dma(drive))
return 0;
if (ide_use_fast_pio(drive))
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c
index d09e74c..1a4444e 100644
--- a/drivers/ide/pci/siimage.c
+++ b/drivers/ide/pci/siimage.c
@@ -375,28 +375,6 @@ static int siimage_tune_chipset (ide_drive_t *drive, byte xferspeed)
}
/**
- * config_chipset_for_dma - configure for DMA
- * @drive: drive to configure
- *
- * Called by the IDE layer when it wants the timings set up.
- * For the CMD680 we also need to set up the PIO timings and
- * enable DMA.
- */
-
-static int config_chipset_for_dma (ide_drive_t *drive)
-{
- u8 speed = ide_max_dma_mode(drive);
-
- if (!speed)
- return 0;
-
- if (siimage_tune_chipset(drive, speed))
- return 0;
-
- return ide_dma_enable(drive);
-}
-
-/**
* siimage_configure_drive_for_dma - set up for DMA transfers
* @drive: drive we are going to set up
*
@@ -408,7 +386,7 @@ static int config_chipset_for_dma (ide_drive_t *drive)
static int siimage_config_drive_for_dma (ide_drive_t *drive)
{
- if (ide_use_dma(drive) && config_chipset_for_dma(drive))
+ if (ide_tune_dma(drive))
return 0;
if (ide_use_fast_pio(drive))
diff --git a/drivers/ide/pci/sl82c105.c b/drivers/ide/pci/sl82c105.c
index 3d7759c..ac1ec17 100644
--- a/drivers/ide/pci/sl82c105.c
+++ b/drivers/ide/pci/sl82c105.c
@@ -159,28 +159,13 @@ static int sl82c105_tune_chipset(ide_drive_t *drive, u8 speed)
}
/*
- * Configure the drive for DMA.
- */
-static int config_for_dma(ide_drive_t *drive)
-{
- u8 speed = ide_max_dma_mode(drive);
-
- DBG(("config_for_dma(drive:%s)\n", drive->name));
-
- if (!speed || sl82c105_tune_chipset(drive, speed))
- return 0;
-
- return ide_dma_enable(drive);
-}
-
-/*
* Check to see if the drive and chipset are capable of DMA mode.
*/
static int sl82c105_ide_dma_check(ide_drive_t *drive)
{
DBG(("sl82c105_ide_dma_check(drive:%s)\n", drive->name));
- if (ide_use_dma(drive) && config_for_dma(drive))
+ if (ide_tune_dma(drive))
return 0;
return -1;