Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 81345
b: refs/heads/master
c: 450d87e
h: refs/heads/master
i:
  81343: 7430505
v: v3
  • Loading branch information
Michael Ellerman authored and Paul Mackerras committed Jan 25, 2008
1 parent ab2ab6b commit 76f53b0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 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: 110f95c9f082709c5a28a64c00bae819916e8578
refs/heads/master: 450d87eaeb4d43bd9e1f9523a6a3bfeb48209fea
14 changes: 13 additions & 1 deletion trunk/arch/powerpc/platforms/celleb/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,17 @@ static void __init celleb_init_direct_mapping(void)
dma_direct_offset = dma_base;
}

static void celleb_dma_dev_setup(struct device *dev)
{
dev->archdata.dma_ops = get_pci_dma_ops();
dev->archdata.dma_data = (void *)dma_direct_offset;
}

static void celleb_pci_dma_dev_setup(struct pci_dev *pdev)
{
celleb_dma_dev_setup(&pdev->dev);
}

static int celleb_of_bus_notify(struct notifier_block *nb,
unsigned long action, void *data)
{
Expand All @@ -81,7 +92,7 @@ static int celleb_of_bus_notify(struct notifier_block *nb,
if (action != BUS_NOTIFY_ADD_DEVICE)
return 0;

dev->archdata.dma_ops = get_pci_dma_ops();
celleb_dma_dev_setup(dev);

return 0;
}
Expand All @@ -94,6 +105,7 @@ static int __init celleb_init_iommu(void)
{
celleb_init_direct_mapping();
set_pci_dma_ops(&dma_direct_ops);
ppc_md.pci_dma_dev_setup = celleb_pci_dma_dev_setup;
bus_register_notifier(&of_platform_bus_type, &celleb_of_bus_notifier);

return 0;
Expand Down

0 comments on commit 76f53b0

Please sign in to comment.