Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158047
b: refs/heads/master
c: 9a937c9
h: refs/heads/master
i:
  158045: 4549934
  158043: 7042141
  158039: fd341c1
  158031: 27d3111
  158015: 3fdb908
v: v3
  • Loading branch information
FUJITA Tomonori committed Jul 28, 2009
1 parent d283062 commit 5291ca3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a0b00ca84b3ecb9eebd62ad34880d8cc0d988c8a
refs/heads/master: 9a937c91eea31c4b594ea49a2a23c57003e04987
13 changes: 13 additions & 0 deletions trunk/arch/powerpc/include/asm/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,19 @@ static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
#endif
}

static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
{
struct dma_mapping_ops *ops = get_dma_ops(dev);

if (ops->addr_needs_map && ops->addr_needs_map(dev, addr, size))
return 0;

if (!dev->dma_mask)
return 0;

return addr + size <= *dev->dma_mask;
}

#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
#ifdef CONFIG_NOT_COHERENT_CACHE
Expand Down

0 comments on commit 5291ca3

Please sign in to comment.