diff options
Diffstat (limited to 'drivers/ide/pci/it8213.c')
-rw-r--r-- | drivers/ide/pci/it8213.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/ide/pci/it8213.c b/drivers/ide/pci/it8213.c index d07771e06b2d..24ef091ec5b9 100644 --- a/drivers/ide/pci/it8213.c +++ b/drivers/ide/pci/it8213.c | |||
@@ -132,6 +132,11 @@ static int it8213_tune_chipset(ide_drive_t *drive, const u8 speed) | |||
132 | u16 reg4042, reg4a; | 132 | u16 reg4042, reg4a; |
133 | u8 reg48, reg54, reg55; | 133 | u8 reg48, reg54, reg55; |
134 | 134 | ||
135 | if (speed >= XFER_PIO_0 && speed <= XFER_PIO_4) { | ||
136 | it8213_tune_pio(drive, speed - XFER_PIO_0); | ||
137 | return ide_config_drive_speed(drive, speed); | ||
138 | } | ||
139 | |||
135 | pci_read_config_word(dev, maslave, ®4042); | 140 | pci_read_config_word(dev, maslave, ®4042); |
136 | pci_read_config_byte(dev, 0x48, ®48); | 141 | pci_read_config_byte(dev, 0x48, ®48); |
137 | pci_read_config_word(dev, 0x4a, ®4a); | 142 | pci_read_config_word(dev, 0x4a, ®4a); |
@@ -151,12 +156,6 @@ static int it8213_tune_chipset(ide_drive_t *drive, const u8 speed) | |||
151 | case XFER_MW_DMA_1: | 156 | case XFER_MW_DMA_1: |
152 | case XFER_SW_DMA_2: | 157 | case XFER_SW_DMA_2: |
153 | break; | 158 | break; |
154 | case XFER_PIO_4: | ||
155 | case XFER_PIO_3: | ||
156 | case XFER_PIO_2: | ||
157 | case XFER_PIO_1: | ||
158 | case XFER_PIO_0: | ||
159 | break; | ||
160 | default: | 159 | default: |
161 | return -1; | 160 | return -1; |
162 | } | 161 | } |
@@ -188,10 +187,7 @@ static int it8213_tune_chipset(ide_drive_t *drive, const u8 speed) | |||
188 | pci_write_config_byte(dev, 0x55, (u8) reg55 & ~w_flag); | 187 | pci_write_config_byte(dev, 0x55, (u8) reg55 & ~w_flag); |
189 | } | 188 | } |
190 | 189 | ||
191 | if (speed > XFER_PIO_4) | 190 | it8213_tune_pio(drive, it8213_dma_2_pio(speed)); |
192 | it8213_tune_pio(drive, it8213_dma_2_pio(speed)); | ||
193 | else | ||
194 | it8213_tune_pio(drive, speed - XFER_PIO_0); | ||
195 | 191 | ||
196 | return ide_config_drive_speed(drive, speed); | 192 | return ide_config_drive_speed(drive, speed); |
197 | } | 193 | } |