aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pdc202xx_old.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-06-07 14:27:11 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-06-07 14:27:11 +0200
commit6250d3af2a1036fb356264442211a4246c7d64c7 (patch)
tree12474d59b96c0dc518159cb694f0e654cb18b5f6 /drivers/ide/pdc202xx_old.c
parentMerge branch 'for-linus' into for-next (diff)
parentide: preserve Host Protected Area by default (v2) (diff)
downloadlinux-dev-6250d3af2a1036fb356264442211a4246c7d64c7.tar.xz
linux-dev-6250d3af2a1036fb356264442211a4246c7d64c7.zip
Merge branch 'for-linus' into for-next
Diffstat (limited to 'drivers/ide/pdc202xx_old.c')
-rw-r--r--drivers/ide/pdc202xx_old.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/ide/pdc202xx_old.c b/drivers/ide/pdc202xx_old.c
index 248a54bd2386..b3bc96f930a6 100644
--- a/drivers/ide/pdc202xx_old.c
+++ b/drivers/ide/pdc202xx_old.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org>
- * Copyright (C) 2006-2007 MontaVista Software, Inc.
+ * Copyright (C) 2006-2007, 2009 MontaVista Software, Inc.
* Copyright (C) 2007 Bartlomiej Zolnierkiewicz
*
* Portions Copyright (C) 1999 Promise Technology, Inc.
@@ -227,28 +227,19 @@ somebody_else:
return (dma_stat & 4) == 4; /* return 1 if INTR asserted */
}
-static void pdc202xx_reset_host (ide_hwif_t *hwif)
+static void pdc202xx_reset(ide_drive_t *drive)
{
+ ide_hwif_t *hwif = drive->hwif;
unsigned long high_16 = hwif->extra_base - 16;
u8 udma_speed_flag = inb(high_16 | 0x001f);
+ printk(KERN_WARNING "PDC202xx: software reset...\n");
+
outb(udma_speed_flag | 0x10, high_16 | 0x001f);
mdelay(100);
outb(udma_speed_flag & ~0x10, high_16 | 0x001f);
mdelay(2000); /* 2 seconds ?! */
- printk(KERN_WARNING "PDC202XX: %s channel reset.\n",
- hwif->channel ? "Secondary" : "Primary");
-}
-
-static void pdc202xx_reset (ide_drive_t *drive)
-{
- ide_hwif_t *hwif = drive->hwif;
- ide_hwif_t *mate = hwif->mate;
-
- pdc202xx_reset_host(hwif);
- pdc202xx_reset_host(mate);
-
ide_set_max_pio(drive);
}
@@ -328,9 +319,8 @@ static const struct ide_dma_ops pdc20246_dma_ops = {
.dma_start = ide_dma_start,
.dma_end = ide_dma_end,
.dma_test_irq = pdc202xx_dma_test_irq,
- .dma_lost_irq = pdc202xx_dma_lost_irq,
+ .dma_lost_irq = ide_dma_lost_irq,
.dma_timer_expiry = ide_dma_sff_timer_expiry,
- .dma_clear = pdc202xx_reset,
.dma_sff_read_status = ide_dma_sff_read_status,
};