Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 81431
b: refs/heads/master
c: 8686577
h: refs/heads/master
i:
  81429: 13cc1a0
  81427: 5e4188b
  81423: 0bdd768
v: v3
  • Loading branch information
Michael Ellerman authored and Paul Mackerras committed Jan 31, 2008
1 parent b1363e6 commit 8ae6c31
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 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: 7fc67afc436cf7f74d8cc697012696187332fc35
refs/heads/master: 86865771ea213d756b03e1f2ff44d3f811672762
19 changes: 13 additions & 6 deletions trunk/arch/powerpc/platforms/cell/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,17 +507,12 @@ static struct cbe_iommu *cell_iommu_for_node(int nid)

static unsigned long cell_dma_direct_offset;

static void cell_dma_dev_setup(struct device *dev)
static void cell_dma_dev_setup_iommu(struct device *dev)
{
struct iommu_window *window;
struct cbe_iommu *iommu;
struct dev_archdata *archdata = &dev->archdata;

if (get_pci_dma_ops() == &dma_direct_ops) {
archdata->dma_data = (void *)cell_dma_direct_offset;
return;
}

/* Current implementation uses the first window available in that
* node's iommu. We -might- do something smarter later though it may
* never be necessary
Expand All @@ -534,6 +529,18 @@ static void cell_dma_dev_setup(struct device *dev)
archdata->dma_data = &window->table;
}

static void cell_dma_dev_setup(struct device *dev)
{
struct dev_archdata *archdata = &dev->archdata;

if (get_pci_dma_ops() == &dma_iommu_ops)
cell_dma_dev_setup_iommu(dev);
else if (get_pci_dma_ops() == &dma_direct_ops)
archdata->dma_data = (void *)cell_dma_direct_offset;
else
BUG();
}

static void cell_pci_dma_dev_setup(struct pci_dev *dev)
{
cell_dma_dev_setup(&dev->dev);
Expand Down

0 comments on commit 8ae6c31

Please sign in to comment.