forked from Minki/linux
ide: remove ide_dma_iobase()
* ide_mapped_mmio_dma() and ide_iomio_dma() are called only by ide_dma_iobase() so inline them there. * ide_dma_iobase() is called only by ide_setup_dma() so inline it there. * Setup hwif->extra_base also if hwif->mmio flag is set. There should be no functional changes casued by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
parent
21a3387ddd
commit
0a79acd40d
@ -838,37 +838,17 @@ static int ide_allocate_dma_engine(ide_hwif_t *hwif)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ide_mapped_mmio_dma(ide_hwif_t *hwif, unsigned long base)
|
|
||||||
{
|
|
||||||
printk(KERN_INFO " %s: MMIO-DMA ", hwif->name);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int ide_iomio_dma(ide_hwif_t *hwif, unsigned long base)
|
|
||||||
{
|
|
||||||
printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx",
|
|
||||||
hwif->name, base, base + 7);
|
|
||||||
|
|
||||||
hwif->extra_base = base + (hwif->channel ? 8 : 16);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int ide_dma_iobase(ide_hwif_t *hwif, unsigned long base)
|
|
||||||
{
|
|
||||||
if (hwif->mmio)
|
|
||||||
return ide_mapped_mmio_dma(hwif, base);
|
|
||||||
|
|
||||||
return ide_iomio_dma(hwif, base);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ide_setup_dma(ide_hwif_t *hwif, unsigned long base)
|
void ide_setup_dma(ide_hwif_t *hwif, unsigned long base)
|
||||||
{
|
{
|
||||||
u8 dma_stat;
|
u8 dma_stat;
|
||||||
|
|
||||||
if (ide_dma_iobase(hwif, base))
|
if (hwif->mmio)
|
||||||
return;
|
printk(KERN_INFO " %s: MMIO-DMA ", hwif->name);
|
||||||
|
else
|
||||||
|
printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx",
|
||||||
|
hwif->name, base, base + 7);
|
||||||
|
|
||||||
|
hwif->extra_base = base + (hwif->channel ? 8 : 16);
|
||||||
|
|
||||||
if (ide_allocate_dma_engine(hwif)) {
|
if (ide_allocate_dma_engine(hwif)) {
|
||||||
ide_release_dma_engine(hwif);
|
ide_release_dma_engine(hwif);
|
||||||
|
Loading…
Reference in New Issue
Block a user