Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145539
b: refs/heads/master
c: 669165d
h: refs/heads/master
i:
  145537: 641ed17
  145535: 3152019
v: v3
  • Loading branch information
Sergei Shtylyov authored and Bartlomiej Zolnierkiewicz committed Jun 7, 2009
1 parent 23f01c5 commit 6a18a6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 521a415c9f6d4e5463807ce6d36598acabcd204f
refs/heads/master: 669165daad2ec839df85b8c5f7bc155e76a2f404
19 changes: 5 additions & 14 deletions trunk/drivers/ide/pdc202xx_old.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -227,28 +227,19 @@ static int pdc202xx_dma_test_irq(ide_drive_t *drive)
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);
}

Expand Down

0 comments on commit 6a18a6d

Please sign in to comment.