Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 81347
b: refs/heads/master
c: f5d67bd
h: refs/heads/master
i:
  81345: 76f53b0
  81343: 7430505
v: v3
  • Loading branch information
Michael Ellerman authored and Paul Mackerras committed Jan 25, 2008
1 parent 41bc959 commit 6f6348b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 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: 35e4a6e26d0c6bc7f32087db61f0fb3666531183
refs/heads/master: f5d67bd5ecd90cc03eb84f709ab83ccc05a37eee
12 changes: 7 additions & 5 deletions trunk/arch/powerpc/platforms/cell/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,14 +490,16 @@ static struct cbe_iommu *cell_iommu_for_node(int nid)
return NULL;
}

static unsigned long cell_dma_direct_offset;

static void cell_dma_dev_setup(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 *)dma_direct_offset;
archdata->dma_data = (void *)cell_dma_direct_offset;
return;
}

Expand Down Expand Up @@ -655,7 +657,7 @@ static int __init cell_iommu_init_disabled(void)

/* If we have no Axon, we set up the spider DMA magic offset */
if (of_find_node_by_name(NULL, "axon") == NULL)
dma_direct_offset = SPIDER_DMA_OFFSET;
cell_dma_direct_offset = SPIDER_DMA_OFFSET;

/* Now we need to check to see where the memory is mapped
* in PCI space. We assume that all busses use the same dma
Expand Down Expand Up @@ -689,13 +691,13 @@ static int __init cell_iommu_init_disabled(void)
return -ENODEV;
}

dma_direct_offset += base;
cell_dma_direct_offset += base;

if (dma_direct_offset != 0)
if (cell_dma_direct_offset != 0)
ppc_md.pci_dma_dev_setup = cell_pci_dma_dev_setup;

printk("iommu: disabled, direct DMA offset is 0x%lx\n",
dma_direct_offset);
cell_dma_direct_offset);

return 0;
}
Expand Down

0 comments on commit 6f6348b

Please sign in to comment.