aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan <alan@lxorguk.ukuu.org.uk>2007-02-20 12:51:51 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-21 04:58:20 -0500
commit16728da99861bdb6e44f066d536287990e752d7b (patch)
treed3a482e45ea2c89e7d43d3740a35b023f1eb60fd
parentcb0e34ba59a1b883009d69673179c6cde70acc25 (diff)
pata_sl82c105: remove un-needed code paths
Remove the DMA setup function. As pointed out by Sergey we set the actual DMA clock timing in set_dmamode so we don't actually need to do anything with it at set up time, but just leave the PIO timings loaded. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/ata/pata_sl82c105.c39
1 files changed, 9 insertions, 30 deletions
diff --git a/drivers/ata/pata_sl82c105.c b/drivers/ata/pata_sl82c105.c
index 96e890fd645b..07204610f0da 100644
--- a/drivers/ata/pata_sl82c105.c
+++ b/drivers/ata/pata_sl82c105.c
@@ -7,6 +7,13 @@
7 * SL82C105/Winbond 553 IDE driver 7 * SL82C105/Winbond 553 IDE driver
8 * 8 *
9 * and in part on the documentation and errata sheet 9 * and in part on the documentation and errata sheet
10 *
11 *
12 * Note: The controller like many controllers has shared timings for
13 * PIO and DMA. We thus flip to the DMA timings in dma_start and flip back
14 * in the dma_stop function. Thus we actually don't need a set_dmamode
15 * method as the PIO method is always called and will set the right PIO
16 * timing parameters.
10 */ 17 */
11 18
12#include <linux/kernel.h> 19#include <linux/kernel.h>
@@ -19,7 +26,7 @@
19#include <linux/libata.h> 26#include <linux/libata.h>
20 27
21#define DRV_NAME "pata_sl82c105" 28#define DRV_NAME "pata_sl82c105"
22#define DRV_VERSION "0.2.3" 29#define DRV_VERSION "0.2.5"
23 30
24enum { 31enum {
25 /* 32 /*
@@ -126,33 +133,6 @@ static void sl82c105_configure_dmamode(struct ata_port *ap, struct ata_device *a
126} 133}
127 134
128/** 135/**
129 * sl82c105_set_dmamode - set initial DMA mode data
130 * @ap: ATA interface
131 * @adev: ATA device
132 *
133 * Called to do the DMA mode setup. This replaces the PIO timings
134 * for the device in question. Set appropriate PIO timings not DMA
135 * timings at this point.
136 */
137
138static void sl82c105_set_dmamode(struct ata_port *ap, struct ata_device *adev)
139{
140 switch(adev->dma_mode) {
141 case XFER_MW_DMA_0:
142 sl82c105_configure_piomode(ap, adev, 0);
143 break;
144 case XFER_MW_DMA_1:
145 sl82c105_configure_piomode(ap, adev, 3);
146 break;
147 case XFER_MW_DMA_2:
148 sl82c105_configure_piomode(ap, adev, 4);
149 break;
150 default:
151 BUG();
152 }
153}
154
155/**
156 * sl82c105_reset_engine - Reset the DMA engine 136 * sl82c105_reset_engine - Reset the DMA engine
157 * @ap: ATA interface 137 * @ap: ATA interface
158 * 138 *
@@ -222,7 +202,7 @@ static void sl82c105_bmdma_stop(struct ata_queued_cmd *qc)
222 202
223 /* This will redo the initial setup of the DMA device to matching 203 /* This will redo the initial setup of the DMA device to matching
224 PIO timings */ 204 PIO timings */
225 sl82c105_set_dmamode(ap, qc->dev); 205 sl82c105_set_piomode(ap, qc->dev);
226} 206}
227 207
228static struct scsi_host_template sl82c105_sht = { 208static struct scsi_host_template sl82c105_sht = {
@@ -246,7 +226,6 @@ static struct scsi_host_template sl82c105_sht = {
246static struct ata_port_operations sl82c105_port_ops = { 226static struct ata_port_operations sl82c105_port_ops = {
247 .port_disable = ata_port_disable, 227 .port_disable = ata_port_disable,
248 .set_piomode = sl82c105_set_piomode, 228 .set_piomode = sl82c105_set_piomode,
249 .set_dmamode = sl82c105_set_dmamode,
250 .mode_filter = ata_pci_default_filter, 229 .mode_filter = ata_pci_default_filter,
251 230
252 .tf_load = ata_tf_load, 231 .tf_load = ata_tf_load,