Commit 59c8d04f authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Bartlomiej Zolnierkiewicz

hpt366: use ATA_DMA_* constants

Use ATA_DMA_* constants instead of the bare numbers for the BMIDE register bits.
Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent c018f1ee
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Portions Copyright (C) 2001 Sun Microsystems, Inc. * Portions Copyright (C) 2001 Sun Microsystems, Inc.
* Portions Copyright (C) 2003 Red Hat Inc * Portions Copyright (C) 2003 Red Hat Inc
* Portions Copyright (C) 2007 Bartlomiej Zolnierkiewicz * Portions Copyright (C) 2007 Bartlomiej Zolnierkiewicz
* Portions Copyright (C) 2005-2008 MontaVista Software, Inc. * Portions Copyright (C) 2005-2009 MontaVista Software, Inc.
* *
* Thanks to HighPoint Technologies for their assistance, and hardware. * Thanks to HighPoint Technologies for their assistance, and hardware.
* Special Thanks to Jon Burchmore in SanDiego for the deep pockets, his * Special Thanks to Jon Burchmore in SanDiego for the deep pockets, his
...@@ -810,7 +810,7 @@ static void hpt370_irq_timeout(ide_drive_t *drive) ...@@ -810,7 +810,7 @@ static void hpt370_irq_timeout(ide_drive_t *drive)
/* get DMA command mode */ /* get DMA command mode */
dma_cmd = inb(hwif->dma_base + ATA_DMA_CMD); dma_cmd = inb(hwif->dma_base + ATA_DMA_CMD);
/* stop DMA */ /* stop DMA */
outb(dma_cmd & ~0x1, hwif->dma_base + ATA_DMA_CMD); outb(dma_cmd & ~ATA_DMA_START, hwif->dma_base + ATA_DMA_CMD);
hpt370_clear_engine(drive); hpt370_clear_engine(drive);
} }
...@@ -827,11 +827,11 @@ static int hpt370_dma_end(ide_drive_t *drive) ...@@ -827,11 +827,11 @@ static int hpt370_dma_end(ide_drive_t *drive)
ide_hwif_t *hwif = drive->hwif; ide_hwif_t *hwif = drive->hwif;
u8 dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS); u8 dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS);
if (dma_stat & 0x01) { if (dma_stat & ATA_DMA_ACTIVE) {
/* wait a little */ /* wait a little */
udelay(20); udelay(20);
dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS); dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS);
if (dma_stat & 0x01) if (dma_stat & ATA_DMA_ACTIVE)
hpt370_irq_timeout(drive); hpt370_irq_timeout(drive);
} }
return ide_dma_end(drive); return ide_dma_end(drive);
...@@ -853,7 +853,7 @@ static int hpt374_dma_test_irq(ide_drive_t *drive) ...@@ -853,7 +853,7 @@ static int hpt374_dma_test_irq(ide_drive_t *drive)
dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS); dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS);
/* return 1 if INTR asserted */ /* return 1 if INTR asserted */
if (dma_stat & 4) if (dma_stat & ATA_DMA_INTR)
return 1; return 1;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment