diff options
Diffstat (limited to 'drivers/ide/pci/slc90e66.c')
-rw-r--r-- | drivers/ide/pci/slc90e66.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c index 852ccb36da1d..c40f291f91e0 100644 --- a/drivers/ide/pci/slc90e66.c +++ b/drivers/ide/pci/slc90e66.c | |||
@@ -21,15 +21,6 @@ | |||
21 | 21 | ||
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | 23 | ||
24 | static u8 slc90e66_ratemask (ide_drive_t *drive) | ||
25 | { | ||
26 | u8 mode = 2; | ||
27 | |||
28 | if (!eighty_ninty_three(drive)) | ||
29 | mode = min_t(u8, mode, 1); | ||
30 | return mode; | ||
31 | } | ||
32 | |||
33 | static u8 slc90e66_dma_2_pio (u8 xfer_rate) { | 24 | static u8 slc90e66_dma_2_pio (u8 xfer_rate) { |
34 | switch(xfer_rate) { | 25 | switch(xfer_rate) { |
35 | case XFER_UDMA_4: | 26 | case XFER_UDMA_4: |
@@ -122,7 +113,7 @@ static int slc90e66_tune_chipset (ide_drive_t *drive, u8 xferspeed) | |||
122 | ide_hwif_t *hwif = HWIF(drive); | 113 | ide_hwif_t *hwif = HWIF(drive); |
123 | struct pci_dev *dev = hwif->pci_dev; | 114 | struct pci_dev *dev = hwif->pci_dev; |
124 | u8 maslave = hwif->channel ? 0x42 : 0x40; | 115 | u8 maslave = hwif->channel ? 0x42 : 0x40; |
125 | u8 speed = ide_rate_filter(slc90e66_ratemask(drive), xferspeed); | 116 | u8 speed = ide_rate_filter(drive, xferspeed); |
126 | int sitre = 0, a_speed = 7 << (drive->dn * 4); | 117 | int sitre = 0, a_speed = 7 << (drive->dn * 4); |
127 | int u_speed = 0, u_flag = 1 << drive->dn; | 118 | int u_speed = 0, u_flag = 1 << drive->dn; |
128 | u16 reg4042, reg44, reg48, reg4a; | 119 | u16 reg4042, reg44, reg48, reg4a; |
@@ -169,22 +160,11 @@ static int slc90e66_tune_chipset (ide_drive_t *drive, u8 xferspeed) | |||
169 | return ide_config_drive_speed(drive, speed); | 160 | return ide_config_drive_speed(drive, speed); |
170 | } | 161 | } |
171 | 162 | ||
172 | static int slc90e66_config_drive_for_dma (ide_drive_t *drive) | ||
173 | { | ||
174 | u8 speed = ide_dma_speed(drive, slc90e66_ratemask(drive)); | ||
175 | |||
176 | if (!speed) | ||
177 | return 0; | ||
178 | |||
179 | (void) slc90e66_tune_chipset(drive, speed); | ||
180 | return ide_dma_enable(drive); | ||
181 | } | ||
182 | |||
183 | static int slc90e66_config_drive_xfer_rate (ide_drive_t *drive) | 163 | static int slc90e66_config_drive_xfer_rate (ide_drive_t *drive) |
184 | { | 164 | { |
185 | drive->init_speed = 0; | 165 | drive->init_speed = 0; |
186 | 166 | ||
187 | if (ide_use_dma(drive) && slc90e66_config_drive_for_dma(drive)) | 167 | if (ide_tune_dma(drive)) |
188 | return 0; | 168 | return 0; |
189 | 169 | ||
190 | if (ide_use_fast_pio(drive)) | 170 | if (ide_use_fast_pio(drive)) |