mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
siimage: use ide_dma_test_irq() (take 2)
Remove interrupt bit test (not trusted anyway) from siimage_io_dma_test_irq() and siimage_mmio_dma_test_irq() -- this allows to replace the former function with now identical ide_dma_test_irq()... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
parent
30e5ffc368
commit
74414a9120
1 changed files with 1 additions and 26 deletions
|
@ -338,26 +338,6 @@ static void sil_set_dma_mode(ide_drive_t *drive, const u8 speed)
|
||||||
sil_iowrite16(dev, ultra, ua);
|
sil_iowrite16(dev, ultra, ua);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* returns 1 if dma irq issued, 0 otherwise */
|
|
||||||
static int siimage_io_dma_test_irq(ide_drive_t *drive)
|
|
||||||
{
|
|
||||||
ide_hwif_t *hwif = drive->hwif;
|
|
||||||
struct pci_dev *dev = to_pci_dev(hwif->dev);
|
|
||||||
u8 dma_altstat = 0;
|
|
||||||
unsigned long addr = siimage_selreg(hwif, 1);
|
|
||||||
|
|
||||||
/* return 1 if INTR asserted */
|
|
||||||
if (inb(hwif->dma_base + ATA_DMA_STATUS) & 4)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
/* return 1 if Device INTR asserted */
|
|
||||||
pci_read_config_byte(dev, addr, &dma_altstat);
|
|
||||||
if (dma_altstat & 8)
|
|
||||||
return 0; /* return 1; */
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* siimage_mmio_dma_test_irq - check we caused an IRQ
|
* siimage_mmio_dma_test_irq - check we caused an IRQ
|
||||||
* @drive: drive we are testing
|
* @drive: drive we are testing
|
||||||
|
@ -369,7 +349,6 @@ static int siimage_io_dma_test_irq(ide_drive_t *drive)
|
||||||
static int siimage_mmio_dma_test_irq(ide_drive_t *drive)
|
static int siimage_mmio_dma_test_irq(ide_drive_t *drive)
|
||||||
{
|
{
|
||||||
ide_hwif_t *hwif = drive->hwif;
|
ide_hwif_t *hwif = drive->hwif;
|
||||||
unsigned long addr = siimage_selreg(hwif, 0x1);
|
|
||||||
void __iomem *sata_error_addr
|
void __iomem *sata_error_addr
|
||||||
= (void __iomem *)hwif->sata_scr[SATA_ERROR_OFFSET];
|
= (void __iomem *)hwif->sata_scr[SATA_ERROR_OFFSET];
|
||||||
|
|
||||||
|
@ -398,10 +377,6 @@ static int siimage_mmio_dma_test_irq(ide_drive_t *drive)
|
||||||
if (readb((void __iomem *)(hwif->dma_base + ATA_DMA_STATUS)) & 4)
|
if (readb((void __iomem *)(hwif->dma_base + ATA_DMA_STATUS)) & 4)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/* return 1 if Device INTR asserted */
|
|
||||||
if (readb((void __iomem *)addr) & 8)
|
|
||||||
return 0; /* return 1; */
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -410,7 +385,7 @@ static int siimage_dma_test_irq(ide_drive_t *drive)
|
||||||
if (drive->hwif->host_flags & IDE_HFLAG_MMIO)
|
if (drive->hwif->host_flags & IDE_HFLAG_MMIO)
|
||||||
return siimage_mmio_dma_test_irq(drive);
|
return siimage_mmio_dma_test_irq(drive);
|
||||||
else
|
else
|
||||||
return siimage_io_dma_test_irq(drive);
|
return ide_dma_test_irq(drive);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue