diff options
| -rw-r--r-- | drivers/ide/pdc202xx_old.c | 22 |
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 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org> | 2 | * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org> |
| 3 | * Copyright (C) 2006-2007 MontaVista Software, Inc. | 3 | * Copyright (C) 2006-2007, 2009 MontaVista Software, Inc. |
| 4 | * Copyright (C) 2007 Bartlomiej Zolnierkiewicz | 4 | * Copyright (C) 2007 Bartlomiej Zolnierkiewicz |
| 5 | * | 5 | * |
| 6 | * Portions Copyright (C) 1999 Promise Technology, Inc. | 6 | * Portions Copyright (C) 1999 Promise Technology, Inc. |
| @@ -227,28 +227,19 @@ somebody_else: | |||
| 227 | return (dma_stat & 4) == 4; /* return 1 if INTR asserted */ | 227 | return (dma_stat & 4) == 4; /* return 1 if INTR asserted */ |
| 228 | } | 228 | } |
| 229 | 229 | ||
| 230 | static void pdc202xx_reset_host (ide_hwif_t *hwif) | 230 | static void pdc202xx_reset(ide_drive_t *drive) |
| 231 | { | 231 | { |
| 232 | ide_hwif_t *hwif = drive->hwif; | ||
| 232 | unsigned long high_16 = hwif->extra_base - 16; | 233 | unsigned long high_16 = hwif->extra_base - 16; |
| 233 | u8 udma_speed_flag = inb(high_16 | 0x001f); | 234 | u8 udma_speed_flag = inb(high_16 | 0x001f); |
| 234 | 235 | ||
| 236 | printk(KERN_WARNING "PDC202xx: software reset...\n"); | ||
| 237 | |||
| 235 | outb(udma_speed_flag | 0x10, high_16 | 0x001f); | 238 | outb(udma_speed_flag | 0x10, high_16 | 0x001f); |
| 236 | mdelay(100); | 239 | mdelay(100); |
| 237 | outb(udma_speed_flag & ~0x10, high_16 | 0x001f); | 240 | outb(udma_speed_flag & ~0x10, high_16 | 0x001f); |
| 238 | mdelay(2000); /* 2 seconds ?! */ | 241 | mdelay(2000); /* 2 seconds ?! */ |
| 239 | 242 | ||
| 240 | printk(KERN_WARNING "PDC202XX: %s channel reset.\n", | ||
| 241 | hwif->channel ? "Secondary" : "Primary"); | ||
| 242 | } | ||
| 243 | |||
| 244 | static void pdc202xx_reset (ide_drive_t *drive) | ||
| 245 | { | ||
| 246 | ide_hwif_t *hwif = drive->hwif; | ||
| 247 | ide_hwif_t *mate = hwif->mate; | ||
| 248 | |||
| 249 | pdc202xx_reset_host(hwif); | ||
| 250 | pdc202xx_reset_host(mate); | ||
| 251 | |||
| 252 | ide_set_max_pio(drive); | 243 | ide_set_max_pio(drive); |
| 253 | } | 244 | } |
| 254 | 245 | ||
| @@ -328,9 +319,8 @@ static const struct ide_dma_ops pdc20246_dma_ops = { | |||
| 328 | .dma_start = ide_dma_start, | 319 | .dma_start = ide_dma_start, |
| 329 | .dma_end = ide_dma_end, | 320 | .dma_end = ide_dma_end, |
| 330 | .dma_test_irq = pdc202xx_dma_test_irq, | 321 | .dma_test_irq = pdc202xx_dma_test_irq, |
| 331 | .dma_lost_irq = pdc202xx_dma_lost_irq, | 322 | .dma_lost_irq = ide_dma_lost_irq, |
| 332 | .dma_timer_expiry = ide_dma_sff_timer_expiry, | 323 | .dma_timer_expiry = ide_dma_sff_timer_expiry, |
| 333 | .dma_clear = pdc202xx_reset, | ||
| 334 | .dma_sff_read_status = ide_dma_sff_read_status, | 324 | .dma_sff_read_status = ide_dma_sff_read_status, |
| 335 | }; | 325 | }; |
| 336 | 326 | ||
