aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/siimage.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/siimage.c')
-rw-r--r--drivers/ide/siimage.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/ide/siimage.c b/drivers/ide/siimage.c
index bd82d228608c..6a643fdf0e6e 100644
--- a/drivers/ide/siimage.c
+++ b/drivers/ide/siimage.c
@@ -32,7 +32,6 @@
32 * smarter code in libata. 32 * smarter code in libata.
33 * 33 *
34 * TODO: 34 * TODO:
35 * - IORDY fixes
36 * - VDMA support 35 * - VDMA support
37 */ 36 */
38 37
@@ -234,8 +233,7 @@ static u8 sil_sata_udma_filter(ide_drive_t *drive)
234 * @pio: PIO mode number 233 * @pio: PIO mode number
235 * 234 *
236 * Load the timing settings for this device mode into the 235 * Load the timing settings for this device mode into the
237 * controller. If we are in PIO mode 3 or 4 turn on IORDY 236 * controller.
238 * monitoring (bit 9). The TF timing is bits 31:16
239 */ 237 */
240 238
241static void sil_set_pio_mode(ide_drive_t *drive, u8 pio) 239static void sil_set_pio_mode(ide_drive_t *drive, u8 pio)
@@ -276,13 +274,16 @@ static void sil_set_pio_mode(ide_drive_t *drive, u8 pio)
276 /* now set up IORDY */ 274 /* now set up IORDY */
277 speedp = sil_ioread16(dev, tfaddr - 2); 275 speedp = sil_ioread16(dev, tfaddr - 2);
278 speedp &= ~0x200; 276 speedp &= ~0x200;
279 if (pio > 2)
280 speedp |= 0x200;
281 sil_iowrite16(dev, speedp, tfaddr - 2);
282 277
283 mode = sil_ioread8(dev, base + addr_mask); 278 mode = sil_ioread8(dev, base + addr_mask);
284 mode &= ~(unit ? 0x30 : 0x03); 279 mode &= ~(unit ? 0x30 : 0x03);
285 mode |= unit ? 0x10 : 0x01; 280
281 if (ide_pio_need_iordy(drive, pio)) {
282 speedp |= 0x200;
283 mode |= unit ? 0x10 : 0x01;
284 }
285
286 sil_iowrite16(dev, speedp, tfaddr - 2);
286 sil_iowrite8(dev, mode, base + addr_mask); 287 sil_iowrite8(dev, mode, base + addr_mask);
287} 288}
288 289