diff options
Diffstat (limited to 'drivers/ata/pata_sl82c105.c')
-rw-r--r-- | drivers/ata/pata_sl82c105.c | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/drivers/ata/pata_sl82c105.c b/drivers/ata/pata_sl82c105.c index 96e890fd645b..13e81f0ef1f7 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.3.0" |
23 | 30 | ||
24 | enum { | 31 | enum { |
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 | |||
138 | static 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 | ||
228 | static struct scsi_host_template sl82c105_sht = { | 208 | static struct scsi_host_template sl82c105_sht = { |
@@ -246,7 +226,6 @@ static struct scsi_host_template sl82c105_sht = { | |||
246 | static struct ata_port_operations sl82c105_port_ops = { | 226 | static 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, |