Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93654
b: refs/heads/master
c: 63158d5
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Apr 26, 2008
1 parent ef159ef commit 6914f29
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 19 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: d54452fbf84500eff77a55a2061f4669441d2cc3
refs/heads/master: 63158d5c217e2e62665ae9b10d203bd7da817108
5 changes: 4 additions & 1 deletion trunk/drivers/ide/arm/palm_bk3710.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,10 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev)
hwif->mmio = 1;
default_hwif_mmiops(hwif);

ide_setup_dma(hwif, mem->start);
printk(KERN_INFO " %s: MMIO-DMA\n", hwif->name);

if (ide_allocate_dma_engine(hwif) == 0)
ide_setup_dma(hwif, mem->start);

idx[0] = i;

Expand Down
13 changes: 0 additions & 13 deletions trunk/drivers/ide/ide-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -841,19 +841,6 @@ EXPORT_SYMBOL_GPL(ide_allocate_dma_engine);

void ide_setup_dma(ide_hwif_t *hwif, unsigned long base)
{
if (hwif->mmio)
printk(KERN_INFO " %s: MMIO-DMA\n", hwif->name);
else
printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx\n",
hwif->name, base, base + 7);

hwif->extra_base = base + (hwif->channel ? 8 : 16);

if (ide_allocate_dma_engine(hwif)) {
ide_release_dma_engine(hwif);
return;
}

hwif->dma_base = base;

if (!hwif->dma_command)
Expand Down
17 changes: 13 additions & 4 deletions trunk/drivers/ide/setup-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,15 +367,24 @@ void ide_hwif_setup_dma(ide_hwif_t *hwif, const struct ide_port_info *d)
if ((d->host_flags & IDE_HFLAG_NO_AUTODMA) == 0 ||
((dev->class >> 8) == PCI_CLASS_STORAGE_IDE &&
(dev->class & 0x80))) {
unsigned long dma_base = ide_get_or_set_dma_base(d, hwif);
unsigned long base = ide_get_or_set_dma_base(d, hwif);

if (dma_base == 0 || ide_pci_set_master(dev, d->name) < 0)
if (base == 0 || ide_pci_set_master(dev, d->name) < 0)
goto out_disabled;

if (d->init_dma)
d->init_dma(hwif, dma_base);
d->init_dma(hwif, base);

ide_setup_dma(hwif, dma_base);
if (hwif->mmio)
printk(KERN_INFO " %s: MMIO-DMA\n", hwif->name);
else
printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx\n",
hwif->name, base, base + 7);

hwif->extra_base = base + (hwif->channel ? 8 : 16);

if (ide_allocate_dma_engine(hwif) == 0)
ide_setup_dma(hwif, base);
}

return;
Expand Down

0 comments on commit 6914f29

Please sign in to comment.