diff options
Diffstat (limited to 'drivers/ata/pata_pdc2027x.c')
-rw-r--r-- | drivers/ata/pata_pdc2027x.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c index 0e1c2c1134d3..d43e8be96b88 100644 --- a/drivers/ata/pata_pdc2027x.c +++ b/drivers/ata/pata_pdc2027x.c | |||
@@ -406,23 +406,20 @@ static int pdc2027x_set_mode(struct ata_link *link, struct ata_device **r_failed | |||
406 | if (rc < 0) | 406 | if (rc < 0) |
407 | return rc; | 407 | return rc; |
408 | 408 | ||
409 | ata_link_for_each_dev(dev, link) { | 409 | ata_for_each_dev(dev, link, ENABLED) { |
410 | if (ata_dev_enabled(dev)) { | 410 | pdc2027x_set_piomode(ap, dev); |
411 | 411 | ||
412 | pdc2027x_set_piomode(ap, dev); | 412 | /* |
413 | 413 | * Enable prefetch if the device support PIO only. | |
414 | /* | 414 | */ |
415 | * Enable prefetch if the device support PIO only. | 415 | if (dev->xfer_shift == ATA_SHIFT_PIO) { |
416 | */ | 416 | u32 ctcr1 = ioread32(dev_mmio(ap, dev, PDC_CTCR1)); |
417 | if (dev->xfer_shift == ATA_SHIFT_PIO) { | 417 | ctcr1 |= (1 << 25); |
418 | u32 ctcr1 = ioread32(dev_mmio(ap, dev, PDC_CTCR1)); | 418 | iowrite32(ctcr1, dev_mmio(ap, dev, PDC_CTCR1)); |
419 | ctcr1 |= (1 << 25); | 419 | |
420 | iowrite32(ctcr1, dev_mmio(ap, dev, PDC_CTCR1)); | 420 | PDPRINTK("Turn on prefetch\n"); |
421 | 421 | } else { | |
422 | PDPRINTK("Turn on prefetch\n"); | 422 | pdc2027x_set_dmamode(ap, dev); |
423 | } else { | ||
424 | pdc2027x_set_dmamode(ap, dev); | ||
425 | } | ||
426 | } | 423 | } |
427 | } | 424 | } |
428 | return 0; | 425 | return 0; |