aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/pci/cs5520.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c
index cb2a10203dc4..fbce90048aec 100644
--- a/drivers/ide/pci/cs5520.c
+++ b/drivers/ide/pci/cs5520.c
@@ -142,25 +142,24 @@ static void __devinit init_hwif_cs5520(ide_hwif_t *hwif)
142{ 142{
143 hwif->set_pio_mode = &cs5520_set_pio_mode; 143 hwif->set_pio_mode = &cs5520_set_pio_mode;
144 hwif->set_dma_mode = &cs5520_set_dma_mode; 144 hwif->set_dma_mode = &cs5520_set_dma_mode;
145 hwif->ide_dma_check = &cs5520_config_drive_xfer_rate;
146 hwif->ide_dma_on = &cs5520_dma_on;
147 145
148 if(!noautodma) 146 if (hwif->dma_base == 0) {
149 hwif->autodma = 1; 147 hwif->drives[1].autotune = hwif->drives[0].autotune = 1;
150
151 if(!hwif->dma_base)
152 {
153 hwif->drives[0].autotune = 1;
154 hwif->drives[1].autotune = 1;
155 return; 148 return;
156 } 149 }
157 150
151 hwif->ide_dma_check = &cs5520_config_drive_xfer_rate;
152 hwif->ide_dma_on = &cs5520_dma_on;
153
158 /* ATAPI is harder so leave it for now */ 154 /* ATAPI is harder so leave it for now */
159 hwif->atapi_dma = 0; 155 hwif->atapi_dma = 0;
160 hwif->ultra_mask = 0; 156 hwif->ultra_mask = 0;
161 hwif->swdma_mask = 0; 157 hwif->swdma_mask = 0;
162 hwif->mwdma_mask = 0; 158 hwif->mwdma_mask = 0;
163 159
160 if (!noautodma)
161 hwif->autodma = 1;
162
164 hwif->drives[0].autodma = hwif->autodma; 163 hwif->drives[0].autodma = hwif->autodma;
165 hwif->drives[1].autodma = hwif->autodma; 164 hwif->drives[1].autodma = hwif->autodma;
166} 165}